Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Cannot connect SQL-Server: Invalid connection string attribute.

Posted on 2008-06-09
8
Medium Priority
?
7,631 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

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

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

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

A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
Windocks is an independent port of Docker's open source to Windows.   This article introduces the use of SQL Server in containers, with integrated support of SQL Server database cloning.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Viewers will learn how the fundamental information of how to create a table.

719 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