Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / ADO.NET / March 2008

Tip: Looking for answers? Try searching our database.

Silly ODBC Connection problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
DingoBoy - 05 Mar 2008 22:36 GMT
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
William Vaughn - 05 Mar 2008 23:57 GMT
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.

Signature

__________________________________________________________________________
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)
____________________________________________________________________________________________

>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
[quoted text clipped - 19 lines]
>
> Justin
DingoBoy - 06 Mar 2008 01:35 GMT
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

> 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
[quoted text clipped - 24 lines]
> >
> > Justin
William Vaughn - 07 Mar 2008 00:42 GMT
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... ;)

Signature

__________________________________________________________________________
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)
____________________________________________________________________________________________

> Thanks for the reply William,
>
[quoted text clipped - 43 lines]
>> >
>> > Justin

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.