•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the MS SQL section within the Web Development category of DaniWeb, a massive community of 391,617 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,720 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MS SQL advertiser:
Views: 8051 | Replies: 3 | Solved
![]() |
•
•
Join Date: Apr 2006
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
Hi
I am new to SQL and I am trying to connect to mssql server via vb.net with a code someone else has done. I am not sure why it won't connect. part of the code is below:
_DBConnection = New SqlConnection '(ConnectionString)
_DBConnection.ConnectionString = "Server=MASTEC;Database=CHH_Cardboard_DA_new;User ID=sa;Password=xxxx;Trusted_Connection=False"
_DBConnection.Open()
when I run this I get the following error:
"A first chance exception of type 'System.Data.SqlClient.SqlException' occurred in system.data.dll
Additional information: System error."
I am able to connect using odbcconnection but the rest of the code uses commands from System.Data.SqlClient.
Can anyone help me please. :-|
Thank you
I am new to SQL and I am trying to connect to mssql server via vb.net with a code someone else has done. I am not sure why it won't connect. part of the code is below:
_DBConnection = New SqlConnection '(ConnectionString)
_DBConnection.ConnectionString = "Server=MASTEC;Database=CHH_Cardboard_DA_new;User ID=sa;Password=xxxx;Trusted_Connection=False"
_DBConnection.Open()
when I run this I get the following error:
"A first chance exception of type 'System.Data.SqlClient.SqlException' occurred in system.data.dll
Additional information: System error."
I am able to connect using odbcconnection but the rest of the code uses commands from System.Data.SqlClient.
Can anyone help me please. :-|
Thank you
•
•
Join Date: Apr 2005
Location: Old Hampshire, Old England (LOL)
Posts: 11,937
Reputation:
Rep Power: 30
Solved Threads: 264
try adding the database as a connecttion in the Server Explorer window
TRY MY SUGGESTIONS AT YOUR OWN RISK!
james.bennet1@ntlworld.com
james.bennet1@ntlworld.com
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb MS SQL Marketplace
- Need Freelance ASP.NET, MS SQL, C#, VB.NET Developer (Web Development Job Offers)
- Connecting to SQL server DB from VB.NET app (VB.NET)
- Help needed: Connecting to sql server database (VB.NET)
Other Threads in the MS SQL Forum
- Previous Thread: Consider me please, this is not a time pass scripts!!
- Next Thread: Help!



Linear Mode