Re: Silly ODBC Connection problem



Ah, it seems to me this must be done interactively on each client--either that or use the magical "DSN-less" connection. It's been 11 or years or so since I wrote about ODBC ('97) so it's getting kinda fuzzy. The problem is each time the driver revs, the interface to create the DSNs programmatically change as well. The easiest course is hand-register or just move into the 21st century... ;)

--
__________________________________________________________________________
William R. Vaughn
President and Founder Beta V Corporation
Author, Mentor, Dad, Grandpa
Microsoft MVP
(425) 556-9205 (Pacific time)
Hitchhiker’s Guide to Visual Studio and SQL Server (7th Edition)
____________________________________________________________________________________________
"DingoBoy" <DingoBoy@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:223B0447-28A9-4F50-A5AA-2C4C5BD50A60@xxxxxxxxxxxxxxxx
Thanks for the reply William,

I am thinking I will probably pursue the ADO.NET provider option instead of
wasting
my time on this ODBC issue. Just out of interest, would you happen to know
what
may be required to properly register the DSN?

Cheers

Justin

"William Vaughn" wrote:

I would suspect that the DSN is not properly registered. This is a typical
error for ODBC. It's one (of the many) reasons ADO OLE DB and ADO.NET
providers were created to bypass these generic OSFA interfaces in favor or
native interfaces.

--
__________________________________________________________________________
William R. Vaughn
President and Founder Beta V Corporation
Author, Mentor, Dad, Grandpa
Microsoft MVP
(425) 556-9205 (Pacific time)
Hitchhiker’s Guide to Visual Studio and SQL Server (7th Edition)
____________________________________________________________________________________________
"DingoBoy" <DingoBoy@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:CB0414A2-D9B0-4C8C-B518-63DA466BAF7A@xxxxxxxxxxxxxxxx
>I have an Oracle database running on Windows Server 2003, for which I >have
> created a System DSN named "MyDSN" in the ODBC Administrator tool. I > can
> test
> the connection without problems in the ODBC Administrator, however when > I
> use
>
> conn = gcnew OdbcConnection("DSN=MyDSN;UID=User;PWD=Pass");
>
> It gives me the error
> "ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not > found
> and no default driver specified"
>
> I am at a loss, the DSN is defined as a System DSN which can be
> succesfully
> tested with the same user and password, yet through the above code I
> cannot
> get a connection.
>
> Any thoughts would be hugely appreciated
>
> Cheers
>
> Justin


.



Relevant Pages

  • Re: Alternative to using DSN to connect to database
    ... you have to use .NET ODBC provider. ... Server is NOT optimized. ... Just because of the Admiistrator thinking DSN is easier for him to control ... > Basically my problem is that the ODBC Connection Manager in Control Panel ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Alternative to using DSN to connect to database
    ... use a native driver where possible. ... Basically my problem is that the ODBC Connection Manager in Control Panel ... At present (since nearly all use the ODBC DSN Connection ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Linking to back end on a web server ?
    ... When I do the File--Get External Data and select the DSN, ... "You cannot use ODBC to import from, export to, or link an external ... Microsoft Jet or ISAM database table to your database. ... that DSN-based connection to a DSN-less connection. ...
    (microsoft.public.access.externaldata)
  • Re: Error Message when using ODBC: " Record had too few data f
    ... If so, it's OLEDB. ... look at the connection string. ... If my guess is wrong and you are using ODBC, ... System DSN, but it can be useful to create a File DSN because you can open ...
    (microsoft.public.word.mailmerge.fields)
  • Re: VFP Updates?
    ... Try talking ODBC or OleDb and they say HU. ... make up my apps so that what ever they want to run has to be from a command ... kind of connection and assign it the right to do exactly what you want. ...
    (microsoft.public.fox.programmer.exchange)