473,503 Members | 1,501 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

returning a list of table objects from a connection

Hi there,

i've got a small test application that can either connect to sql server,
oracle or mysql (via odbc). When the connection is active, i want to return
a list of the user tables and list them in a table. Now i know i can get
them using SQLDMO for sql server, but is there anything generic in
System.Data or .NET that can return me the objects regardless which database
i'm connected to?

thanks,
Paul
Jul 12 '07 #1
1 1196
"Milsnips" <mi******@hotmail.comwrote in message
news:%2***************@TK2MSFTNGP05.phx.gbl...
i've got a small test application that can either connect to sql server,
oracle or mysql (via odbc). When the connection is active, i want to
return a list of the user tables and list them in a table. Now i know i
can get them using SQLDMO for sql server, but is there anything generic in
System.Data or .NET that can return me the objects regardless which
database i'm connected to?

If you are using an OleDbConnection, you can use GetOleDbSchemaTable:

DataTable schemaTable = conn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables,
new object[] {null, null, null, "TABLE"});
Jul 12 '07 #2

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

Similar topics

25
11068
by: Andreas Fromm | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, Im building an user database with many tables keeping the data for the Address, Phone numbers, etc which are referenced by a table where I...
22
13621
by: argniw | last post by:
I have a table that looks like this: Forest Residents Black Josh Black Joellen Black Mary Jane Brown Gertrude Brown Josh Brown Mary Jane
1
5189
by: Jim P. | last post by:
I'm having trouble returning an object from an AsyncCallback called inside a threaded infinite loop. I'm working on a Peer2Peer app that uses an AsyncCallback to rerieve the data from the remote...
4
4337
by: scparker | last post by:
Hello, We have a stored procedure that does a basic insert of values. I am then able to retrieve the ID number created for this new record. We are currently using ASP.NET 2.0 and use N-Tier...
4
1558
by: bullockbefriending bard | last post by:
Given: class Z(object): various defs, etc. class ZList(list): various defs, etc. i would like to be able to replace
3
7751
by: Manikandan | last post by:
Hi, I'm using executenonquery to check the existence of table in the database. I tried two methods of queries, everything return -1 even though table exists in database Code as below...
0
4077
by: cyberdawg999 | last post by:
Greetings all in ASP land I have overcome one obstacle that took me 2 weeks to overcome and I did it!!!!! I am so elated!! thank you to all who invested their time and energy towards helping me...
2
2620
by: =?Utf-8?B?RHJldw==?= | last post by:
I have a current requirement to all a subsidiary to use a current legacy application and interface with my new system to inject data when appropriate. I wanted to create a web service since we are...
7
1724
by: BiffMaGriff | last post by:
I have an query I run against an Oracle Connection. I have these objects, an event table and a table to map my objects to my events. My select statement selects the most recent event for each...
0
7089
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...
0
7282
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,...
1
6995
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...
0
7463
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...
1
5017
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...
0
4678
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3168
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1515
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 ...
0
389
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...

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.