I've developed a software using VB6 and MSSQL 7.0. Now I need to create a backup-restore program on behalf of my software. For this I need to fetch down all the table names located inside the database used in the software.

My database name is -->BILLING_SYSTEM
and I've also created a Security LogIn -- BS(BS) for this.
All jobs have been done using Sql Server Enterprise Manager.
My software uses an USER-DSN connection to communicate with the sql server.

Now my question is how can I issue an sql command which can fetch down all the table names
from the BILLING_SYSTEM database. I mean what is the sql query for that like we issue this in case of Oracle :-

SELECT * FROM SYSDBA_USERS WHERE OWNER='<DATABASE NAME>'

Can anybody help me????

regards
Shouvik

thanks to all of you who made visit to this thread.
its pleasure to tell you guys that i've solved this problem. now i'm getting the table names from my sql database.

so, this thread is now closed.

thanks to all of you.....once again...
bye

its pleasure to tell you guys that i've solved this problem. now i'm getting the table names from my sql database.

It would have been much more better if you had mentioned how you solved your problem. :)

Ok....here is the code that I used....

[B]''opening my database[/B]
use BILLING_SYSTEM
[B]''fetching all tables[/B]
select distinct name from sysobjects where xtype='U'

regards
Shouvik

Thanks :)

hey can u give the syntax for the same in ms access

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.