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

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

Postby mosh1 » Sun Aug 19, 2012 3:58 pm

Daniel Garcia-Gil wrote:method 2
Code: Select all  Expand view  RUN
   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
mosh1
 
Posts: 129
Joined: Sun Oct 09, 2011 3:50 pm

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

Postby Daniel Garcia-Gil » Sun Aug 19, 2012 5: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 )
User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita

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

Postby Daniel Garcia-Gil » Sun Aug 19, 2012 5:15 pm

for more support about TDolphin you can open a new thread...
User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 11 guests