rastkocvetkovic
Programmer
SHORT DESCRIPTION:
new_news.asp
1. INSERT new news (id generated by autonumber)
2. RETRIEVE ID from the new news (select max (id) from news)
3. UPDATE new news with it's own ID
PROBLEM: the retrieved id is not from currently inserted news, but from one's already stored in database.
SOLUTION: how could I FORCE INSERT to perform it's task before retrieval?
--------------------------------------------------------
LONG DESCRIPTION:
I'm inserting a new news on the same page and then retrieve it's ID to update one of it's fields with the same ID (that is necessary indeed because of the programs structure). No, the problem is that the retrieval of the new ID always retrieves the previous MAX id, not from the currently inserted news, although the insert is executed before the retrieval of the new ID. Is there any "Flush" functions that would make that done?
--------------------------------------------------------
Please help ASAP! Thanks in advance.
new_news.asp
1. INSERT new news (id generated by autonumber)
2. RETRIEVE ID from the new news (select max (id) from news)
3. UPDATE new news with it's own ID
PROBLEM: the retrieved id is not from currently inserted news, but from one's already stored in database.
SOLUTION: how could I FORCE INSERT to perform it's task before retrieval?
--------------------------------------------------------
LONG DESCRIPTION:
I'm inserting a new news on the same page and then retrieve it's ID to update one of it's fields with the same ID (that is necessary indeed because of the programs structure). No, the problem is that the retrieval of the new ID always retrieves the previous MAX id, not from the currently inserted news, although the insert is executed before the retrieval of the new ID. Is there any "Flush" functions that would make that done?
--------------------------------------------------------
Please help ASAP! Thanks in advance.