473,395 Members | 1,623 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

sqlconnection question

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.
Jan 6 '06 #1
2 1634
Hi,

Your first opening ( is for sure wrong. Has not even to be there.

www.connectionstrings.com

I hope this helps,

Cor

"00eric claption" <a@b.com> schreef in bericht
news:uw**************@TK2MSFTNGP11.phx.gbl...
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.

Jan 6 '06 #2
00eric claption wrote:
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
Jan 6 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: huzz | last post by:
I have a method that gets sqldatareader as shown below.. my question is how do i close the sqlconnection (objConn) object within this method? If i put the objconn.Close(); after the return then i...
0
by: Nayt Grochowski | last post by:
Does anyone see any problem with the loading a SqlConnection into the System.Web.HttpContextCurrent.Items collection in a Page's Constructor. Then Closing and Disposing of it the OnUnload method? ...
6
by: goodstart123 | last post by:
For example, the following code works fine without SqlConnection. Any Answer to the question? string connectionString = "server=YourServer; uid=sa; pwd=YourPassword;...
4
by: The Coolest Dolphin | last post by:
Hi all, I have a question/problem concerning usage of my sqlconnection throughout my program. In my main form (frmMain) I defined an sqlconnection (I've set the connection public so that I can...
13
by: MuZZy | last post by:
Hi, Just wanted to make sure i get it right: consider this class: // =========== START CODE ============= class Test { private SqlConnection con = null; public void Connect() { con = new...
11
by: Bob | last post by:
In our new .NET web applications, we try to limit the use of SqlConnection to just one instance per page, even if there are multiple accesses to various queries. The thinking behind is that this...
2
by: StephenRichter | last post by:
I have SqlServer loaded on my w2k system. The freeby I just downloaded from MS. Within WebMatrix I created a database. called it "WebMatrix" In WebMatrix I connect to the database. server:...
1
by: jinfeng_Wang | last post by:
hi, I have a question about the difference between SqlConnection.IDisposable.Dispose() and SqlConnection.Dispose(). Both of them realize the function of releasing the connection to the...
4
by: Victor | last post by:
Hi Guys I have a problem here. I want to improve the performance for a website. When I looked into the system, I have found that the system made the "SqlConnection Object" static. That mean only...
4
by: =?Utf-8?B?dGhlIGZyaWVuZGx5IGRpc3BsYXkgbmFtZQ==?= | last post by:
Hello, I am planning to use three databases on the local SQL Server. DB1 will be for App1, DB2 for App2, and DB3 will hold tables, that both, App1 and App2 need to access. With applications...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.