PDA

View Full Version : MvUpdate on a mivaSQL database


virtualkiwi
01-19-07, 05:51 AM
Someone correct me if I'm wrong, but, with a mivaSQL database (or mySQL for that matter)
to access records you use <mvopenview>
and to write them you use <mvquery>
also, <mvfind> does NOT work?

however in old Xbase syntax, you could mix and match
eg
<mvopen>
<mvfind>
[assign some values]
<mvupdate> or <mvadd>
<mvskip>
[and so on through the database]

What's the most efficient way to do this with a view?
Alternatively - with mivaSQL it is basically just a wrapper on top of xbase data, and the old mvx files are still hiding away so...
is it possible to do a standard
<mvopen name="blablabla" database="somedb.dbf" indexes="a.mvx, b.mvx etc">
on a mivaSQL database without breaking anything (assuming that one makes sure that all the indexes get updated?), or in other words, ignore the SQL bit and just directly mess with the Xbase files, but still be able to use mivaSQL at other times when that's more efficient?

Kent Multer
01-19-07, 10:18 AM
I don't know if anyone's tried mixing the xbase and SQL operations on a MivaSQL database. Seems risky ... the organization of filesand folders in Merchant 5 MivaSQL is different from Merchant 4's xbase files. And the index structure might be different, which means you'd get into trouble if you modified any data that was indexed.

MvOPENVIEW and MvQUERY provide enough features to read/create/edit/delete your data. There are some operations, like editing a single record, that can written more concisely with the xbase operations, so I can see why you're tempted. Hey, give it a try, and let us know what happens :^) .