General DB Question


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: General DB Question

Hybrid View

  1. #1
    Aravind Guest

    General DB Question


    I have a question.
    The question is that the user gives me an access string to the database(oledb
    or odbc connection string) and i should be able to check the database connection
    and then try to see if a particular table exists . The database can be anything
    sqlserver, oracle, sybase etc.Is there a common way to check if the tables
    exist for all these databses.
    Thanks in advance for ur response.

    Aravind

  2. #2
    Daryl Shockey Guest

    Re: General DB Question


    There is a standard query that you can run on any fully SQL-92 compliant DBMS.
    This generally includes all high end DBMS's like SQL Server, Oracle, and
    Sybase. Let's assume you had a database called "MyDB" and you wanted to
    see what tables it has. The query would read: "select TABLE_NAME from MyDB.INFORMATION_SCHEMA.TABLES".
    You can also modify the query to order the results and look for specific
    tables. Hope this helps...

    --> Daryl Shockey

    >I have a question.
    >The question is that the user gives me an access string to the database

    oledb
    >or odbc connection string) and i should be able to check the database connection
    >and then try to see if a particular table exists . The database can be anything
    >sqlserver, oracle, sybase etc.Is there a common way to check if the tables
    >exist for all these databses.
    >Thanks in advance for ur response.
    >
    >Aravind



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center