Toad World® Forums

Automation Import to MySQL fails on Auto increment field


#1

Hello,
I am unable to import a result set from Oracle to a MySQL database. This appears to be due to Toad’s insert statement including NULL for the auto-increment field. In an earlier thread in the SQL Server forum I saw there was a “identity inserts” checkbox in the Select Target window of the Import wizard which isn’t available on the window for my MySQL import. Not sure if that is related or not. Here is that thread: http://toadforsqlserver.com/thread.jspa?threadID=36690

I have tried with the Default ODBC driver and the MySQL ODBC 5.1 driver with the

I can insert fine using my own insert statement: INSERT INTO TestID (somevalue) VALUES (‘Canada’)

same results. Here is the error:
12/26/2012 7:52:15 AM: Import file name:
12/26/2012 7:52:15 AM: Import using connection: root@localhost (Controls)
12/26/2012 7:52:15 AM: Table Importing to: testid
12/26/2012 7:52:17 AM: Null value cannot be inserted to not null column idTestID
12/26/2012 7:52:17 AM: Null value cannot be inserted to not null column idTestID
12/26/2012 7:52:17 AM: Null value cannot be inserted to not null column idTestID
12/26/2012 7:52:17 AM: Null value cannot be inserted to not null column idTestID
12/26/2012 7:52:17 AM: Inserting row 4 into table testid
12/26/2012 7:52:17 AM: 4 rows from file were processed.
12/26/2012 7:52:17 AM: A total of 0 out of 4 rows were imported to table testid.

create_table_script.sql (198 Bytes)

data_import_wizard.bmp

insert_verbose_error_log (3.54 KB)

testID.tas (4.72 KB)

testID.tim (728 Bytes)


#2

Here’s my version info:
Toad Data Point 3.2.0.916
ToadAutomation 5.0.0.916


#3

Verified this has been fixed in 3.3 Beta. However, updating appears to have removed by project files. I will look to see if they have been backed up somewhere. They aren’t visible in 3.2. or 3.3. now.


#4

You can manually fix this. Using the Help box go to the Application Data Dir. In the ModuleSettings dir there is a file named Projectmanager.xml. Change the path to the currentPMFile id element. Or you could also copy over your ProjectManager.tpf from your last TDA app to this app dir. Either way will solve the issue.

This sounds like a product of not migrating the settings.

Debbie