VB 6 ODBC connection to SQL 2000
-
I have a visual basic 6 application that needs some updating for a project moving from SQL 7 to SQL 2000. The application is an executable that users create shortcuts to on their desktops. The exe file resides on the same server as the sql 2000 database it needs to access. Previously users created an ODBC connection on their own Windows 2000 Professional workstations, and the application that resides on the server used a simple connection string of ... oconn.open "DSN=MOL;UID=sa;" ( yeah I know this is bad, I inherited it this way ) ... but now the server has been upgraded from NT4 to Server 2003, and the database has gone from SQL7 to SQL2000. I have been experimenting blindly with new connection strings, and am currently trying ... oconn.open "Integrated Security=SSPI;Initial Catalog=MOL;Data Source=server_name_here;" The error I get when I run this vb exe on my own workstation with an ODBC connection setup to use SQL authentication (using a user/pass that is setup in SQL) is ... "Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection. Being a newbie to VB and SQL, and given the fact that I inherited this app to try and fix it, I am wondering if this approach is totally wrong? There are roughly 10 users who need to create a shortcut to this VB exe file that resides on the same server as the database, and the appliction is used to make updates to the database. Thanks for any suggestions.
-
I have a visual basic 6 application that needs some updating for a project moving from SQL 7 to SQL 2000. The application is an executable that users create shortcuts to on their desktops. The exe file resides on the same server as the sql 2000 database it needs to access. Previously users created an ODBC connection on their own Windows 2000 Professional workstations, and the application that resides on the server used a simple connection string of ... oconn.open "DSN=MOL;UID=sa;" ( yeah I know this is bad, I inherited it this way ) ... but now the server has been upgraded from NT4 to Server 2003, and the database has gone from SQL7 to SQL2000. I have been experimenting blindly with new connection strings, and am currently trying ... oconn.open "Integrated Security=SSPI;Initial Catalog=MOL;Data Source=server_name_here;" The error I get when I run this vb exe on my own workstation with an ODBC connection setup to use SQL authentication (using a user/pass that is setup in SQL) is ... "Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection. Being a newbie to VB and SQL, and given the fact that I inherited this app to try and fix it, I am wondering if this approach is totally wrong? There are roughly 10 users who need to create a shortcut to this VB exe file that resides on the same server as the database, and the appliction is used to make updates to the database. Thanks for any suggestions.
-
I have tried all of the options displayed on these links, and all seem to result with the same error. I am wondering if something with the SQL setup itself is blocking connections? We have turned off the use of Named Pipes in SQL 2000. I have tried with both having my own ODBC connection setup (using SQL authentication and having the user/pass setup that is the db user we need to use), and without any ODBC driver at all on my own desktop. I am kind of out of ideas at this point. Thanks!
-
I have tried all of the options displayed on these links, and all seem to result with the same error. I am wondering if something with the SQL setup itself is blocking connections? We have turned off the use of Named Pipes in SQL 2000. I have tried with both having my own ODBC connection setup (using SQL authentication and having the user/pass setup that is the db user we need to use), and without any ODBC driver at all on my own desktop. I am kind of out of ideas at this point. Thanks!
Usually ocurrs if using Windows Authentication on the server, and attempting to use SQL authentication to get in.... Win Auth uses Domain login, whereas SQL uses uid/pwd - are you SURE you're using mixed mode authentication? "Now I guess I'll sit back and watch people misinterpret what I just said......" Christian Graus At The Soapbox