ASP Insert twice the same record

A

Abdel72

Hello,

This is my environement :
IE 5.5
IIS 5
Oracle Database
ODBC

I have an asp page in which i post an insert in a table using ODBC. All
of the times i get two records inserted in the table... I have tried
separating the insert code in another page, which redirect to another
page for a kind of confirmation ... But still insert twice!!!

Any help please !
 
S

Stevie_mac

I have seen this before - i didn't investigate too much, i just used a test
like...

if ViewState("RecordAdded") = True then
return
else
ViewState("RecordAdded") = True
FncThatDoesInsert("Some Data...")
end if

since the page loads with ViewState("NewRecordAdded") being nothing, the
'If' test fails 1st time & the insert is done. Following times, the 'If'
test is True & no insert is done.

Ofcourse, this is not root cause prevention - only a work around!
 
A

Alvin Bruney

how are you posting? what is causing your post? clientside or server side
control?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top