Data Connection problem

  • Thread starter Thread starter TOM
  • Start date Start date
T

TOM

When i am trying to connect to my SQL server using the
SQLdataadapter or the OLEDBdataadapter, VB tells me that
i can not connect to it. I can not even make a new
connection. Any Ideas

Thanks
TOM
 
Can you post the code you are using to try and connect to the database?

Chris
 
imports system.data.odbc
dim oODBCConnection as OdbcConnection
dim sConnString as String= _
"driver={SQL Server}; & _
"server=server;" & _
database=Northwind;" & _
"Uid=myusername;" & _
"Pwd=mypassword"

oODBCConnection = New Odbc.OdbcConnection(sConnString)
oODBCConnection.Open()

I think it might be something else then the code because
i can not connect to the server in the server explore view

Tom
 
Tom,

Is there any reason why you use the slow ODBC where you can use the fastest
one the SQLClient?
It is in your program, so it cannot be something most people answer,
(although that is as well not valid).

Cor
 
Jan. 10, 2005

If you can't connect using the Server Explorer, then it is not your
code. You will want to make sure that you have the permissions to logon to
the server. If you know that you do, then I have had the same problem in the
past. It turned out to be that the server was running under my user account
and I had just changed my account password. The password that the server uses
to logon to the account needed to be changed. I don't know whether you have
changed your password, but if you did you will want to change the server's
password using the Enterprise Manager! :) Lucky for me, I found out it was my
password! Good luck!


Joseph MCAD
 
I am new at programming in VB.net This is the code i
found first. What is the SQLclient you are talking about?

TOM
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top