Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with ado.net

Status
Not open for further replies.

uniq47

Technical User
Joined
Nov 4, 2002
Messages
5
Location
US
Hi
I'm trying for connectivity to MSSQLServer thru VB ado.net
Here's the code snippet :

Dim ConnStr As String
ConnStr = "Initial Catalog=pubs;Data Source=DSN;Integrated Security=SSPI;"
Dim ObjConn As SqlClient.SqlConnection
ObjConn = New SqlClient.SqlConnection(ConnStr)
ObjConn.Open()

Whenever I'm trying to execute to execute this code the programs runs forever and taking too much time to give a error msg which says "An unhandled exception of type 'System.Data.SqlClient.SqlException' occurred in system.data.dll"
Can somebody tell me how to handle this ?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top