By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,261 Members | 1,688 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,261 IT Pros & Developers. It's quick & easy.

Creation of the DB2 database

P: 9
Hi Everybody,

I want to create a new DB2 Databse When My Application Start First Time tell me the solution for this.i have create database command but it can't run. advance
Apr 19 '10 #1
Share this Question
Share on Google+
3 Replies

Expert 100+
P: 569
You really have to elaborate on your problem. What language, development environment, do you already have code? Does it give an error? What error?

Apr 19 '10 #2

P: 9
Expand|Select|Wrap|Line Numbers
  1. Dim file As FileInfo = New FileInfo(Path.GetFullPath("TextFile1.txt"))
  2. Dim backupScript As String = file.OpenText.ReadToEnd()
  3. Dim strCommand As String = backupScript
  4. 'Dim strConnection As String = "Driver={IBM DB2 ODBC DRIVER};Database=evaidya;Port=50000;Protocol=TCPIP ;Uid=db2Admin;Pwd=tatya;"
  5. Dim strConnection As String = "Provider=IBMDADB2;DSN=MyName;UID=MyID;PWD=MyPass; "
  8. Dim DBConnection As OleDbConnection = New OleDbConnection(strConnection)
  9. Dim cmdSoftware As New OleDbCommand(backupScript, DBConnection)
  10. DBConnection.Open()

The File TextFile1.txt contain the command For database creation.....
is :
Expand|Select|Wrap|Line Numbers
Apr 21 '10 #3

Expert Mod 5K+
P: 9,731
What is the problem?
What is the error your getting?
What is your program doing that is unexpected..or what isn't it doing that it is expected to do?

Apr 30 '10 #4

Post your reply

Sign in to post your reply or Sign up for a free account.