RE: connecting to a SQL2000 Server using Windows authentication
From: Richard J (anonymous_at_discussions.microsoft.com)
Date: 04/29/04
- Next message: smk2: "Re: Update table from ADO"
- Previous message: Al Reid: "Re: Update table from ADO"
- In reply to: Peter Newman: "connecting to a SQL2000 Server using Windows authentication"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 29 Apr 2004 05:46:03 -0700
Peter,
The easiest method I have found for developers connecting to a database for the first time is to use the Microsoft ADO Data Control (look in Project | Components). Drop the control on your form, and click the Custom property to bring the property pages up. Build the connection string by following through with the wizard. Once built and the connection tested, copy the string from the text box on the first tab and paste it directly into your code.
I'll leave it up to you to do a little light reading in MSDN concerning the ADO Connection Object.
As for testing the connection, you tested it from the ADO Data Control. Also, you should be able to check the State property of the connection object to see if you are connected.
Good luck.
----- Peter Newman wrote: -----
Ive been using VB6 ( sp5) to connect to a SQL server using a DSN and SQL authentication. I have run into afew difficulities and it has been suggested that i should try using Windows authentication on the server instead.
to this end i have set up a dev server to look at this problem. After setting up a user on the server, how can i
1. connect to the server from a workstation using vb
2. check if the user is connected to the server
for this test the server is called SERVER1 and ther user logon is TESTSYS\FRED
any pointers would be mist greatful
- Next message: smk2: "Re: Update table from ADO"
- Previous message: Al Reid: "Re: Update table from ADO"
- In reply to: Peter Newman: "connecting to a SQL2000 Server using Windows authentication"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|