473,382 Members | 1,733 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,382 software developers and data experts.

ODBC Datasource problems

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
Sep 8 '07 #1
4 1589
"Paul Cheetham" <PA******@dsl.pipex.comwrote in message
news:uO**************@TK2MSFTNGP03.phx.gbl...
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...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Sep 8 '07 #2
Try using the SqlNCli provider, which as I recall can handle a lot of OleDb
and ODBC "Stuff" in .NET 2.0
-- Peter
Recursion: see Recursion
site: http://www.eggheadcafe.com
unBlog: http://petesbloggerama.blogspot.com
BlogMetaFinder: http://www.blogmetafinder.com

"Paul Cheetham" wrote:
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
Sep 9 '07 #3
Mark Rae [MVP] wrote:
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
Sep 9 '07 #4
"Paul Cheetham" <PA******@dsl.pipex.comwrote in message
news:uF**************@TK2MSFTNGP05.phx.gbl...
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...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Sep 9 '07 #5

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

Similar topics

6
by: Andreas Lauffer | last post by:
I changed from Access97 to AccessXP and I have immense performance problems. Details: - Access XP MDB with Jet 4.0 ( no ADP-Project ) - Linked Tables to SQL-Server 2000 over ODBC I used...
1
by: Josef Schneider | last post by:
Given: Data.oledb source, and a Data.odbc target The oledb data is read into a dataset. (1) Is there an easy way to copy that dataset to the target datasource ( I can look through the...
2
by: panda | last post by:
Dear ALL, I was trying to connect to a remote AIX DB2 database from a Windows 2000 machine in two ways: 1) Use DB2 client in Windows to connect to the cataloged DB I typed "db2 connect to...
2
by: 1qa2ws | last post by:
Hi, I really don't know how to use DataGridView with ODBC connection. I have an DSN ODBC connection and I know how to connect to it. I can query the database. I'd like to get the query result...
1
by: MethMath | last post by:
I have problems with a webservice receiving data in turn updating an Odbc-linked Access database on the same computer. The Odbc engine gives me an OdbcExceptionError: Message: Operation must...
5
by: Jesse Albert | last post by:
Hiyo, I'm trying to import a CSV file into a datatable using either ODBC or OLEDB. One of the columns contains an IP Address. For some reason, the IP address will not display correctly. All of...
7
by: Salad | last post by:
I am converting an application from A97 to A2003. I have 2 tables created by another application as a Foxpro.dbf. The table has no index. The connect string in A97 is FoxPro...
2
by: bcbrock | last post by:
I am trying to figure out how to query some data out of a dbase IV (.dbf) file sitting on a remote server from my MySQL/PHP/Web Server. Both servers are Windows Server 2003 SP2. My...
5
by: cj2 | last post by:
This code works: using System; using System.Collections; using System.ComponentModel; using System.Data; using System.Linq; using System.Web; using System.Web.Services; using...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.