Solved

Cannot connect SQL-Server: Invalid connection string attribute.

Posted on 2008-06-09
8
6,422 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
NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

 

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
 
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties

770 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