Page 7 of 7

Re: What is the best of MySql (lib or class) TMySql, TDolphin

Posted: Sun Aug 19, 2012 3:58 pm
by mosh1
Daniel Garcia-Gil wrote: method 2

Code: Select all

    oServer:Update( "table_name",  { "account", "balance" }, { 'sobachka', 3.14 } , "account = 'dog' " )

I rebuilt library from source you send me

oServer:InsertFromDbf("table_name, "alias_name", alias->(reccount()), aFldNames )

gives me an error :

Error BASE/1102 Argument error: UPPER
=> UPPER line 0
=> (b)TDOLPHINSRV_INSERTFROMDBF line 1586
=> ASCAN line 0
=> TDOLPHINSRV:INSERTFROMDBF line 1586
=> MAIN line 59

Re: What is the best of MySql (lib or class) TMySql, TDolphin

Posted: Sun Aug 19, 2012 5:14 pm
by Daniel Garcia-Gil
mosh1 wrote:oServer:InsertFromDbf("table_name, "alias_name", alias->(reccount()), aFldNames )
the parameters are wrong

please check testdbi.prg

method definition from Class TDolphinsrv

METHOD InsertFromDbf( cTable, cAlias, nLimit, aStruct, bOnInsert, cDuplicateKey )
/*insert new rows into an existing table from DBF file,
the table should be contain same fieldname that DBF */

cTable = table name where will be inserted
cAlias = Alias of DBF that contains the data
nLimit = total row will be inserted each time, by default is 500
aStruct = arrays with fields name, should be same name in DBF and Table, by default is DBF Fields
bOninsert = codeblock will be execute each "INSERT"
cDuplicateKey = condition on "ON DUPLICATE KEY UPDATE" in statement "INSERT" ( http://dev.mysql.com/doc/refman/5.0/en/ ... icate.html )

Re: What is the best of MySql (lib or class) TMySql, TDolphin

Posted: Sun Aug 19, 2012 5:15 pm
by Daniel Garcia-Gil
for more support about TDolphin you can open a new thread...