|
-
May 2nd, 2016, 01:17 AM
#5
Thread Starter
New Member
Re: Connection Not Establishing in VB6.0
 Originally Posted by DataMiser
It would help if you answered the questions asked in post #2
You said it was working, which means that either you were using a DSN or that you had the correct connection string. You did not say what you changed.
You also gave a different error in your first post than the most recent one.
Which of these is your actual problem and what changed between it working and not working?
Is SQL server that you are trying to connect to on the local PC?
What is the name of the PC your are trying to connect to?
Have you tried other connection strings?
I didnt changed anything .Suddenly it happened.It shows the error as "Specified driver could not be loaded due to system error 126."
After that error the following error is showing :"Run time error 3704 ".I debugged and its throwing in Connection.open statement.
SQL and the project are on the same machine.If I try the same project in other systems,it is working fine.So I dont think its something related to code.Registry values under ODBC ,the sql server path is pointing to C:\Windows\System32 only.
I dont have any idea why it is showing again and again?Please help..
NB:If i use DSN connection(Cn.ConnectionString = "PROVIDER=MSDASQL;dsn=MyDSNCon;uid=" & MyUid & ";pwd=" & MyPwd & "") instead of
Cn.ConnectionString = "DRIVER={Sql Server}; SERVER=SQLSERVER2014;Database=C010;Uid=" & MyUid & ";pwd=" & MyPwd & "")
its working fine.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|