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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ODBC insert failure error

Status
Not open for further replies.

ProgramError

Programmer
Mar 2, 2005
1,027
GB
Dear all,

Having problems trying to add a record to a table with a form.
The DB is ODBC linked to a MySQL backend. Other tables allow me to add records to them but for some reason I am getting the error below with this one particular table.

Run-time Error '3155':
ODBC--insert on a linked table 'tblChannel' failed.

I can alter the information in records already in the table. I can add a record directly in the table but it will change the entered information to Delete# in each field (although it does retain the information and can be seen when the table is refreshed). But I cannot add more records through the form.

Any ideas?

Ian Mayor (UK)
Program Error
9 times out of 10 I know what I'm talking about. This must be my tenth reply.
 
I think I may have sorted this out. It often occurs but there seems to be very little in the internet searches to resolve it. So here goes.

Applies to MS Access 2003.
remove link to table causing problem.
Change Id field to not null/auto increment using backend admin program such as ~PHPMyAdmin~
Relink the table by ... get external data/ linktable/ odbc database/ tablename
?Choose Auto inc field you have just changed.
close the database.
open database.
reselect the record source of the forms which use the table.
(this refreshes the links)

Hope this helps someone



Ian Mayor (UK)
Program Error
9 times out of 10 I know what I'm talking about. This must be my tenth reply.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top