Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Tables to DB2 from Microsoft access

Status
Not open for further replies.

petold

Programmer
Sep 18, 2002
9
SE
Hi all.
Im trying to copy tables from Microsoft access to IBM DB2. I've managed to create connection between the 2 Db´s through DB2 ODBC. I've also succeeded in copy one table to DB2. Now to the problem: DB2 doesn´t seem to understand the primary key set in MS access so I need to do that manually in DB2 but when Im try to change the column i get an error message that I need to give that column a NOT NULL value. OK, I understand that, but when Im trying to change it through the GUI that option is grayed out and I cannot change it. I hope you guys understand my problem, Im swedish so Im trying my best to explane this in english :)

I´ve only around 20 tables and I dont want to write SQL-code for every table. I know that this can be done, I´ve seen it before somewhere. Please help me.

regards

Peter
 
Peter,

Export the table contents in IXF format
Extract the table DDL (for creating the table again)
Edit the DDL with the extra not null option on the field.
Drop the table, recreate it using DDL and import using the IXF file.

Will only work if the particular field stores no null values for it's current data of course

By the way, your English seems okay to me (and I am dutch)




T. Blom
Information analyst
tbl@shimano-eu.com
 
Mr Blom.
Thx for the answer. I'm not so familiar with DDL and IXF files though. I've done what you said down to drop the table. Recreating it using the ddl and import using the IFX file makes me have to stop cause I dont know how to do it. Plese guide me some more. I will try to make it work but I´ve already pushed every button I can think of :)

Please keep in touch.

regards

//Peter.
 
MR.Blom

I got it........I thank you for your help......
I understand how I have to do it right after I wrote the last message. Thats typical, you wait to write a reply untill you tried everything and when you write a reply you immediatlly understand how to do it.LOL

Again. Thx for your excellent help.

Regards

//Peter
 
Hey Petold I am on the same problem that you was trying to take an mdb database to db2. Could you explain me how do you fix it... and i don't know how to create that IFX and DDL files... thank you...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top