v3.5.1 - Begin, End, and RollBack Transactions?
barry at noodlebox.com.au
barry at noodlebox.com.au
Fri Feb 1 17:43:50 CST 2008
Hi All,
Have we got Begin, End, and RollBack Transactions sorted out for batch
updates yet?
I need to remove a number of related records in various tables and unlink
etc.
Thanks,
Barry G. Sumpter
-----Original Message-----
From: valentina-bounces at lists.macserve.net
[mailto:valentina-bounces at lists.macserve.net] On Behalf Of Walton Sumner
Sent: Saturday, 2 February 2008 8:27 AM
To: valentina at lists.macserve.net
Subject: Newbie having SQL select problems with array in 2.5.8
Here is a snippet of code that works only when the extra line is present:
function updateTable pName,pFieldList,pArray
local tKey, tCursor, tCount, tSQL, tItem, tValues, i, tResult
if pArray[1] = "" then return "Error: empty key value in array"
put "SELECT * FROM" && pName && "WHERE" && item 1 of pFieldList \
into tSQL
--THIS IS THE EXTRA LINE:
replace ":1" with "'" & pArray[1] & "'" in tSQL
put VDataBase_SqlSelect( sDatabase, tSQL,"kClientSide", \
"kReadWrite", "kForwardOnly", pArray ) into tCursor
get errorCheck()
put VCursor_RecordCount( tCursor ) into tCount
With the extra line, it works fine. Obviously I can loop through and do this
for each array element, but that would be ridiculous. Without the extra
line, tSQL looks something like this:
SELECT * FROM ICD_Term WHERE Code=:1
When the VDataBase_SqlSelect function is called,
tCursor becomes ERROR 0x7004
and my errorCheck() function says:
"Using clause required for dynamic parameters"
The documentation I have for Rev is "V4REV_Reference_3_en.pdf". It does not
say anything at all about Using clauses with select statements. Perhaps I am
trying to access features that 2.5.8 does not have. This would account for a
lot of my confusion (possibly including my inability to use the "SHOW
TABLES" statement). Apparently there used to be a
"V4REV_Reference_2_en.pdf", but I can not find it on the internet.
Questions:
1. Where can I get "V4REV_Reference_2_en.pdf"? Shouldn't this be available
to all superbundle purchasers? I can not find it installed with Valentina.
2. Should I be able to use :N notation in a 2.5.8 select statement? How?
Thanks,
Walt
_______________________________________________
Valentina mailing list
Valentina at lists.macserve.net
http://lists.macserve.net/mailman/listinfo/valentina
More information about the Valentina
mailing list