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 = "Driver={IB M DB2 ODBC DRIVER};Databas e=evaidya;Port= 50000;Protocol= TCPIP;Uid=db2Ad min;Pwd=tatya;"
Dim strConnection As String = "Provider=IBMDA DB2;DSN=MyName; UID=MyID;PWD=My Pass;"
Dim DBConnection As OleDbConnection = New OleDbConnection (strConnection)
Dim cmdSoftware As New OleDbCommand(ba ckupScript, DBConnection)
DBConnection.Op en()
The File TextFile1.txt contain the command For database creation.....
is :
CREATE DATABASE Temp AUTOMATIC STORAGE YES ON 'C:\' DBPATH ON 'C:\' USING CODESET IBM-1252 TERRITORY US COLLATE USING SYSTEM PAGESIZE 4096;
This Command Runs on DB2 command editor.....But without get connected to other database....if we first connect to any database and then run this command then it not run....it gives an error...
Is Any Problum In The Code Please Tell Me ........
Dim backupScript As String = file.OpenText.R eadToEnd()
Dim strCommand As String = backupScript
'Dim strConnection As String = "Driver={IB M DB2 ODBC DRIVER};Databas e=evaidya;Port= 50000;Protocol= TCPIP;Uid=db2Ad min;Pwd=tatya;"
Dim strConnection As String = "Provider=IBMDA DB2;DSN=MyName; UID=MyID;PWD=My Pass;"
Dim DBConnection As OleDbConnection = New OleDbConnection (strConnection)
Dim cmdSoftware As New OleDbCommand(ba ckupScript, DBConnection)
DBConnection.Op en()
The File TextFile1.txt contain the command For database creation.....
is :
CREATE DATABASE Temp AUTOMATIC STORAGE YES ON 'C:\' DBPATH ON 'C:\' USING CODESET IBM-1252 TERRITORY US COLLATE USING SYSTEM PAGESIZE 4096;
This Command Runs on DB2 command editor.....But without get connected to other database....if we first connect to any database and then run this command then it not run....it gives an error...
Is Any Problum In The Code Please Tell Me ........