|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
How to trap error for duplicate key
Hi,
With VFP, I have created a Form based on remote view of a table in MS SQL Database, that have a primary key. If the record is new, after I have enter the primary key, I need to control if the code exist already. I have not problem with the dbf file, but I have some difficulty with SQL database. Someone can help me, in order to resolve this problem ? Thank you. Best Regards Gaetano |
|
#2
|
|||
|
|||
|
1 stored procedure call.
2 sqlexec 3 database container using filter ?id This is (2) method below. mConnHandle = SQLCONNECT('mydatabase','myuserid','mypassword') SQLSETPROP(mConnHandle,'QueryTimeout',9000) msql ="Select * from mytable where id=" + mykeyfield mfound =SQLEXEC(mconnHandle,mSQL,'NA') Bob@icdc.com |
![]() |
| Viewing: ASP Free Forums > Database > Microsoft SQL Server > How to trap error for duplicate key |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|