473,327 Members | 2,071 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

Creation of the DB2 database

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.



Thanks.......in advance
Apr 19 '10 #1
3 1111
MrMancunian
569 Expert 512MB
You really have to elaborate on your problem. What language, development environment, do you already have code? Does it give an error? What error?

Steven
Apr 19 '10 #2
@MrMancunian
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; "
  6.  
  7.  
  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
  1. CREATE DATABASE Temp AUTOMATIC STORAGE YES ON 'C:\' DBPATH ON 'C:\' USING CODESET IBM-1252 TERRITORY US COLLATE USING SYSTEM PAGESIZE 4096;
Apr 21 '10 #3
Frinavale
9,735 Expert Mod 8TB
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?

-Frinny
Apr 30 '10 #4

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

Similar topics

3
by: Hans Horn | last post by:
Howdy, is there a way to speed-up or tune the database creation? On my laptop (DB2-UDB PE) it takes 2 minutes to create a virgin database. This virgin, btw. is 30MBytes heavy. Is there a way to...
1
by: Borek | last post by:
Hello, I am getting the beforementioned error when trying to populate DataSet object with data taken from SQL2k database. Then I want to bind DataSet to GridView control. But when I use...
2
by: Rob Richardson | last post by:
Greetings! It seems to me that there is room for a lot of improvement in automatic generation of database objects. If I create a data adapter from a table shown in the Server Explorer, I get...
5
by: MLH | last post by:
A97 aborts creation of MDE reporting that there's a compile error in one form. Sure enough, if I remove the form from the source database and attempt to compile the MDE, it succeeds. But when I...
1
by: Jatinder | last post by:
How to give database creation privelege to a user on Windows? Regards, Jatinder
0
by: ShamnaPR | last post by:
Hi All, How to speed up the database creation in DB2.Am working in Windows platform( windows 2000). Its taking alot of time for me to create a database. can u help me for this. Thanks,...
1
by: Mrozik | last post by:
Hi! I have Web Application with forms authentication. Data and security model resides in Oracle database. I have 'login' page with MS 'Login' control. In my LoggingIn event for debug purposes I...
0
by: fiona | last post by:
Reading, Berkshire, UK 05 June 2007 - Crainiate Software make details available of the release of Objecto Framework 2.0, an upgrade to their enterprise business component framework, designed to...
3
by: Limunski Magarac | last post by:
Hi all :) My apologies if I posted in the wrong groups, but I just jumped in MS SQL waters, so any guidance will be appreciated. What I'm trying to do is the following process: present...
4
by: Bhushan12 | last post by:
Hi Experts, I have installed db2 8.1 on AIX 5.3 system, I am trying to create database using db2 control center. But DB creation is failing with error "SQL1224N A database agent could not be...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.