PDA

View Full Version : VM Bug or am I a moron?


Keith Hunniford
06-14-06, 09:57 PM
Am I a moron, or is MvOPENVIEW the mechanism to do database updates / inserts?

Any such call crashes MIA for me, including a simple example like this:

<MvOPENVIEW NAME = "greetings"
VIEW = "v"
QUERY = "update partners set partnerid='xxx' where partnerid='yyy' ">

Am I alone?

Keith

wmgilligan
06-14-06, 10:27 PM
<MvQUERY NAME="Merchant"
QUERY = "{ 'UPDATE ' $ g.Store_Table_Prefix $ 'VIEWNAME
SET
Field1 = ?,
Field2 = ?,
Field3 = ?,
field4 = ?
WHERE
Field1 = ?' }"
FIELDS="l.field1,l.field2,l.field3,l.field4 ">

Keith Hunniford
06-14-06, 10:35 PM
Cool.. so for completion / documentation sake:

WRONG:
<MvOPENVIEW NAME = "greetings"
VIEW = "v"
QUERY = "update partners set partnerid='xxx' where partnerid='yyy' ">

RIGHT:
<MvQUERY NAME = "greetings"
QUERY = "update partners set partnerid='xxx' where partnerid='yyy ">

Thanks.. I'm getting there.

Keith

Bruce - PhosphorMedia
06-15-06, 12:04 AM
damn...i wanted to answer that question <G>.

Keith Hunniford
06-15-06, 12:21 AM
Bruce,

Don't worry. Another opportunity to call me a moron will no doubt come along shortly.

.. and in the meantime I'm creating my latest project with dbf files ;-)

Keith

mvmarkus
06-15-06, 09:37 AM
RIGHT:
<MvQUERY NAME = "greetings"
QUERY = "update partners set partnerid='xxx' where partnerid='yyy ">
Keith


I am puzzled: How can this work with an uneven number of apostrophes (asciichar(39))? Wouldn't even the compiler start calling you names ???? (it did that to me....)

Here another variation:

<MvQUERY NAME = "greetings"
QUERY = "{'update partners set partnerid=\'xxx\' where partnerid=\'yyy\''}">

Markus

wmgilligan
06-15-06, 03:31 PM
<MvQUERY NAME = "greetings"
QUERY = "{'update partners set partnerid=xxx where partnerid=yyy'}">

Thats what I thought Keith actually meant...