Subject | RE: [IBO] Having problems with syntax for IB_Query.Locate on multiple fields |
---|---|
Author | Roger Vellacott |
Post date | 2006-06-14T17:03:59Z |
Oops, brackets not quite right. Try
IB_Query.Locate('IDENTITY;SURNAME',VarArrayOf([1004,'FREEZER']),[]) then
Roger Vellacott
-----Original Message-----
From: Adrian Wreyford [mailto:wreymed@...]
Sent: 14 June 2006 17:49
To: IBObjects@yahoogroups.com
Subject: [IBO] Having problems with syntax for IB_Query.Locate on
multiple fields
Dear List
I have a table TEST with key field composed of two fields: identity and
surname.
I test if the record allready exists before inserting a new record.
I use:
IB_Query.Locate('IDENTITY;SURNAME','1004;FREEZER',[]) then
Edit ..
Else
Insert ..
The record 1004,freezer exists, but the locate does not locate it, and
then
when inserting I get obviusly expected error violation of PK.
I know it has something to do with my locate syntax on multiple fields
..
first time I'm trying it on a compound PK.
Any suggestions?
Thanks in advance
Adrian
[Non-text portions of this message have been removed]
IB_Query.Locate('IDENTITY;SURNAME',VarArrayOf([1004,'FREEZER']),[]) then
Roger Vellacott
-----Original Message-----
From: Adrian Wreyford [mailto:wreymed@...]
Sent: 14 June 2006 17:49
To: IBObjects@yahoogroups.com
Subject: [IBO] Having problems with syntax for IB_Query.Locate on
multiple fields
Dear List
I have a table TEST with key field composed of two fields: identity and
surname.
I test if the record allready exists before inserting a new record.
I use:
IB_Query.Locate('IDENTITY;SURNAME','1004;FREEZER',[]) then
Edit ..
Else
Insert ..
The record 1004,freezer exists, but the locate does not locate it, and
then
when inserting I get obviusly expected error violation of PK.
I know it has something to do with my locate syntax on multiple fields
..
first time I'm trying it on a compound PK.
Any suggestions?
Thanks in advance
Adrian
[Non-text portions of this message have been removed]