ODBC Datasource problems

P

Paul Cheetham

Hi,

I am need to access an ODBC data source from within my ASP.Net 2.0 (c#)
application. I am Using Visual Studio 2005 Professional.

I have added the ODBC objects to the toolbox, as they are not in it by
default, but they still won't show.
If I 'view all' on the toolbox they are there, but disabled.

I assume that I can't add them to my form because I am missing a
reference to a DLL or something - but which one?

I have found some references to Microsoft.Data.Odbc.dll but this would
appear to be a VS2003 file, as I don't seem to have it.

Can anybody tell me how I can get this to work?


Thankyou.


Paul
 
M

Mark Rae [MVP]

I am need to access an ODBC data source from within my ASP.Net 2.0 (c#)
application. I am Using Visual Studio 2005 Professional.

Firstly, are you absolutely sure that you need to use ODBC, and that the
RDBMS in question does not have an OleDb provider or even a native .NET data
provider...?
I assume that I can't add them to my form because I am missing a reference
to a DLL or something - but which one?

In .NET 2, Odbc is supported through the System.Data.Odbc namespace, so just
make sure you have:

using System.Data.Odbc;

in your code headers...
I have found some references to Microsoft.Data.Odbc.dll but this would
appear to be a VS2003 file, as I don't seem to have it.

In earlier versions of the .NET Framework, ODBC support was available only
as in installable add-in...
 
P

Paul Cheetham

Mark said:
Firstly, are you absolutely sure that you need to use ODBC, and that the
RDBMS in question does not have an OleDb provider or even a native .NET
data provider...?

Yes. I wouldn't use it out of choice, but I am deploying the website to
a server of a commercial hosting company, and the only database access I
have, without paying huge amounts for an SQL database, is an ODBC System
DSN connection.

In .NET 2, Odbc is supported through the System.Data.Odbc namespace, so
just make sure you have:

using System.Data.Odbc;
I have included that namespace, but the ODBC controls will not show in
the toolbox.


Thankyou.

Paul
 
M

Mark Rae [MVP]

Yes. I wouldn't use it out of choice, but I am deploying the website to a
server of a commercial hosting company, and the only database access I
have, without paying huge amounts for an SQL database, is an ODBC System
DSN connection.

Ouch! Sounds like it's time to find a decent ISP...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top