Results 1 to 3 of 3

Thread: Create Database

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2003
    Posts
    1

    Create Database

    Could someone explain briefly or point in a good
    direction. Am I able to build a database using vb.net
    2003 without having to already have a sql or access
    database to connect too? I cannot seem to find where I
    would start to create the tables and then the forms. In VB 6.0 there was "Vis Data Manager" for this process.

    Thanks

  2. #2
    Frenzied Member trisuglow's Avatar
    Join Date
    Jan 2002
    Location
    Horsham, Sussex, UK
    Posts
    1,536
    Something like this? You will need to include references to ADODB and ADOX (Microsoft ADO and MS ADO Extensions) to make it work

    VB Code:
    1. Private Sub CreateDatabase(ByVal FileName As String)
    2.  
    3.  
    4.         Dim Cat As New ADOX.Catalog()
    5.         Dim objTable As ADOX.Table
    6.  
    7.         Cat.Create("Provider=Microsoft.Jet.OLEDB.4.0;" & _
    8.                     "Data Source=" & FileName & ";" & _
    9.                     "Jet OLEDB:Engine Type=5")
    10.  
    11.         'Create storage for the version numbers.
    12.         objTable = New ADOX.Table()
    13.         objTable.Name = "tblVersions"
    14.         With objTable.Columns
    15.             'Store the version number of the application version that is saving
    16.             'this file.
    17.             .Append("CurrentVersion", adWChar)
    18.             'Store the version number of the oldest application version that is
    19.             'capable of reading this file.
    20.             .Append("EarliestVersion", adWChar)
    21.         End With
    22.         Cat.Tables.Append(objTable)
    23.  
    24.     End Sub
    This world is not my home. I'm just passing through.

  3. #3
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    No , there is no absolute reason to add ADODB , ADOX Library only required .
    http://www.vbforums.com/showthread.p...hreadid=251384

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width