473,387 Members | 1,863 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

[IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed

Hello,

I'm creating a webservice that needs to query an Access database (mdb).
Here's my code:

OdbcConnection *pConnection = new OdbcConnection("Driver={Microsoft Access
Driver (*.mdb)};DSN=MyDatasource");
try
{
pConnection->Open();
}
catch(OdbcException *e)
{
Console::WriteLine("An error occurred: '{0}'", e);
}
This always throws an exception with the message : [IM006][Microsoft][ODBC
Driver Manger]Driver's SQLSetConnectAttr failed

I have granted the ASPNET user account Administrative privileges to no
avail. I'm pretty much a web service security noob at this point so help
would be greatly appreciated.

Thanks!
Nov 23 '05 #1
4 47488
Hello cipher,
Check if your DSN is a system dsn

HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com
http://www.geniant.com
Hello,

I'm creating a webservice that needs to query an Access database
(mdb). Here's my code:

OdbcConnection *pConnection = new OdbcConnection("Driver={Microsoft
Access
Driver (*.mdb)};DSN=MyDatasource");
try
{
pConnection->Open();
}
catch(OdbcException *e)
{
Console::WriteLine("An error occurred: '{0}'", e);
}
This always throws an exception with the message :
[IM006][Microsoft][ODBC Driver Manger]Driver's SQLSetConnectAttr
failed

I have granted the ASPNET user account Administrative privileges to no
avail. I'm pretty much a web service security noob at this point so
help would be greatly appreciated.

Thanks!

Nov 23 '05 #2
Hi,

It was a User DSN but after making it a System DSN there was no change in
behavior. Same error.

"Dilip Krishnan" <dk*******@NOSPAM.geniant.com> wrote in message
news:14**********************@msnews.microsoft.com ...
Hello cipher,
Check if your DSN is a system dsn

HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com
http://www.geniant.com
Hello,

I'm creating a webservice that needs to query an Access database
(mdb). Here's my code:

OdbcConnection *pConnection = new OdbcConnection("Driver={Microsoft
Access
Driver (*.mdb)};DSN=MyDatasource");
try
{
pConnection->Open();
}
catch(OdbcException *e)
{
Console::WriteLine("An error occurred: '{0}'", e);
}
This always throws an exception with the message :
[IM006][Microsoft][ODBC Driver Manger]Driver's SQLSetConnectAttr
failed

I have granted the ASPNET user account Administrative privileges to no
avail. I'm pretty much a web service security noob at this point so
help would be greatly appreciated.

Thanks!


Nov 23 '05 #3
Hello cipher,
Yr connection string is probably wrong
try something like this... "mySystemDSN;Uid=myUsername;Pwd=myPassword"

HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com
http://www.geniant.com
Hi,

It was a User DSN but after making it a System DSN there was no change
in behavior. Same error.

"Dilip Krishnan" <dk*******@NOSPAM.geniant.com> wrote in message
news:14**********************@msnews.microsoft.com ...
Hello cipher,
Check if your DSN is a system dsn
HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com
http://www.geniant.com
Hello,

I'm creating a webservice that needs to query an Access database
(mdb). Here's my code:

OdbcConnection *pConnection = new OdbcConnection("Driver={Microsoft
Access
Driver (*.mdb)};DSN=MyDatasource");
try
{
pConnection->Open();
}
catch(OdbcException *e)
{
Console::WriteLine("An error occurred: '{0}'", e);
}
This always throws an exception with the message :
[IM006][Microsoft][ODBC Driver Manger]Driver's SQLSetConnectAttr
failed
I have granted the ASPNET user account Administrative privileges to
no avail. I'm pretty much a web service security noob at this point
so help would be greatly appreciated.

Thanks!

Nov 23 '05 #4
Dilip,

You were correct, the connection string was wrong. It seems the Driver
portion is correct and is required. I still don't know what is wrong with
the one I was using but I changed it to this:

pConnection = new OdbcConnection("Driver={Microsoft Access Driver
(*.mdb)};DBQ=c:\\mydata.mdb");

and all is well. Thanks for your help.

"Dilip Krishnan" <dk*******@NOSPAM.geniant.com> wrote in message
news:14**********************@msnews.microsoft.com ...
Hello cipher,
Yr connection string is probably wrong
try something like this... "mySystemDSN;Uid=myUsername;Pwd=myPassword"

HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com
http://www.geniant.com
Hi,

It was a User DSN but after making it a System DSN there was no change
in behavior. Same error.

"Dilip Krishnan" <dk*******@NOSPAM.geniant.com> wrote in message
news:14**********************@msnews.microsoft.com ...
Hello cipher,
Check if your DSN is a system dsn
HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com
http://www.geniant.com
Hello,

I'm creating a webservice that needs to query an Access database
(mdb). Here's my code:

OdbcConnection *pConnection = new OdbcConnection("Driver={Microsoft
Access
Driver (*.mdb)};DSN=MyDatasource");
try
{
pConnection->Open();
}
catch(OdbcException *e)
{
Console::WriteLine("An error occurred: '{0}'", e);
}
This always throws an exception with the message :
[IM006][Microsoft][ODBC Driver Manger]Driver's SQLSetConnectAttr
failed
I have granted the ASPNET user account Administrative privileges to
no avail. I'm pretty much a web service security noob at this point
so help would be greatly appreciated.

Thanks!


Nov 23 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: TheAd01 | last post by:
In an Access97 application I fetch data from an Oracle database via a linked table (via Odbc/sqlnet). The Oracle database now upgrades from 7.3 to 8.0. The Oracle odbc driver I use (2.0.3.1,...
1
by: Srinivas | last post by:
Hi, I am working on a project to script all database objects.The code below works fine on my machine( windows XP ) and all the creates all the db objects. But I get an error message when I run...
3
by: Andrew McGregor | last post by:
Hi, I am trying to get a VB.NET application to connect to a local Oracle 9i Lite database. What is the correct form for a connect string? cn = New...
0
by: bazzer | last post by:
hey, i am using visual basic.net 2003 and have an ASP.NET webform application thats accessing a microsoft access 2003 database. i kept getting the following error when i tried to run it: ERROR ...
0
by: bazzer | last post by:
hey, im trying to access a microsoft access database from an ASP.NET web application in visual basic 2003.NET. i get the following error when i try running it: Server Error in...
4
by: alegria4ever | last post by:
I have an Access 2000 database that links several tables from Oracle 9. For some reason or another, one of our user repeatedly gets the following error when accessing queries within this database:...
1
by: veerender | last post by:
Hello, When i tried to load an application from a CD following the Setup link, i get the below error: Debug Assertion Failed ! Program...
1
by: byrocat | last post by:
Can anyone give a quick description of the meaning of this message and what needs to be done to get a connection. I'm running DBArtisan with SQLServer 2000 client SP4 installed. I also get the...
1
by: Lucy Lane | last post by:
I get: ORA-06413: Connection not open. (#6413) Driver's SQLSetConnectAttr failed IM006 0 Driver's SQLSetConnectAttr failed (#0) Don't really know what this means.
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.