[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Cannot connect SQL-Server: Invalid connection string attribute.

Posted on 2008-06-09
8
Medium Priority
?
8,084 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 143

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 143

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
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 

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 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 2000 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 143

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

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

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

Microsoft Access has a limit of 255 columns in a single table; SQL Server allows tables with over 255 columns, but reading that data is not necessarily simple.  The final solution for this task involved creating a custom text parser and then reading…
This month, Experts Exchange sat down with resident SQL expert, Jim Horn, for an in-depth look into the makings of a successful career in SQL.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.
Suggested Courses

873 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