User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the MS SQL section within the Web Development category of DaniWeb, a massive community of 373,375 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,801 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MS SQL advertiser:
Views: 1856 | Replies: 4 | Solved
Reply
Join Date: May 2007
Location: India
Posts: 493
Reputation: choudhuryshouvi is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 45
choudhuryshouvi's Avatar
choudhuryshouvi choudhuryshouvi is offline Offline
Posting Pro in Training

Question How to retrieve table names

  #1  
Jan 15th, 2008
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
Shouvik_The_Expert_Coder
Have a problem? Don't worry just give me a call and I'll fix it for you.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: May 2007
Location: India
Posts: 493
Reputation: choudhuryshouvi is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 45
choudhuryshouvi's Avatar
choudhuryshouvi choudhuryshouvi is offline Offline
Posting Pro in Training

Re: How to retrieve table names

  #2  
Jan 15th, 2008
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
Shouvik_The_Expert_Coder
Have a problem? Don't worry just give me a call and I'll fix it for you.
Reply With Quote  
Join Date: Nov 2007
Location: Bangalore, India
Posts: 3,026
Reputation: nav33n has a spectacular aura about nav33n has a spectacular aura about 
Rep Power: 8
Solved Threads: 227
nav33n's Avatar
nav33n nav33n is online now Online
Posting Sensei

Re: How to retrieve table names

  #3  
Jan 15th, 2008
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.
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.

*PM asking for help will be ignored*
Reply With Quote  
Join Date: May 2007
Location: India
Posts: 493
Reputation: choudhuryshouvi is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 45
choudhuryshouvi's Avatar
choudhuryshouvi choudhuryshouvi is offline Offline
Posting Pro in Training

Re: How to retrieve table names

  #4  
Apr 5th, 2008
Ok....here is the code that I used....

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

regards
Shouvik
Last edited by choudhuryshouvi : Apr 5th, 2008 at 10:56 am.
Shouvik_The_Expert_Coder
Have a problem? Don't worry just give me a call and I'll fix it for you.
Reply With Quote  
Join Date: Nov 2007
Location: Bangalore, India
Posts: 3,026
Reputation: nav33n has a spectacular aura about nav33n has a spectacular aura about 
Rep Power: 8
Solved Threads: 227
nav33n's Avatar
nav33n nav33n is online now Online
Posting Sensei

Re: How to retrieve table names

  #5  
Apr 5th, 2008
Thanks
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.

*PM asking for help will be ignored*
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb MS SQL Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the MS SQL Forum

All times are GMT -4. The time now is 3:00 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC