ODBC connection

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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 !
 
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
 
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.
 

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

Back
Top