Solved

Cannot connect SQL-Server: Invalid connection string attribute.

Posted on 2008-06-09
8
5,940 Views
Last Modified: 2010-08-05
Cannot connect SQL-Server from one specific machine on corp network. Other machines connect ok.
Got this error message (vb6) when trying to connect:

Run-time error '2147467259 (80004005)':
Invalid connection string attribute.

SQLserver uses non defalt port,windows authentication, connection string verified ok( as it works in other machines.) Firewall configured ok. User has permissions in SQL-Server database.
0
Comment
Question by:vpalmu
  • 4
  • 3
8 Comments
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 21746479
what IS the connection string, anyway?
0
 

Author Comment

by:vpalmu
ID: 21746551
"driver={sql server};Provider=SQLOLEDB;Integrated Security=SSPI;Server1\Myserver123,3434;Database=SQLBase;"
0
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 21746568
>driver={sql server};Provider=SQLOLEDB;
this is the problem. the first part says: use ODBC, the second says use OLEDB.

I suggest to remove the driver={sql server}; part...
0
 

Author Comment

by:vpalmu
ID: 21750548
angell, What do you mean by "use ODBC" ? "Driver(sql server)", how does this tell to use ODBC ?
I was just wondering why does this work in all other machines and this particular one ?
0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
ID: 21750647
>angell, What do you mean by "use ODBC" ? "Driver(sql server)", how does this tell to use ODBC ?
in short: because. it's the syntax.

see this site for the overview of the connection strings for sql server, and you can see the in the ODBC section, it's the Driver={SQL Server}, while in the OleDb section, it says Provider=SqlOleDB
http://www.connectionstrings.com/?carrier=sqlserver
you won't find a connection string mixing the 2.

>I was just wondering why does this work in all other machines and this particular one ?
sometimes, applications are more flexible/tolerant than others. it's like people :)


0
 

Author Closing Comment

by:vpalmu
ID: 31465554
I need to understand better how ODBC works..
0
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 21754412
<Grading Comments>
I need to understand better how ODBC works..
</Grading Comments>

at what point?
note: you should use the OleDb provider whenever possible, it should be faster, more functionality, more stable ...
0
 

Expert Comment

by:neil17317
ID: 22457670
thank u... !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now