LiveCode/Valentina - SQL INSERT with bindings returns error

Ruslan Zasukhin ruslan_zasukhin at valentina-db.com
Thu Jun 28 04:15:53 CDT 2012


On 6/27/12 2:43 PM, "Mike Bonner" <bonnmike at gmail.com> wrote:

> Sorry, was replying to another message and seem to have accidently wiped out
> the question text.  Sec and I'll add the question to it. 
> 
> 
> Here is the original. Sorry, I shouldn't answer things this early in the
> morning. (This Was from wtng)
> 
> BACKGROUND: I have 4 entry fields (name is prefix with efŠ.) on a livecode
> stack and an ADD button. Database/Table/Field references all done and stable
> in card script.
>  
> When I enter:
>  
>    put field efCode into tArray[1]
>    put field efCost into tArray[2]
>    put field efDescription into tArray[3]
>    put field efPrices into tArray[4]
>       
>    get VDatabase_SqlExecute (mDatabase, "INSERT INTO pricelist (code, cost,
> description, prices) VALUES (:1,:2, :3, :4);", tArray)
>  
>  
> This fails with the error:  ³7004 Using clause required for dynamic
> parameters.²
> I did not expect this as the V4Rev reference does not have ¹USING¹ in this
> function¹s syntax.
>  
> Have I missed something?

Yes Mike,

Note that in our example, we send array in double quotes


  put VDatabase_SqlExecute( mDBRef, inQuery, "bindArray" ) into rows


This is because external of LiveCode need NAME of object to access it



-- 
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