FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour What is the best of MySql (lib or class) TMySql, TDolphin
Posts: 129
Joined: Sun Oct 09, 2011 03:50 PM
Re: What is the best of MySql (lib or class) TMySql, TDolphin
Posted: Sun Aug 19, 2012 03:58 PM
Daniel Garcia-Gil wrote:
method 2
Code (fw): Select all Collapse
    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
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 PM
Re: What is the best of MySql (lib or class) TMySql, TDolphin
Posted: Sun Aug 19, 2012 05:14 PM
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/insert-on-duplicate.html )
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 PM
Re: What is the best of MySql (lib or class) TMySql, TDolphin
Posted: Sun Aug 19, 2012 05:15 PM

for more support about TDolphin you can open a new thread...

Continue the discussion