473,387 Members | 3,810 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.

Get a list of available Schemas and Tables via any ODBC driver

JB
Hi All,

I'm writing an application that connects to various databases via
ODBC.
I'd like to get a list of all the available Schemas and Tables in a
Database. It looks like the GetSchema function is what I need, however
there seem to be slight differences between various drivers.

For instance when calling GetSchema("Tables") the SQL Server ODBC
driver returns the following columns:
TABLE_CAT String
TABLE_SCHEM String
TABLE_NAME String
TABLE_TYPE String
REMARKS String

And the Oracle ODBC driver returns
TABLE_QUALIFIER String
TABLE_OWNER String
TABLE_NAME String
TABLE_TYPE String
REMARKS String

The first 2 columns don't have the same name, but I'd like to use only
one code for all types of ODBC driver. So my question is can I rely on
the position of these columns (i.e. second column for Table Schema or
Table Owner, third column for Table Name)?
Will these columns always be in the same position for any other ODBC
driver?

Thanks
JB
Jun 27 '08 #1
0 1388

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...
2
by: Ricardo Magalhães | last post by:
Hi, I using this code, to connect with a paradox file with ASP.NET. The first time its connect ok, but others times occurs the error: "ERROR - no error information available" I close all...
3
by: Sarah | last post by:
Hi I am using vb.net Is it possible to fetch data from foxpro tables (vfp8) and update tables in sql server 2000? The table structures of the foxpro tables are different from those in sql...
2
by: Martin | last post by:
Hello Using c#, is there a way to get a list of table names from odbc dsn dbf database connection? Thanks Martin
10
by: erick-flores | last post by:
Hello all I have been trying to look for the answer to my question doing some search in the groups but no luck. I have linked a table using ODBC. Then I made a copy of the link table to my local...
19
by: cj | last post by:
I'm getting terrible response times trying to pull data from VFP tables using .net--like 2 minutes! Can someone help? f:\arcust01 currently contains 187,728 records and is indexed on CUSTNO...
8
by: brucedodds | last post by:
I've inherited an A2003 application with linked SQL Server 2000 tables in the back end, using the Microsoft SQL Server ODBC driver. We've set up a test SQL Server database. I'd like to automate...
0
by: JB | last post by:
Hi All, I'd like to know how to get a list of available Schemas in a Database via ODBC. I had a look at the GetSchema function but I can only get a list of Tables. Ideally I'd like to get just...
0
by: JB | last post by:
Hi All, I'd like to know how to get a list of available Schemas in a Database via ODBC. I had a look at the GetSchema function but I can only get a list of Tables. Ideally I'd like to get just...
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: 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: 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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.