Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. database problem in vb.net

database problem in vb.net

Scheduled Pinned Locked Moved Visual Basic
csharpdatabasehelp
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    amaneet
    wrote on last edited by
    #1

    Sir/Madam, Can I programically find out whether the particular table exist in the database or not. Thanks abd Regards

    W C 2 Replies Last reply
    0
    • A amaneet

      Sir/Madam, Can I programically find out whether the particular table exist in the database or not. Thanks abd Regards

      W Offline
      W Offline
      Walter_H
      wrote on last edited by
      #2

      you can do this by querying the DataSet's table-Collection with the method Contains. e.g: Dim ds As New DataSet ... If ds.Tables.Contains("YourTableName") Then ... End If - walter

      C 1 Reply Last reply
      0
      • A amaneet

        Sir/Madam, Can I programically find out whether the particular table exist in the database or not. Thanks abd Regards

        C Offline
        C Offline
        Colin Angus Mackay
        wrote on last edited by
        #3

        amaneet wrote:

        Can I programically find out whether the particular table exist in the database or not.

        Yes, however the exact query depends on the database. For example, in SQL Server 2000 the query

        SELECT * FROM INFORMATION_SCHEMA.TABLES

        gives you your starter for 10.


        Upcoming Scottish Developers events: * Glasgow: Tell us what you want to see in 2007 My: Website | Blog | Photos

        1 Reply Last reply
        0
        • W Walter_H

          you can do this by querying the DataSet's table-Collection with the method Contains. e.g: Dim ds As New DataSet ... If ds.Tables.Contains("YourTableName") Then ... End If - walter

          C Offline
          C Offline
          Colin Angus Mackay
          wrote on last edited by
          #4

          He said database, not DataSet.


          Upcoming Scottish Developers events: * Glasgow: Tell us what you want to see in 2007 My: Website | Blog | Photos

          W 1 Reply Last reply
          0
          • C Colin Angus Mackay

            He said database, not DataSet.


            Upcoming Scottish Developers events: * Glasgow: Tell us what you want to see in 2007 My: Website | Blog | Photos

            W Offline
            W Offline
            Walter_H
            wrote on last edited by
            #5

            your're right! sorry - walter

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups