Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Beginning VB 6
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Beginning VB 6 For coders who are new to Visual Basic, working in VB version 6 (not .NET).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning VB 6 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 .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old January 3rd, 2005, 04:23 PM
Registered User
 
Join Date: Jan 2005
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default System.Data.SqlClient.SqlException

I am trying to get some code to work from the book and I keep getting an error.

"An unhandled exception of type 'System.Data.SqlClient.SqlException' occurred in system.data.dll

Additional information: System error."

I get the error at the 'objConnection.Open()' line

Here is the objConnection defined:
Dim objConnection As New SqlConnection("server=(local);database=pubs;user id=administrator;password=all")

I can connect to the db via the tools menu and every other way I have tested, just not via my code which is just as it it described to me in the book.

Any help would be greatly appreciated.

Reply With Quote
  #2 (permalink)  
Old January 3rd, 2005, 04:46 PM
Registered User
 
Join Date: Jan 2005
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I got it. I changed how I was authenticating with the server.

From:
'Dim objConnection As New _
    'SqlConnection("server=(barsitech);database=pubs;u ser id=sa;password=")


To:
Dim objconnection As SqlConnection = New _
        SqlConnection("server=barsitech;integrated security=SSPI;initial catalog=pubs;")

Reply With Quote
  #3 (permalink)  
Old August 13th, 2005, 09:39 PM
Registered User
 
Join Date: Aug 2005
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

not did you help yourself you helped me too!!!! THANKS!!!!, how and where did you figure this out?

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Missing System.Data.SQLClient dll mike_abc VB.NET 2 June 3rd, 2011 10:18 PM
System.Data.SqlClient.SqlDataReader - URGENT wk ASP.NET 2.0 Basics 8 September 27th, 2006 05:00 AM
'SYSTEM.DATA.SQLCLIENT.SQLEXCEPTION' soorsha General .NET 0 September 23rd, 2006 11:59 PM
System.Data.SqlClient.SqlException: Login failed f belete SQL Server 2005 3 May 18th, 2006 08:18 AM
Data.SqlClient.SqlException: Login failed csun ASP.NET 1.0 and 1.1 Basics 3 October 15th, 2004 03:01 PM



All times are GMT -4. The time now is 08:58 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.