How to create db2 Database programmatically in vb.net

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Tatyasaheb Patil
    New Member
    • Apr 2010
    • 1

    How to create db2 Database programmatically in vb.net

    Dim file As FileInfo = New FileInfo(Path.G etFullPath("Tex tFile1.txt"))
    Dim backupScript As String = file.OpenText.R eadToEnd()
    Dim strCommand As String = backupScript
    Dim strConnection As String = "Provider=IBMDA DB2;DSN=evaidya ;UID=db2admin;P WD=tatya;"


    Dim DBConnection As OleDbConnection = New OleDbConnection (strConnection)
    Dim cmdSoftware As New OleDbCommand(ba ckupScript, DBConnection)
    DBConnection.Op en()

    cmdSoftware.Exe cuteNonQuery()
  • KishorDhembare
    New Member
    • Apr 2010
    • 9

    #2
    Originally posted by Tatyasaheb Patil
    Dim file As FileInfo = New FileInfo(Path.G etFullPath("Tex tFile1.txt"))
    Dim backupScript As String = file.OpenText.R eadToEnd()
    Dim strCommand As String = backupScript
    Dim strConnection As String = "Provider=IBMDA DB2;DSN=evaidya ;UID=db2admin;P WD=tatya;"


    Dim DBConnection As OleDbConnection = New OleDbConnection (strConnection)
    Dim cmdSoftware As New OleDbCommand(ba ckupScript, DBConnection)
    DBConnection.Op en()

    cmdSoftware.Exe cuteNonQuery()
    The problum of Db2 database creation can not be solved yet.
    You have one alternative that first take DDL of the database Export the all table save that commands in the file.


    At the time of Setup Application First Create Database using the DDL Of your database.


    Execute the Exported Command for Getting The Table Data.

    Comment

    Working...