473,804 Members | 3,067 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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("Tabl es") 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 1405

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

Similar topics

6
6787
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 the SQL Profile to watch the T-SQL-Command which Access ( who creates the commands?) creates and noticed:
2
2448
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 connection, and this error yet occurs. Someone knows why this ?
3
2379
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 server. Depending on the data fetched, I would like to update relavent table columns in sql server. How can this be done Regards Sarah
2
5198
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
1830
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 computer (so my queries can run faster, it was paintful slow with the link table). Everything works fine but the link table changes everytime (it is an Invoice table). What I want is a way to automatically update my local table with the link...
19
2181
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 i:\btn currently contains 5,999,657 records and is indexed on BTN Imports System.Data.OleDb Public Class Form1
8
4108
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 the process of relinking the application to test/prod. I've found some code examples here of relinking ODBC back ends to different databases, but they involve deleting the table before relinking. My concern is that the primary key information...
0
1040
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 the list of Schemas to save me from having to browse the full table list to extract all the available schemas. Any suggestion would be greatly appreciated
0
1036
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 the list of Schemas to save me from having to browse the full table list to extract all the available schemas.
0
9704
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10558
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10302
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10069
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7608
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5636
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4277
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3802
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2975
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.