 |
|
|
|
| Author |
Message |
cipher
Joined: 08 Aug 2007 Posts: 3
|
Posted: Wed Jan 12, 2005 9:10 pm Post subject: [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConn |
|
|
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!
Archived from group: microsoft>public>dotnet>framework>odbcnet |
|
| Back to top |
|
 |
Dilip Krishnan
Joined: 08 Aug 2007 Posts: 6
|
Posted: Wed Jan 12, 2005 9:33 pm Post subject: Re: [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSet |
|
|
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!
> |
|
| Back to top |
|
 |
cipher
Joined: 08 Aug 2007 Posts: 3
|
Posted: Thu Jan 13, 2005 2:09 am Post subject: Re: [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSet |
|
|
Hi,
It was a User DSN but after making it a System DSN there was no change in
behavior. Same error.
"Dilip Krishnan" wrote in message@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!
> >
>
> |
|
| Back to top |
|
 |
Dilip Krishnan
Joined: 08 Aug 2007 Posts: 6
|
Posted: Thu Jan 13, 2005 10:45 am Post subject: Re: [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSet |
|
|
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" wrote in message
> @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!
>>> |
|
| Back to top |
|
 |
cipher
Joined: 08 Aug 2007 Posts: 3
|
Posted: Thu Jan 13, 2005 12:52 pm Post subject: Re: [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSet |
|
|
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" wrote in message@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" wrote in message
> > @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!
> >>>
>
>
|
|
| Back to top |
|
 |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|