#Deleted when entering new records.
Posted: Mon Jan 08, 2007 6:15 pm
First, the MS Access to MySql program is impressive. I was up and running in under five minutes! I converted a small database that uses a autocounter field as the primary key. After entering the record, all fields change to #Deleted. Closing and reopening the table works OK.
I've read a little about MS Access and the problem it has with just about every SQL database, including MSSql, and understand why this occurs. So my question is, how have others solved this problem?
I've also read about using the TIMESTAMP field as a substitute for the autocounter, but can't get this to work. It seems to fail for the same reason, Access doesn't know what the value is when SQL sets it.
One workaround I've had sucess with is changing the autocounter field to a text field and using the default=rnd() in the form. This function creates a random number. Using this method does not allow data entry in the table, but that is not a problem.
A related question is; how to create incrementing numbers for tables used for PurchaseOrder or Invoice systems.
I've read a little about MS Access and the problem it has with just about every SQL database, including MSSql, and understand why this occurs. So my question is, how have others solved this problem?
I've also read about using the TIMESTAMP field as a substitute for the autocounter, but can't get this to work. It seems to fail for the same reason, Access doesn't know what the value is when SQL sets it.
One workaround I've had sucess with is changing the autocounter field to a text field and using the default=rnd() in the form. This function creates a random number. Using this method does not allow data entry in the table, but that is not a problem.
A related question is; how to create incrementing numbers for tables used for PurchaseOrder or Invoice systems.