[V4CC] sql syntax question

Ruslan Zasukhin sunshine at public.kherson.ua
Wed Jun 6 00:15:01 CDT 2007


On 5/6/07 11:08 PM, "Dave Parizek" <david at parizek.com> wrote:

Hi Dave,

> I have a Cocoa newbie syntax question about syntax for using binds
> with SQL UPDATE statements:
> 
> 
> I am trying to use binds on an UPDATE sql statement in V4CC, with
> following syntax:
> 
> query =@ "UPDATE table1 SET field1 = :1, field2 = :2 WHERE field3 =
> 'some value'";
> 
> [binds addObject:stringValueForField1];
> [binds addObject:stringValueForField2];
> 
> int rows = [mDatabase sqlExecute:query bind:binds];
> 
> rows comes back as 0 even though everything looks right, some value
> exists in database, etc.
> 
> Is it that I am using binding wrong?
> 
> also, is this one legal?:
> query =@ "UPDATE table1 SET field1 = :1, field2 = :2 WHERE field3 = :3";
> 
> 
> Thanks for any help or directions where to look...!

Did you check example

    V4CC/Examples/SQL/Bind

-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina mailing list