Solved

Cannot connect SQL-Server: Invalid connection string attribute.

Posted on 2008-06-09
8
6,965 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties

734 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