Archived

This topic is now archived and is closed to further replies.

how to get ODBC system detail?

This topic is 5506 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I write a C++ program to get database details. Such as no. of tables in database, no. of fields in a table, which one are system tables and which one are user tables, field''s data type. The program connect the database though ODBC. My question is how can i do that. Pls help. Thx.

Share this post


Link to post
Share on other sites
If you are using SQL you can use the stored procedures in the master table. IE sp_tables,sp_columns , if you are using Access you will have to use a library for access to obtain that information.

Share this post


Link to post
Share on other sites
DOnt use SP*s - got for the system tables, they are part of the SQL Standard, which - btw - you should have read.

Regards

Thomas Tomiczek
THONA Consulting Ltd.
(Microsoft MVP C#/.NET)

Share this post


Link to post
Share on other sites
yes. I know i can use stored procedures to get the data.

Also, i know i can use the build in function.

Like ODBC, SQLTables --->Returns the list of table names stored in a specific data source.

can it also work? Which method is better? store procedure or build in function?

Also, i have a question about ODBC. If i use access to make a database and then connected with ODBC. On the other hand, i use Oracle to make another database and connected with ODBC. A program access two database details(e.g. no. of table...), does the store procedure call or build in function same with two database in the program?

Thx

Share this post


Link to post
Share on other sites