Problems connecting VB6 to SQL Server with ADO Control
-
I've started playing around with connecting a VB 6.0 form to my new SQL server (indeed, I am new to SQL server, as well as it is a new installation) using an ADO control. I've done plenty of connecting to an Access DB with ADO controls and programming, so I figured that trying to connect to SQL was the next logical step. The server installed fine, and the form connected to the server without incident. However, when I ran the form, I had some major issues. When my textboxes lost focus, the inputs were returned to null strings as though nothing had been entered into the control. I have an assignment statement passing the string in the control to a variable in the Lost Focus event, and stepped through the code with the debugger, and this problem is happening before that line of code is being fired. I figure it has to be something wrong with my ADO connection, because as soon as I take the control off the form, the problem goes away. I am using the correct connection string, as far as I know (ie the connection for SQL Server). However...I kinda need to be connected to the database for this to be effective ;) Any thoughts? Please keep in mind I'm used to connecting to Access but kinda guessing and checking with the SQL server, so ANY input will be helpful. THX -------------------- Tim Perry "Remember, comments are there to make people laugh, not to help them fix your code later...because you're code is always perfect"