accessman2
Registered User.
- Local time
- Yesterday, 18:49
- Joined
- Sep 15, 2005
- Messages
- 335
Dim conn As ADODB.Connection
Dim rs As ADODB.Recordset
Set conn = CurrentProject.Connection
conn.Open "Provider=sqloledb;" & _
"Data Source=localhost;" & _
"Initial Catalog=db1;" & _
"Integrated Security=SSPI"
Set rs = conn.Execute("sp_check")
I want to write the code to connect SQL Server. But, why it doesn't work?
Is anything wrong there?
Thanks.
Dim rs As ADODB.Recordset
Set conn = CurrentProject.Connection
conn.Open "Provider=sqloledb;" & _
"Data Source=localhost;" & _
"Initial Catalog=db1;" & _
"Integrated Security=SSPI"
Set rs = conn.Execute("sp_check")
I want to write the code to connect SQL Server. But, why it doesn't work?
Is anything wrong there?
Thanks.