sqlconnection question

  • Thread starter 00eric claption
  • Start date
0

00eric claption

I define the following code in a button click event:

Dim cn As New SqlConnection( _

"Server=(DBTEST\DBTEST;DataBase=pubs" _

& "Integrated Security=SSPI")

***************************************************************************************************

I got this error when I trigger the button click event and error stop at the
code:

"An unhandled exception of type 'System.ArgumentException' occurred in
system.data.dll

Additional information: Invalid delimiter = found in the connection option
value. "

***************************************************************************************************

Can anyone please help me? Thanks.
 
A

Andrew Morton

00eric said:
I define the following code in a button click event:
Dim cn As New SqlConnection( _
"Server=(DBTEST\DBTEST;DataBase=pubs" _
& "Integrated Security=SSPI")

You're missing a semi-colon between pubs and Integrated.

And as Cor pointed out, it's unlikely the server's name starts with (.

Andrew
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top