|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Dupplicate problems inserting record in the database
Originally posted by : Ezio (samarelli@altavista.com)Hi to all,I've a problem inserting record in the database across ASP and IIS4/5;The problem is that if I write a script that insert a record in the database eg.Once the script has been executed and the "Thank you" message appears, if I reload the page the system create another record with the same data.I have found a workarround using the Session object of ASP but if an user disable cookie for the session the script would not work properly.Is it possible to avoid dupplicate problem without using the session object?Thank you,
|
|
#2
|
|||
|
|||
|
Originally posted by : deepu (guypreach@yahoo.com)hiUse the following condition in the query to avoid duplicate records.It works. Coolcn.Execute "IF NOT EXISTS (Select * from MyTable Where name=name of the input value) INSERT INTO myTable(name,age) values('ezio',27)".------------Ezio at 9/5/2001 3:34:13 AMHi to all,I've a problem inserting record in the database across ASP and IIS4/5;The problem is that if I write a script that insert a record in the database eg.Once the script has been executed and the "Thank you" message appears, if I reload the page the system create another record with the same data.I have found a workarround using the Session object of ASP but if an user disable cookie for the session the script would not work properly.Is it possible to avoid dupplicate problem without using the session object?Thank you,
|
![]() |
| Viewing: ASP Free Forums > Database > SQL Development > Dupplicate problems inserting record in the database |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|