|
 |
VB.NET 2002/2003 Basics For coders who are new to Visual Basic, working in .NET versions 2002 or 2003 (1.0 and 1.1). |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the VB.NET 2002/2003 Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
|
 |
|
|
 |

January 18th, 2005, 06:01 PM
|
Registered User
|
|
Join Date: Feb 2004
Location: west nyack, ny, USA.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Page 638 Connection to SQL Server
I tried the exercise on page 638 of the book and got the following:
An unhandled exception of type 'System.Data.SqlClient.SqlException' occurred in system.data.dll
Additional information: System error.
I assume this is because I have done nothing to set up SQL Server on my machine. Can anyone give me help with this?
Thanks
Jerry OBrien
|

January 18th, 2005, 06:14 PM
|
Friend of Wrox
|
|
Join Date: Nov 2004
Location: Port Orchard, WA, USA.
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
|
|
Not everyone here has “the book.” This is just users helping users.
Rather than referencing page numbers from the book, could you spell out what it is that you are doing, and what the results are?
|

January 24th, 2005, 02:16 AM
|
Registered User
|
|
Join Date: Jan 2005
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I have the exact same problem.
What we are doing in this particular exercise out of the book is setting up a datagrid and grabbing tables from the SQL "pubs" database to fill the datagrid. In order to do this, we first create a connection string ("server=(local);database=pubs;uid=sa;pwd=") which should work for connecting to the default local SQL Server 2000 installation, and then we open that connection (which is created as "myConnection"). When it gets to myConnection.open(), it creates the referenced system error. I have tried changing the connection string, thinking that was the problem, and even reinstalled SQL in case I did something stupid the first time I installed it, and I still get this error.
Help!
|

January 24th, 2005, 02:48 AM
|
Registered User
|
|
Join Date: Jan 2005
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Well, I solved the problem. The book left out (apparently) part of the connection string. When I added in the statement "integrated security=sspi" it worked perfectly. Hopefully this solves your problem too, Jerry.
|

January 31st, 2005, 05:42 PM
|
Registered User
|
|
Join Date: Feb 2004
Location: west nyack, ny, USA.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Two things discovered first SQL Server is not set up on my machine and the company will not let me do it so I can not use the 'server=(local)" part of the command. BUT I did find a server I could connect to with the pubs database on it. THEN I changed the statement to connect as it appears below:
"SqlConnection("server=MXXSQLSVRYY;database=pubs;u id=employee_user;pwd=employee_user")
Where MXXSQLSVRYY is the server name I can connect to (The ( and ) were left out of the statement around the server name and employee_user is as I understand it an old Microsoft user id and password.
Where do you put the "integrated security=sspi" portion of the statement in the other solution posted?
|
Thread Tools |
Search this Thread |
|
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
 |