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

SysID not available on Insert

Status
Not open for further replies.

PxTech

Programmer
Nov 29, 2006
3
US
I thought when I press insert from a browse that the record was created and auto incremented fields would have their values when the update form was opened.

I am using MySQL - ODBC and the SysID field (primary key) stays unavailable until the OK button is pressed.

How can I access the SysID value before that?
 
Hi!

Is the Auto-Incrementing happenning on the Client Side (Clarion) or the Server (Database)? Also, what version of Clarion are you using? Support for automatically fetching server-generated SysID's was introduced in C63 only.

Regards
 
I'm pretty sure the Auto-Incrementing is happening at the Server. I am currently using v5.5. It sounds like upgradeing to the current version will solve my problem. I will do that with my next check.

Thank you.
 
Hi!

Since you are using C55, you have a few choices :

1. If there is any other UNIQUE Key to retrieve the row/record which DOES NOT contain the SysID column, you can use that to retrieve the row/record. If you do not have one, you can consider creating one.

2. If you are storing the User Name, Date/Time Stamp on the Row/Record, you can store the MAXIMUM SysID before Inserting the new row/record and after Insertion, you can use PROP:SQL to retrieve the SysID which is greater than the Maximum SysID and matches the User Name and Date/Time Stamp.

Regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top