all groups > sql server new users > august 2005 >
You're in the

sql server new users

group:

Problem set up connection string to SQL server (Using ADO in VB)


Re: Problem set up connection string to SQL server (Using ADO in VB) Mladenovic Dejan
8/31/2005 12:00:00 AM
sql server new users:

Hi Chris

try this one:

Set cnnConnection = New Connection

Dim sql As String

sql = "Provider=SQLOLEDB.1;Integrated Security=SSPI;" & _
"Persist Security Info=False;Initial Catalog=BigBank;" & _
"Data Source=(local)"

cnnConnection.ConnectionString = sql

cnnConnection.Open


[quoted text, click to view]

Problem set up connection string to SQL server (Using ADO in VB) Chris
8/31/2005 3:19:02 AM
Hi,

i'm VB/SQL server beginner. Lately i try out using the ADO to retrieve data
frm SQL server, but encouter the connection problem when i run it.

SQL server 7 is locally installed type (local) as server name, & use Window
NT Integreted security as log on to the server. (no username/passward needs)

My VB code:

Dim cnnConnection As ADODB.Connection

Set cnnConnection = New Connection

cnnConnection.ConnectionString = "Provider=sqloledb;" & _
"Data Source (local); Initial Catalog=BigBank;"

cnnConnection.Open
..........

Error:Invalid Connection String Attribute.


Any advise will be sincerely appreciated.

Regards
Chris


Re: Problem set up connection string to SQL server (Using ADO in VB) Sue Hoegemeier
8/31/2005 6:10:43 AM
You need to include:
Integrated Security=SSPI
to tell the connection to use windows authentication. You
can find sample connection strings at:
http://www.carlprothman.net/Default.aspx?tabid=87#OLEDBProviderForSQLServer

-Sue

On Wed, 31 Aug 2005 03:19:02 -0700, "Chris"
[quoted text, click to view]
Re: Problem set up connection string to SQL server (Using ADO in V Chris
8/31/2005 5:48:14 PM
Hi all,

Thks for the help. The code is runing well after "Integrated Security=SSPI"
is added.

thxs.

Best
Chris



[quoted text, click to view]
AddThis Social Bookmark Button