3 problems here ! Expert please help ! TQ !

tayhk

Member
Joined
Nov 18, 2002
Messages
7
I am using VB.NET now, and facing some problems on coding, please help, thanks a lot !

1. How to fetch ALL the tables name in a database.
(Not specify the tables name by SQL command.)

2. In ADO.NET, how to make the Oledb connection string get the info from UDL (Micosoft Data Link) file ?
What I am doing is like this:
Code:
   Dim oledbconn as oledbconnection
   oledbconn.connectionstring = "File Name=c:\xxx\db.udl"
(But the syntax is wrong. How should I code ?)

3. How to use DLL files ? I want to use oledb32.dll to execute UDL files in my program.
What I am doing is like this :
Code:
    Call shell("rundll32.exe oledb32.dll c:\xxx\db.udl")
(Can I make it other way ?)

Any help with these questions is greatly appreciated.
 
Last edited by a moderator:
I have solved 2 and 3 :

But this is still troubling me :
1. How to fetch ALL the tables name in a database.
(Not specify the tables name by SQL command.)

Any help with these questions is greatly appreciated.
 
or better still if using SQL 7 or SQL 2000

the following should work

Code:
select * from information_schema.Tables
where table_type = BASE TABLE
 
I believe you can also use the ALL keyword if youre looking to select data from every table. Of course this doesnt return table names, and may not be what youre looking for.
 
Back
Top