Using SQL Update Instead of Clarion's Update 
Author Message
 Using SQL Update Instead of Clarion's Update

I've run into a problem while working on a program.  I tried to use

ACCEPT:TBLNAME.Update()

Into a SQL Server Database.  I got an error about duplicate primary
keys.

Is there an easy way for me to write code to simply use "UPDATE" from
the SQL Commands instead of using Clarion's Update?



Sat, 05 Jun 2004 05:31:23 GMT  
 Using SQL Update Instead of Clarion's Update
This usually happens when you haven't filled the buffer with a fetch before
trying to update.  First do a fetch using the primary key, change the fields
that need to be changed then do the update.

And yes you can use SQL to do the update if you want simple use the {Prop:SQL}
syntax

MyFile{PROP:SQL} = 'Update MyFile SET Field1 = ' &  NewField1 & ',Field2 = '''
& NewField2 &''' and where PrimaryField = ' & Loc:PrimaryField.  Where Field 1
is a numerical and field2 is a string.

Dave Potter

Quote:
>I've run into a problem while working on a program.  I tried to use

>ACCEPT:TBLNAME.Update()

>Into a SQL Server Database.  I got an error about duplicate primary
>keys.

>Is there an easy way for me to write code to simply use "UPDATE" from
>the SQL Commands instead of using Clarion's Update?



Tue, 08 Jun 2004 12:38:02 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Can't Update Database using Fujitsu SQL command

2. C4c Pervasive SQL Can't UPDATE

3. UPDATE: Tcl'97 Tcl Update Talk

4. SQL Server and Disappearing Updates

5. Drop-down combo update update

6. Call an update from an update...C4?

7. Where does SQL go to update EIP Browse

8. update not updating

9. Update Browse when Update Form still active

10. Updating from a prop:sql select

11. Having an Update window trigger is parent Browse to update

12. SQL Server2000 record update problems

 

 
Powered by phpBB® Forum Software