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

ODBC connection

Hi there,
I'm new in C#. But not in programming. I used to call odbc32.dll before, so
I was working with ODBC API commands.
Can you advice a way whichis better for using in VC2003 C#?
I'm trying to create an application which will automatically read DSN, read
data like table names, cols types in each table, and later build
DataSource/DataGrid objects which are adopted to the read data.
I use System.Data.Odbc namespace.
Thanks.
Nov 16 '05 #1
3 3733
You can create a connection in your VSIDE 2003, use the serverExplorer tab,
and right click on Data Connection, select new connection, you will see a
dialog for creating connection. select your Provider, OleDb for ODBC
drivers, and the in the next dialog set connection string from Build button.
Here it will allow you to select your DSN.

Good Luck !

"vitagoni" <vi******@discussions.microsoft.com> wrote in message
news:85**********************************@microsof t.com...
Hi there,
I'm new in C#. But not in programming. I used to call odbc32.dll before, so I was working with ODBC API commands.
Can you advice a way whichis better for using in VC2003 C#?
I'm trying to create an application which will automatically read DSN, read data like table names, cols types in each table, and later build
DataSource/DataGrid objects which are adopted to the read data.
I use System.Data.Odbc namespace.
Thanks.

Nov 16 '05 #2
Ok, connection was not a problem.
Just hint me how can I get data from DSN like number and names of tables,
and data types?
What object contains all of necessary methods to get full range of odbc32.dll?
Thanks
Nov 16 '05 #3
It seems you want me to give a complete code how to use the Odbc data
provider in .Net ? ah ! Use OdbcDataReader, and its GetSchemaTable method,
to retrieve the table info. Also, check MSDN library. I suppose you are
familiar wit ADO .NET.

"vitagoni" <vi******@discussions.microsoft.com> wrote in message
news:AF**********************************@microsof t.com...
Ok, connection was not a problem.
Just hint me how can I get data from DSN like number and names of tables,
and data types?
What object contains all of necessary methods to get full range of odbc32.dll? Thanks

Nov 16 '05 #4

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

Similar topics

0
by: Sean Anderson | last post by:
ODBC under System DSN Setup Access Driver give it the DSN (Data Source Name) MSA Click on Select and point to the myfile.mdb (your database file)
5
by: SerGioGio | last post by:
Hello, I am going nuts. I am trying to connect to my local ORACLE instance using ODBC. It used to work few weeks ago, but it fails now. Connection with: - SQL*plus: connection works! -...
11
by: DJJ | last post by:
I am using the MySQL ODBC 3.51 driver to link three relatively small MySQL tables to a Microsoft Access 2003 database. I am finding that the data from the MySQL tables takes a hell of a long time...
14
by: jj | last post by:
Is it possible to call a remote php script from within Access? I'm thinking something like: DoCMD... http://www.domain.com/scripts/dataquery.php DoCmd.OpenQuery "update_data", acNormal, acEdit...
5
by: Alec | last post by:
Hi All, I am currently trying to link in Access 97 to a table in a MSSQL 7 server. Initially the link is fine, however, when I close the access database and re-open it from the same network...
1
by: Paul | last post by:
Hello, I am converting an Access database on our network to a sql 2000 backend and keeping access as the front end. The access database has evolved and been a solution to collect data but now...
4
by: Dave | last post by:
Hey guys, I have an ODBC problem that has me stumped. I wrote a VBA script to run in Microsoft Excel that pulls data out of an application using that application's ODBC driver and puts it into...
9
by: mcbill20 | last post by:
Hello all. I just installed Oracle 10g developer tools on a machine running XP Pro and Office XP. Before this I had just the Oracle 9 client installed. I the previous configuration, I was able to...
8
by: Greg Strong | last post by:
Hello All, The short questions are 1 Do you know how to make DSN connection close in Access to Oracle 10g Express Edition? &/or 2 Do you know how to make a DSN-less pass-through query...
2
by: 111mike | last post by:
Hello, Here's my problem. I cannot connect to mysql database using odbc string connections or dns. I keep getting a "cannot connect to mysql server localhost." I'm running windows XP Pro and...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: 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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

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.