jennx
2007-02-23T06:04:00Z
I am using a custom form. I have a primary key with the following mysql statement (select max(eventID) + 1 from event). When I press the test button, that select statement brings back the next integer from the table.

However, it doesn't actually update the table with that number.
If I turn off auto-increment on the table, nothing posts to the database with I click store item, though I get no errors. @@Identity returns 0.

I currently have the primary key visible in my custom form. Nothing is updated to it when I hit store item. I have another mandatory key that selects {WINDOW_USER). That field doesn't update the database or the form unless I hit Store Item twice. That makes 2 entries.

I'm out of ideas.
Sponsor
GeniusConnect documentation search (User Manual Downloads...)
Administrator
2007-02-23T09:43:00Z
"I am using a custom form. I have a primary key with the following mysql statement (select max(eventID) + 1 from event). When I press the test button, that select statement brings back the next integer from the table.
However, it doesn't actually update the table with that number."

The test button executes the statement your enter, so a select statement will never update a table!?

Are you using the select select max(.. or select @@Identity ?
jennx
2007-02-23T18:11:00Z
I tried both. @@IDENTITY definitely doesn't work. I deleted everything and started over with a redone odbc object and now MAX works. However, now I can no longer activate the product. I sent an email to that effect and hope to hear back on that soon. Thanks!