topic
stringlengths 1
63
| text
stringlengths 1
577k
⌀ |
|---|---|
ADODB MySql! ( Solved! )
|
Armando,
Work perfectly!
But, with TxBrowse... How I can set the recordSet for it?
|
ADODB MySql! ( Solved! )
|
Júlio César M. Ferreira
Please visit my blog you'll find a sample with TXbrowse & Recordset
Regards
|
ADODB MySql! ( Solved! )
|
Armando,
I make! My xBrowse now opens the oRs from my database.
But, when I execute a select... then the give me a error!
If I execute the query: "SHOW TABLES" -> That's all ok!
But, if I execute the query: "SELECT * FROM my_table" -> error RECORDCOUNT!
[code:15cglhlh]oCon := TOleAuto():new( "ADODB.Connection" )
oCon:connectionString := "Driver={MySQL ODBC 5.1 Driver}" + ;
";Server=localhost" + ;
";DefaultDatabase=aservit" + ;
";Database=aservit" + ;
";Port=3306" + ;
";User=myuser" + ;
";Password=mypass" + ;
";Option=3;"
oCon:open()[/code:15cglhlh]
[img:15cglhlh]http://lh5.ggpht.com/_sT5-i02vGTY/SXoxbrkMaNI/AAAAAAAAAUc/iCQ87Efc4qU/s800/connectionString.JPG[/img:15cglhlh]
[code:15cglhlh]oRs:cursorLocation := 3 //adUseClient
oRs:lockType := 3 //adLockOptimistic
oRs:cursorType := 2 //adOpenDynamic
oRs:source := "select * from plano_contas"
oRs:activeConnection( oCon )
oRs:open()[/code:15cglhlh]
[img:15cglhlh]http://lh6.ggpht.com/_sT5-i02vGTY/SXoxbbXeVlI/AAAAAAAAAUU/nGRazrKBfGk/s800/showError.JPG[/img:15cglhlh]
Why?
|
ADODB MySql! ( Solved! )
|
Júlio César:
Are you sure the table has records ?, or is an empty table ?
Regards
|
ADODB MySql! ( Solved! )
|
>> Are you sure the table has records ?, or is an empty table ?
Yes Armando, 17676 records into a table!
|
ADODB MySql! ( Solved! )
|
Julio César:
Could you post the code to create the recordset ?
Regards
|
ADODB MySql! ( Solved! )
|
Armando,
This is the source:
[code:5cgk0uu3]TRY
oRs := TOleAuto():New("adodb.recordset")
CATCH oError
showError( oError )
oRs := NIL
RETURN( .F. )
END
oRs:CursorLocation := adUseClient
oRs:LockType := adLockOptimistic
oRs:CursorType := adOpenDynamic
oRs:Source := "SELECT * FROM plano_contas"
oRs:ActiveConnection( oCon )
TRY
oRs:Open()
CATCH oError
showError(oError)
RETURN( .F. )
END[/code:5cgk0uu3]
|
ADODB MySql! ( Solved! )
|
Julio:
Ummmm, perhaps it must to be the permissions of the user.
Regards
|
ADODB MySql! ( Solved! )
|
Armando,
I has used the GRANT ALL command for the user, with all privileges.. And, with the MySQL Query Browser, I can execute this query.
|
ADODB MySql! ( Solved! )
|
Julio,
put the variable [b:2gqgfbsh]oRs[/b:2gqgfbsh] as [i:2gqgfbsh]static[/i:2gqgfbsh] or [i:2gqgfbsh]public[/i:2gqgfbsh] at the beginning of your main prg and try.
|
ADODB MySql! ( Solved! )
|
Armando,
I tried execute this code into a database with many tables... all they empty. When the same table are filled and I execute the same code again... then return to me a error RECORCCOUNT
|
ADODB MySql! ( Solved! )
|
Antonio and friends,
This is my example for testing!
Please, modify and check!
<!-- m --><a class="postlink" href="http://rapidshare.com/files/189783905/ADODB.zip.html">http://rapidshare.com/files/189783905/ADODB.zip.html</a><!-- m -->
|
ADODB MySql! ( Solved! )
|
Exists any incompatibility with fields like timestamp?
|
ADODB MySql! ( Solved! )
|
[quote="JC":1xpsa8pp]Antonio and friends,
This is my example for testing!
Please, modify and check!
<!-- m --><a class="postlink" href="http://rapidshare.com/files/189783905/ADODB.zip.html">http://rapidshare.com/files/189783905/ADODB.zip.html</a><!-- m -->[/quote:1xpsa8pp]
I get
[quote:1xpsa8pp]Application
===========
Path and name: E:\FWXHARB\ADODB.EXE (32 bits)
Size: 1,675,264 bytes
Time from start: 0 hours 0 mins 5 secs
Error occurred at: 01/26/09, 20:26:40
Error description: Error ADODB.RecordSet/6 DISP_E_UNKNOWNNAME: ACTIVECONNECTION
Args:
[ 1] = L .F.
Stack Calls
===========
Called from: source\rtl\win32ole.prg => TOLEAUTO:ACTIVECONNECTION(0)
Called from: ADODB.prg => MYSQLRECORDSET(152)
Called from: ADODB.prg => EXECCONNECTION(29)
Called from: ADODB.prg => MAIN(14)[/quote:1xpsa8pp]
EMG
|
ADODB MySql! ( Solved! )
|
Enrico,
You must be change the connectionString to your own configutarion:
[code:d192fo8o]cConnectionString := "Driver={MySQL ODBC 5.1 Driver}" + ;
";Server=127.0.0.1" + ;
";DefaultDatabase=genesis" + ;
";Database=aservit" + ;
";Port=3306" + ;
";User=genesis" + ;
";Password=genesis" + ;
";Option=3;"[/code:d192fo8o]
|
ADODB MySql! ( Solved! )
|
Sorry, I haven't MySql to test your sample.
EMG
|
ADODB MySql! ( Solved! )
|
[quote="Enrico Maria Giordano":klnqlf59]Sorry, I haven't MySql to test your sample.
EMG[/quote:klnqlf59]
Don't have problem Enrico.. <!-- s;) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";)" title="Wink" /><!-- s;) -->
|
ADODB MySql! ( Solved! )
|
Julio:
I have tested your code, I modify the connection string (obviously), and
It works fine to me!.
Look
[url=http://imageshack.us:d1ocwlpd][img:d1ocwlpd]http://img187.imageshack.us/img187/8126/clip10jq5.jpg[/img:d1ocwlpd][/url:d1ocwlpd]
[url=http://imageshack.us:d1ocwlpd][img:d1ocwlpd]http://img300.imageshack.us/img300/1788/clip11bz6.jpg[/img:d1ocwlpd][/url:d1ocwlpd]
[url=http://imageshack.us:d1ocwlpd][img:d1ocwlpd]http://img185.imageshack.us/img185/8879/clip13eo0.jpg[/img:d1ocwlpd][/url:d1ocwlpd]
NOTE: I use 3.51 driver
Regards
|
ADODB MySql! ( Solved! )
|
Armando,
The problem is with fields that's type is timestamp!
|
ADODB MySql! ( Solved! )
|
Dear friends,
Maybe the error is on datatype convertion of xHarbour, for fields like TIMESTAMP!
If you make a cast convertion, works!
reg_id = numeric, auto_increment, not null
reg_data = timestamp, notnull, default '0000-00-00 00:00:00'
reg_update = timestamp, notnull, default '0000-00-00 00:00:00'
Error:
[code:3h3lhcuj]SELECT reg_id, reg_data, reg_update FROM mytable ORDER BY reg_update DESC[/code:3h3lhcuj]
When the field is filled with any value like '2009-01-27 16:42:25', the ADO return this value like this 2009-01-27, as date
Ok:
[code:3h3lhcuj]SELECT reg_id, CAST( reg_data AS CHARACTER ) AS reg_data, CAST( reg_update AS CHARACTER ) AS reg_update FROM mytable ORDER BY reg_update DESC[/code:3h3lhcuj]
In this case, any value of field return a value like this '2009-01-27 16:42:25' as string (because typecast)
And xBrowse do not show the complete value of field... only the data part!
|
ADODB MySql! ( Solved! )
|
Someboby?
|
ADODB MySql! ( Solved! )
|
I still have the problem, if somebody can help me.. thanks
|
ADODB MySql! ( Solved! )
|
Dear friends,
Thanks for all! I can make this! Now, all it's ok with ADBODB.Connection, ADBODB.RecordSet and ADBODB.Stream with MySQL, PostgreSQL and Oracle... all they with Fivewin 8.10!
Thank so much!
|
ADODB MySql! ( Solved! )
|
Es lo que me andaba pasando.
gracias.
[quote="JC":3p3kwufo]Dear friends,
Maybe the error is on datatype convertion of xHarbour, for fields like TIMESTAMP!
If you make a cast convertion, works!
reg_id = numeric, auto_increment, not null
reg_data = timestamp, notnull, default '0000-00-00 00:00:00'
reg_update = timestamp, notnull, default '0000-00-00 00:00:00'
Error:
[code=fw:3p3kwufo]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #0000ff;">SELECT</span> reg_id, reg_data, reg_update <span style="color: #0000ff;">FROM</span> mytable <span style="color: #0000ff;">ORDER BY</span> reg_update <span style="color: #0000ff;">DESC</span></div>[/code:3p3kwufo]
When the field is filled with any value like '2009-01-27 16:42:25', the ADO return this value like this 2009-01-27, as date
Ok:
[code=fw:3p3kwufo]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #0000ff;">SELECT</span> reg_id, CAST<span style="color: #000000;">(</span> reg_data AS CHARACTER <span style="color: #000000;">)</span> AS reg_data, CAST<span style="color: #000000;">(</span> reg_update AS CHARACTER <span style="color: #000000;">)</span> AS reg_update <span style="color: #0000ff;">FROM</span> mytable <span style="color: #0000ff;">ORDER BY</span> reg_update <span style="color: #0000ff;">DESC</span></div>[/code:3p3kwufo]
In this case, any value of field return a value like this '2009-01-27 16:42:25' as string (because typecast)
And xBrowse do not show the complete value of field... only the data part![/quote:3p3kwufo]
|
ADODB MySql! ( Solved! )
|
XBrowse shows date part of DateTime values of xHarbour ( including TimeStamp field values of ADO ) by default. If we want full date time value to be shown in xBrowse, we should set oCol:cDataType := 'T'. Then xBrowse shows the values with date and time.
|
ADOFUNC.prg e SQLEXPRESS
|
Ciao a tutti
Ho deciso di provare ad usare MSSQL EXPRESS per fare ciò ho pensato di iniziare
utilizzando le funzioni presenti in ADOFUNC.PRG mi chiedevo :
1) Se è il modo migliore per iniziare o è meglio usare ADORDD
2) Come eseguire una Rlock o Flock per evitare che due utenti lavorino
sullo stesso record o gruppi di record.
3) Se c'è necessità di fare manutenzione sulle tabelle Compattazione, reindicizzazione
Grazie
Maurizio Menabue
|
ADOFUNC.prg e SQLEXPRESS
|
Hello everyone
I decided to try using MSSQL EXPRESS to do this I thought I'd start
using the functions in ADOFUNC. PRG I was wondering:
1) If it is the best way to start or it is better to use ADORDD
2) How to run an Rlock or Flock to prevent two users from working
on the same record or groups of records.
3) If there is a need to do maintenance on compaction, reindexing
Thank you
Maurizio Menabue
|
ADOFUNC.prg e SQLEXPRESS
|
[quote="mauri.menabue":39m5nmos]Ciao a tutti
Ho deciso di provare ad usare MSSQL EXPRESS per fare ciò ho pensato di iniziare
utilizzando le funzioni presenti in ADOFUNC.PRG mi chiedevo :
1) Se è il modo migliore per iniziare o è meglio usare ADORDD[/quote:39m5nmos]
Personalmente preferisco usare direttamente ADO che è ben documentato, funzionante e pieno di esempi in tutti i linguaggi, piuttosto che nasconderlo dietro funzioni o classi di cui poi non ricordo l'uso, visto anche che ADO lo uso anche sul web. E non ritengo valido l'uso di SQL attraverso strumenti come ADORDD. SQL è un concetto completamente diverso rispetto ai DBF e rischieresti di non usarne appieno le possibilità.
[quote="mauri.menabue":39m5nmos]2) Come eseguire una Rlock o Flock per evitare che due utenti lavorino
sullo stesso record o gruppi di record.
3) Se c'è necessità di fare manutenzione sulle tabelle Compattazione, reindicizzazione[/quote:39m5nmos]
No, non servono né lock esplicito né manutenzione. SQL funziona diversamente.
EMG
|
ADOFUNC.prg e SQLEXPRESS
|
[quote:1wmju551]
1) If it is the best way to start or it is better to use ADORDD
[/quote:1wmju551]
We recommend using FWH adofuncs.
You can directly work with ADO without any of these functions, but using adofuncs makes your life very easy.
[quote:1wmju551]
3) If there is a need to do maintenance on compaction, reindexing
[/quote:1wmju551]
No need for SQLEXPRESS, MSSQL, ORACLE, etc.
Well, you need to do it if you are using MSACCESS and adofuncs have function to do this.
[quote:1wmju551]
2) How to run an Rlock or Flock to prevent two users from working
on the same record or groups of records.
[/quote:1wmju551]
We can open a table with optimistic locking or pessimistic locking. Mostly tables are opened with optimistic locking and there is no need to locking.
If we open a table with pessimistic locking, we can use record locks.
We advise you to unlearn DBF programming habits and record locking is not desirable or practiced normally.
Anyway, it is upto you.
|
ADOFUNC.prg e SQLEXPRESS
|
Ciao a tutti
Chiederei un ulteriore chiarimento riguardo questi aspetti :
1) E' possibile aprire più cursori (alias) per la stessa tabella ?
[code=fw:n6xpdosw]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> Es. <span style="color: #000000;">(</span>x<span style="color: #000000;">)</span>Harbour <span style="color: #00C800;">LOCAL</span> cALIAS1 := cGetNewAlias<span style="color: #000000;">(</span><span style="color: #ff0000;">"CLIENTI"</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">LOCAL</span> cALIAS2 := cGetNewAlias<span style="color: #000000;">(</span><span style="color: #ff0000;">"CLIENTI"</span><span style="color: #000000;">)</span><br /><br /> USE CLIENTI <span style="color: #00C800;">NEW</span> <span style="color: #0000ff;">ALIAS</span> <span style="color: #000000;">(</span>cAlias1<span style="color: #000000;">)</span> ....<br /> USE CLIENTI <span style="color: #00C800;">NEW</span> <span style="color: #0000ff;">ALIAS</span> <span style="color: #000000;">(</span>cAlias2<span style="color: #000000;">)</span> ....<br /> </div>[/code:n6xpdosw]
2) Per default non è necessario definire nessun tipo di lock, suppongo quindi che se due utenti
variano lo stesso record ed entrambe confermano la variazione l'aggiornamento del record
avvenga con una sequenza temporale, o meglio resta definitiva la variazione dell'ultimo
utente che conferma la transazione, mi chiedo se non esista una funzione che avverta un
utente che qualcuno (meglio che utente) sta già lavorando su quel record .
|
ADOFUNC.prg e SQLEXPRESS
|
Hello everyone
I would ask for further clarification on these aspects:
1) Is it possible to open multiple cursors (aliases) for the same table?
[code=fw:23g3nx6i]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /> E.g. <span style="color: #000000;">(</span>x<span style="color: #000000;">)</span>Harbour <span style="color: #00C800;">LOCAL</span> cALIAS1 := cGetNewAlias<span style="color: #000000;">(</span><span style="color: #ff0000;">"CUSTOMERS"</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">LOCAL</span> cALIAS2 := cGetNewAlias<span style="color: #000000;">(</span><span style="color: #ff0000;">"CUSTOMERS"</span><span style="color: #000000;">)</span><br /><br /> USE <span style="color: #00C800;">NEW</span> <span style="color: #0000ff;">ALIAS</span> CUSTOMERS <span style="color: #000000;">(</span>cAlias1<span style="color: #000000;">)</span> ....<br /> USE <span style="color: #00C800;">NEW</span> <span style="color: #0000ff;">ALIAS</span> CUSTOMERS <span style="color: #000000;">(</span>cAlias2<span style="color: #000000;">)</span> ....<br /><br /> </div>[/code:23g3nx6i]
2) By default you don't need to define any type of lock, so I suppose if two users
vary the same record and both confirm the change in the record update
with a timeline, or rather the variation of the last
user confirming the transaction, I wonder if there is no function that warns a
user that someone (better than user) is already working on that record.
TIA
|
ADOFUNC.prg e SQLEXPRESS
|
[quote="mauri.menabue":3dzwcymy]1) E' possibile aprire più cursori (alias) per la stessa tabella ?[/quote:3dzwcymy]
Parliamo di DBF, giusto? Sì, certo che è possibile.
EMG
|
ADOFUNC.prg e SQLEXPRESS
|
1) Yes.
2) If both users are working on the same record at the same time after one user saves changes the other can not save his changes. He will get an error. The second user has to cancel his changes, read the record again, and then do whatever.
|
ADOFUNC.prg e SQLEXPRESS
|
ciao Enrico
No, chiedevo se era possibile anche in SQL aprire lo stesso recordset con due alias - variabili diverse cosi come si faceva con i DBF.
Siccome sei esperto mi piaceva un tua chiarificazione sull'aspetto lock punto 2 del mio intervento precedente.
Grazie
|
ADOFUNC.prg e SQLEXPRESS
|
In SQL non ha senso parlare di "alias", non esistono. Puoi aprire lo stesso recordset più volte senza alcun problema, visto che userai variabili diverse. Esempio in ADO:
[code=fw:3njsmc9w]<div class="fw" id="{CB}" style="font-family: monospace;">oRs1 = CREATEOBJECT<span style="color: #000000;">(</span> <span style="color: #ff0000;">"ADODB.Recordset"</span> <span style="color: #000000;">)</span><br />oRs2 = CREATEOBJECT<span style="color: #000000;">(</span> <span style="color: #ff0000;">"ADODB.Recordset"</span> <span style="color: #000000;">)</span><br /><br />oRs1:<span style="color: #000000;">Open</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"SELECT * FROM Clienti"</span>, ... <span style="color: #000000;">)</span><br />oRs2:<span style="color: #000000;">Open</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"SELECT * FROM Clienti"</span>, ... <span style="color: #000000;">)</span><br /><br />oRs1:<span style="color: #000000;">MoveNext</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br />oRs2:<span style="color: #000000;">MoveNext</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br />oRs2:<span style="color: #000000;">MoveNext</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br />? oRs1:<span style="color: #000000;">Fields</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Cliente"</span> <span style="color: #000000;">)</span><br />? oRs2:<span style="color: #000000;">Fields</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Cliente"</span> <span style="color: #000000;">)</span></div>[/code:3njsmc9w]
EMG
|
ADOFUNC.prg e SQLEXPRESS
|
Riguardo il lock su SQL, io non l'ho mai usato, neanche in programmi web molto complessi. Quindi non ti so aiutare.
EMG
|
ADORDD
|
Donde esta la ultima version de adordd?
como se le hace para entrar al CVS y bajarlo ?
la ultima version que tengo es la del 12 de mayo,
saludos, Cordiales. <!-- s:roll: --><img src="{SMILIES_PATH}/icon_rolleyes.gif" alt=":roll:" title="Rolling Eyes" /><!-- s:roll: -->
|
ADORDD
|
[quote="sysctrl2":1c0be2qo]Donde esta la ultima version de adordd?
como se le hace para entrar al CVS y bajarlo ?
la ultima version que tengo es la del 12 de mayo,
saludos, Cordiales. <!-- s:roll: --><img src="{SMILIES_PATH}/icon_rolleyes.gif" alt=":roll:" title="Rolling Eyes" /><!-- s:roll: -->[/quote:1c0be2qo]
Cesar,
aquí lo bajas
[url:1c0be2qo]http://harbour-project.cvs.sourceforge.net/harbour-project/harbour/contrib/adordd/[/url:1c0be2qo]
|
ADORDD
|
W.M.
Gracias,,
saludos.
|
ADORDD
|
sto provando ad utilizzare l'accesso a SQL con adordd ed ho questo problema. Ho FHW 7.10 ed ho provato a collegarmi ad un database con la seguente istruzione:
#include "adordd.ch"
#include "FiveWin.ch"
REQUEST ADORDD
function Main()
USE "MioDBTest" VIA "ADORDD" TABLE "TABELLA" SQL ;
FROM "192.168.1.203" USER "saa" PASSWORD "saa"
Browse()
USE
return nil
ed è tutto OK, il browse funziona. Cambio il database e di conseguenza il programma:
#include "adordd.ch"
#include "FiveWin.ch"
REQUEST ADORDD
function Main()
USE "MioDB_PDZ" VIA "ADORDD" TABLE "TABELLA" SQL ;
FROM "192.168.1.203" USER "saa" PASSWORD "saa"
Browse()
USE
return nil
ed ho il seguente errore :
Application
===========
Path and name: C:\ado\mysql4.exe (32 bits)
Size: 1,434,112 bytes
Time from start: 0 hours 0 mins 17 secs
Error occurred at: 11/02/07, 12:02:31
Error description: Error ADODB.Connection/16389 E_FAIL: OPEN
Args:
[ 1] = C Provider=SQLOLEDB;server=192.168.1.203;database=MioDB_PDZ;uid=saa;pwd=saa
Stack Calls
===========
Called from: win32ole.prg => TOLEAUTO:OPEN(0)
Called from: adordd.prg => ADO_OPEN(248)
Called from: => DBUSEAREA(0)
Called from: mysql4.prg => MAIN(11)
Come mai?
il carattere underscore non è riconosciuto?
|
ADORDD
|
Naturalmente sei sicuro che il nome della tabella sia scritto giusto, vero? Se sì, non mi vengono in mente altri motivi per quell'errore, se non che devi controllare bene tutti i dati della stringa di connessione risultante (indirizzo IP, nome tabella, userid e password) e magari provare a fare la stessa cosa via ADO.
EMG
|
ADORDD
|
Ok, ho trovato il problema....
Il server 192.168.1.203 della mia azienda è in un'altra sede dalla mia, se io cerco di collegarmi tramite il mio programma dalla mia sede mi da quell'errore, se invece lo faccio dalla sede dove è il server va tutto bene. Ho parlato con il mio sistemista di rete del problema e deve farmi sapere.... ai qualche idea tu?
|
ADORDD
|
Probabilmente un problema di firewall.
EMG
|
ADORDD
|
Hola, leyendo un poco sobre ADO (necesito arrancar), encontre este ejemplo en este mismo foro:
#include "adordd.ch"
#include "FiveWin.ch"
REQUEST ADORDD
function Main()
USE test00 VIA "ADORDD" TABLE "ACCOUNTS" MYSQL ;
FROM "www.freesql.org" USER "myuser" PASSWORD "mypass"
Browse()
USE
return nil
cuando compilo me da este error:
Error: Unresolved external '_HB_FUN_HB_ADOSETTABLE' referenced from C:\FW192\SAROSSQL\SQL4.OBJ
Error: Unresolved external '_HB_FUN_HB_ADOSETENGINE' referenced from C:\FW192\SAROSSQL\SQL4.OBJ
Error: Unresolved external '_HB_FUN_HB_ADOSETSERVER' referenced from C:\FW192\SAROSSQL\SQL4.OBJ
Error: Unresolved external '_HB_FUN_HB_ADOSETUSER' referenced from C:\FW192\SAROSSQL\SQL4.OBJ
Error: Unresolved external '_HB_FUN_HB_ADOSETPASSWORD' referenced from C:\FW192\SAROSSQL\SQL4.OBJ
Error: Unresolved external '_HB_FUN_ADORDD' referenced from C:\FW192\SAROSSQL\SQL4.OBJ
* Linking errors *
¿tienen idea que puede ser?, porque deberia funcionar fácil, pero no le encuentro la vuelta. Gracias...!!!
|
ADORDD
|
precisa colocar junto adordd.lib
|
ADORDD
|
Gracias... disculpen mi ignorancia... mojoró, pero sigo con problemas:
Error: Unresolved external '_hb_vmProcessSymbolsEx' referenced from C:\HARBOUR104\LIB\ADORDD.LIB|adordd
Error: Unresolved external '_HB_FUN_USRRDD_RDDDATA' referenced from C:\HARBOUR104\LIB\ADORDD.LIB|adordd
Error: Unresolved external '_HB_FUN_USRRDD_AREADATA' referenced from C:\HARBOUR104\LIB\ADORDD.LIB|adordd
Error: Unresolved external '_HB_FUN_UR_SUPER_ERROR' referenced from C:\HARBOUR104\LIB\ADORDD.LIB|adordd
Error: Unresolved external '_HB_FUN_UR_SUPER_SETFIELDEXTENT' referenced from C:\HARBOUR104\LIB\ADORDD.LIB|adordd
Error: Unresolved external '_HB_FUN_UR_SUPER_ADDFIELD' referenced from C:\HARBOUR104\LIB\ADORDD.LIB|adordd
Error: Unresolved external '_HB_FUN_UR_SUPER_OPEN' referenced from C:\HARBOUR104\LIB\ADORDD.LIB|adordd
Error: Unresolved external '_HB_FUN_UR_SUPER_CLOSE' referenced from C:\HARBOUR104\LIB\ADORDD.LIB|adordd
Error: Unresolved external '_HB_FUN_USRRDD_GETFUNCTABLE' referenced from C:\HARBOUR104\LIB\ADORDD.LIB|adordd
* Linking errors *
¿alguna pista?
Gracias desde ya. Atte.
|
ADORDD
|
usrrdd.lib esta tambem...
|
ADORDD
|
Hola,
SI usas Harbour es hbusrrdd.lib.
¿Has conseguido que esto te funcione?
[code=fw:2wxqzaro]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"adordd.ch"</span><br /><br />REQUEST ADORDD<br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> USE Test.mdb VIA <span style="color: #ff0000;">"ADORDD"</span> TABLE <span style="color: #ff0000;">"Tabla1"</span><br /><br /> Browse<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> USE<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:2wxqzaro]
Gracias.
|
ADORDD
|
Hola. Estoy tratando de hacer correr el ejemplo mas simple de ADORDD. Estoy trabado con el error
Error: Unresolved external '_hb_vmProcessSymbolsEx' referenced from C:\HARBOUR104\LIB\ADORDD.LIB|adordd
* Linking errors *
Segun los posts tengo que compilar el adordd.lib con mi version de harbour. Lo descargo con el link que encontre en el foro, pero cuando compilo me genera un .exe. ¿cual es la instruccion para compilar generando un .lib?
Muchas gracias. Atte.
|
ADORDD
|
Hola,
Agrega al principio de tu .prg #include "adordd.prg".
Sin embargo, en el foro de Harbour me han comentado lo siguiente:
[quote:t0kotbl9]RDD to automatically manage Microsoft ADO. Harbour win only rdd able to
read & write to ado datasource
developer have moved RDDADO code from contrib to example due to
problems because
an RTEs were reported each week, but nobody was ever willing to look into
them or fix them. So ADORDD is (and was always) a half-finished, buggy
piece of code nobody was interested to fix.
[/quote:t0kotbl9]
Una verdadera lástima porque la idea me parece estupenda.
¿Piensa Fivetech mejorar esta idea originaria del propio Maestro Antonio Linares?.
|
ADORDD
|
El problema no es el ADORDD en si, sino que ADO no es consistente con distintos motores de bases de datos.
Es decir, descubrimos que bastantes funcionalidades no estaban presentes en muchos motores y eso hacia imposible poder completarlo al 100%
En mi opinión es bastante util para ser adaptado a lo que cada uno pueda necesitar.
|
ADORDD
|
y como puedo hacerlo funcionar???
me tira el error:
Turbo Incremental Link 5.69 Copyright (c) 1997-2005 Borland
Error: Unresolved external '_hb_vmProcessSymbolsEx' referenced from C:\HARBOUR10
* Linking errors *
¿como compilo el prg con mi version de harbour, pero que me genere un .lib?
Probe compilando, y usando el TLIB.exe... TLIB adordd. Me genera un adordd.lib, pero si lo uso vuelvo al error siguiente:
Turbo Incremental Link 5.69 Copyright (c) 1997-2005 Borland
Error: Unresolved external '_hb_vmProcessSymbolsEx' referenced from C:\HARBOUR104\LIB\HBOLEAUT.LIB|win32ole
Error: Unresolved external '_HB_FUN_HB_ADOSETTABLE' referenced from C:\FW192\SAROSSQL\PRUEADO.OBJ
Error: Unresolved external '_HB_FUN_HB_ADOSETENGINE' referenced from C:\FW192\SAROSSQL\PRUEADO.OBJ
Error: Unresolved external '_HB_FUN_HB_ADOSETSERVER' referenced from C:\FW192\SAROSSQL\PRUEADO.OBJ
Error: Unresolved external '_HB_FUN_HB_ADOSETUSER' referenced from C:\FW192\SAROSSQL\PRUEADO.OBJ
Error: Unresolved external '_HB_FUN_HB_ADOSETPASSWORD' referenced from C:\FW192\SAROSSQL\PRUEADO.OBJ
Error: Unresolved external '_HB_FUN_ADORDD' referenced from C:\FW192\SAROSSQL\PRUEADO.OBJ
* Linking errors *
Una cosa mas, yo manejo bien todo lo que es armar un .prg, compilarlo, que corra, etc... ¿existe algun manual para meterse un poco en esto de las librerias, versiones, armar clases, etc? Gracias...!!!
|
ADORDD
|
Antonio,
Muchísimas gracias por la respuesta.
¿Tenéis pensado retomarlo en lo que se refiere al menos a Access y MySQL, que son las principales bases demandadas aquí en los foros?.
Salu2
|
ADORDD
|
Diego,
Mi sugerencia es que revises los ejemplos de ADO que hay aqui en el foro, que son muchos, para que te familiarices un poco con ADO y luego ADORDD te simplificará aún más las cosas, y estarás en condiciones de adaptarlo a tus necesidades
Lucas,
De momento no tenemos planes de seguir desarrollándolo. Ahi está para quien lo necesite y quiera adaptarlo especificamente a su motor de base de datos
|
ADORDD
|
Lucas,
para acceder a MySQL tienes las opciones:
- TDolphin de Daniel Garcia Gil [url:3lghfn1y]http://tdolphin.blogspot.com/[/url:3lghfn1y]
- Eagle1 de Manuel Expósito Suarez [url:3lghfn1y]http://es.groups.yahoo.com/group/eagle1/[/url:3lghfn1y]
seguro que hay alguna más.
Para Access, tendrás que tirar de ADO, a través de ADORDD o de ADO a pelo.
Saludos,
Félix
|
ADORDD
|
Baxajaun,
No olvides TMySQL de las contribuciones de xHarbour y ahora en Harbour, por cierto muy buena LIB.
|
ADORDD
|
Muchas gracias por vuestras indicaciones.
Para MySQL sin duda la opción TDolphin es la mejor. Además, la atención de Daniel es insuperable.
En cuanto a ADO, ¿dónde puedo encontrar información sobre ADO y Harbour?.
¿Hay alguna clase tipo TDBF para ADO, de modo que se pudieran manejar varios motores pero manteniendo la misma sintáxis del código fuente?.
|
ADORDD
|
Hola:
¿Alguien lo está utlizando? Muchas gracias.
|
ADORDD
|
Hi,
Is anyone using it?
Thank you.
|
ADORDD + HARBOUR
|
Sorry for my english (google)
I'm trying to use the adordd
but this error is occurring ...
[code=fw:38mllzs1]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#INCLUDE</span> <span style="color: #ff0000;">"FIVEWIN.CH"</span><br /><span style="color: #00D7D7;">#INCLUDE</span> <span style="color: #ff0000;">"XBROWSE.CH"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"c:<span style="color: #000000;">\a</span>dordd<span style="color: #000000;">\a</span>dordd.ch"</span><br /><br />******************<br /><span style="color: #00C800;">FUNCTION</span> MAIN<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br />******************<br /><br />USE <span style="color: #ff0000;">"omega"</span> VIA <span style="color: #ff0000;">"ADORDD"</span> TABLE <span style="color: #ff0000;">"slbdprod"</span> MYSQL ;<br /> <span style="color: #0000ff;">FROM</span> <span style="color: #ff0000;">"localhost"</span> USER <span style="color: #ff0000;">"root"</span> PASSWORD <span style="color: #ff0000;">"12345678"</span><br /><br /><span style="color: #0000ff;">xBrowse</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br />use<br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:38mllzs1]
[quote:38mllzs1]Application
===========
Path and name: c:\XFONTES\XSERVER\WSERVER.exe (32 bits)
Size: 4,614,144 bytes
Time from start: 0 hours 0 mins 8 secs
Error occurred at: 28/04/2011, 10:41:23
Error description: (DOS Error -2147352567) WINOLE/1007 Erro nos parƒmetros: OPEN
Args:
[ 1] = C DRIVER={MySQL ODBC 3.51 Driver};server=localhost;database=omega;uid=root;pwd=12345678[/quote:38mllzs1]
|
ADORDD -- WHERE AND ORDEY BY
|
ADORDD Mysql, com seleção e ordenação: veja exemplo:
USE bazevani VIA "ADORDD" TABLE "[b:2ooxcc8q]clientes where codigo < 12000 order by nome[/b:2ooxcc8q]" ALIAS "CLIENTES" MYSQL ;
FROM "xxx.xxx.xxx.xx" USER "xxxxxx" PASSWORD "xxxxxx"
Neste exemplo abrimos o clientes, selecionando registro até o codigo 12000 e ordenando por NOME...
ROnaldo
|
ADORDD ???
|
Hola a todos del foro.
Gracias Master Antonio por el enlace, algo entendi...
Pero lo que realmente quise preguntar fue ADORDD???
Si no es molestia. gracias
Salu2 <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
Francis
|
ADORDD ???
|
Estimados:
Necesito ayuda con SQL, no soy un experto, le he sacado el quite muchas veces y ahora necesito hacer algunas cosas. Tengo claro como conectarme a la base de datos, lo que no se es como agregar datos a una tabla, debo de actualizar la tabla de precios la cual tiene diferentes listas de precios, el sistema que compro la empresa trae una aplicacion para importar datos pero no resulta, ya que tengo poco tiempo para ponerlo en marcha, quiero agregar de una base de datos DBF la informacion que contiene a la SQL, ahora esto debo hacerlo apuntando y buscando los codigos en otras dos tablas las cuales continen los identificadores de cada producto, se que es mucho pedir, pero necesito una ejemplo y ayuda de como realizarlo.
Agradecido.
|
ADORDD ???
|
Acaso se usan los mismos comandos... esto es SEEK para buscar ???
|
ADORDD ???
|
Mayor:
La convivencia entre DBFs y Tablas Sql es perfectamente válida y fácil,
mira mi blog <!-- m --><a class="postlink" href="http://sqlcmd.blogspot.com/">http://sqlcmd.blogspot.com/</a><!-- m --> ahí encontraras muchos ejemplos.
Saludos
|
ADORDD ???
|
Valenzuela
contactame conmigo al <!-- e --><a href="mailto:syscom31@hotmail.com">syscom31@hotmail.com</a><!-- e --> por messenger
Saludos
|
ADORDD ???
|
José:
No sería mejor tratar el tema aquí en el foro ?, así aprendemos todos.
Saludos
|
ADORDD ???
|
Gracias por la atencion... pero estoy de acuerdo que quede en el post ya que sirve para futuras referencias...
<!-- s:P --><img src="{SMILIES_PATH}/icon_razz.gif" alt=":P" title="Razz" /><!-- s:P -->
|
ADORDD ???
|
Disculpa "jbrita" debi tomar tu consejo, este foro creo que esta muerto, donde mas puedo obtener respuestas a mis dudas??? en los ejemplos de ADORDD viene un ejcutable que funciona perfectamente, me conecto al servidor de bases de datos y e incluso veo los datos contenidos en en la tabla, pero cuando quiero compilarlo para realizar algunas pruebas me da un error de ejecucion que postie el dia de ayer y no he tenido respuesta... no les pido que me pasen todo el codigo, solo de como compilarlo y realizar mis pruebas o cual es la version correcta de harbour o xharbour que debo utilizar... Gracias...
|
ADORDD ???
|
bien, explicate bien lo que quieres hacer , la tabla sql es de mysql o sql server, si es asi lo mejor es ADO.
presentame las tablas y veremos q pasa
esto esta en blogs de Armando es buenisimo revisalo
<!-- m --><a class="postlink" href="http://sqlcmd.blogspot.com/2008/10/cdigo-para-crear-la-base-de-datos-y.html">http://sqlcmd.blogspot.com/2008/10/cdig ... tos-y.html</a><!-- m -->
Salu2
|
ADORDD ???
|
Ok... me explico
La base de datos es SQL Server, tengo 11 listas de precios con mas de 2000 codigos que estan en DBF, estas listas tienen precios diferentes una por cada tienda, el nuevo sistema deberia importar esta informacion pero no lo hace, los proveedores de este software ven que aparentemente todo esta bien, pero ni ellos entienden porque no se importan los datos, de ahi es que nacio mi necesidad de usar ADO para agregar esta informacion por otra via, es importante ya que los plazos ya me estan pisoteando. Intente volcar desde SQL a un archivo plano para realizar la operacion de forma manual solo con comandos SQL pero no he tenido resultados. Ademas de no tener muchos conocimientos de SQL
Espero este bastante claro...
|
ADORDD Error : ADODEFAULT(5256)
|
I'm just new with ADORDD, I try the ADORDD.PRG but it has got an error below
This is my example, what I do wrong?
[code=fw:cb4oca2h]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">'adordd.ch'</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">'fivewin.ch'</span><br /><br />REQUEST ADORDD<br /><br /><span style="color: #00C800;">Function</span> main<br /><span style="color: #00C800;">LOCAL</span> cSql :=<span style="color: #ff0000;">""</span><br /> <br /> RddRegister<span style="color: #000000;">(</span><span style="color: #ff0000;">"ADORDD"</span>,<span style="color: #000000;">1</span><span style="color: #000000;">)</span> <br /> RddSetDefault<span style="color: #000000;">(</span><span style="color: #ff0000;">"ADORDD"</span><span style="color: #000000;">)</span> <br /> <br /> USE easyfo TABLE <span style="color: #ff0000;">"ccrtbl"</span> VIA <span style="color: #ff0000;">"ADORDD"</span> <span style="color: #0000ff;">ALIAS</span> <span style="color: #ff0000;">"tbl"</span> MYSQL ;<br /> <span style="color: #0000ff;">FROM</span> <span style="color: #ff0000;">"localhost"</span> USER <span style="color: #ff0000;">"root"</span> PASSWORD <span style="color: #ff0000;">"nimda"</span><br /><br /><span style="color: #0000ff;">msginfo</span><span style="color: #000000;">(</span> tbl->tbl_intno <span style="color: #000000;">)</span><br /><br />CLOSE tbl<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:cb4oca2h]
[code=fw:cb4oca2h]<div class="fw" id="{CB}" style="font-family: monospace;"> Error description: <span style="color: #000000;">Error</span> BASE/<span style="color: #000000;">1132</span> Bound error: <span style="color: #000000;">array</span> access<br /> Args:<br /> <span style="color: #000000;">[</span> <span style="color: #000000;">1</span><span style="color: #000000;">]</span> = A <span style="color: #000000;">{</span> ... <span style="color: #000000;">}</span> length: <span style="color: #000000;">0</span><br /> <span style="color: #000000;">[</span> <span style="color: #000000;">2</span><span style="color: #000000;">]</span> = N <span style="color: #000000;">1</span><br /><br />Stack Calls<br />===========<br /> Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">D</span>:\FTDN\adordd\AdoRdd\adordd.prg => ADODEFAULTS<span style="color: #000000;">(</span> <span style="color: #000000;">5256</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">D</span>:\FTDN\adordd\AdoRdd\adordd.prg => ADOCONNECT<span style="color: #000000;">(</span> <span style="color: #000000;">413</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">D</span>:\FTDN\adordd\AdoRdd\adordd.prg => ADO_OPEN<span style="color: #000000;">(</span> <span style="color: #000000;">255</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: => DBUSEAREA<span style="color: #000000;">(</span> <span style="color: #000000;">0</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">D</span>:\V6\TADORDD\test.prg => MAIN<span style="color: #000000;">(</span> <span style="color: #000000;">17</span> <span style="color: #000000;">)</span></div>[/code:cb4oca2h]
|
ADORDD Error : ADODEFAULT(5256)
|
Dutch,
You need to set ado before:
[code=fw:2zmzshia]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">//all your tables and index files used by your app without any clipper expressions </span><br /><span style="color: #B900B9;">// if you need to use indexes you need this set otherwise you have t create them</span><br /><span style="color: #B900B9;">// every time app run</span><br />SET ADO TABLES <span style="color: #0000ff;">INDEX</span> LIST <span style="color: #0000ff;">TO</span> <span style="color: #000000;">{</span> <span style="color: #000000;">{</span><span style="color: #ff0000;">"TABLE1"</span>,<span style="color: #000000;">{</span><span style="color: #ff0000;">"FIRST"</span>,<span style="color: #ff0000;">"FIRST"</span><span style="color: #000000;">}</span> <span style="color: #000000;">}</span>, <span style="color: #000000;">{</span><span style="color: #ff0000;">"TABLE2"</span> ,<span style="color: #000000;">{</span><span style="color: #ff0000;">"CODID"</span>,<span style="color: #ff0000;">"CODID"</span><span style="color: #000000;">}</span><span style="color: #000000;">}</span> <span style="color: #000000;">}</span><br /><br /><span style="color: #B900B9;">//all your tables and index files used by your app with clipper expressions</span><br /><span style="color: #B900B9;">// if you need to use indexes you need this set otherwise you have t create them</span><br /><span style="color: #B900B9;">// every time app run</span><br />SET ADODBF TABLES <span style="color: #0000ff;">INDEX</span> LIST <span style="color: #0000ff;">TO</span> <span style="color: #000000;">{</span> <span style="color: #000000;">{</span><span style="color: #ff0000;">"TABLE1"</span>,<span style="color: #000000;">{</span><span style="color: #ff0000;">"FIRST"</span>,<span style="color: #ff0000;">"FIRST"</span><span style="color: #000000;">}</span> <span style="color: #000000;">}</span>, <span style="color: #000000;">{</span><span style="color: #ff0000;">"TABLE2"</span> ,<span style="color: #ff0000;">"CODID"</span>,<span style="color: #ff0000;">"CODID"</span><span style="color: #000000;">}</span><span style="color: #000000;">}</span> <span style="color: #000000;">}</span><br /><br /><span style="color: #B900B9;">//temporay index file names must star with tmp or temp</span><br />SET ADO TEMPORAY NAMES <span style="color: #0000ff;">INDEX</span> LIST <span style="color: #0000ff;">TO</span> <span style="color: #000000;">{</span><span style="color: #ff0000;">"TMP"</span>,<span style="color: #ff0000;">"TEMP"</span><span style="color: #000000;">}</span><br /><br /><span style="color: #B900B9;">//this is a must you have to indicate whats the autoinc field used as recno() </span><br /><span style="color: #B900B9;">//without it will not navigate correctly </span><br /><span style="color: #B900B9;">// you can indicate by table </span><br />SET ADO FIELDRECNO TABLES LIST <span style="color: #0000ff;">TO</span> <span style="color: #000000;">{</span><span style="color: #000000;">{</span><span style="color: #ff0000;">"TABLE1"</span>,<span style="color: #ff0000;">"FIRST"</span><span style="color: #000000;">}</span>,<span style="color: #000000;">{</span><span style="color: #ff0000;">"TABLE2"</span>,<span style="color: #ff0000;">"CODID"</span><span style="color: #000000;">}</span><span style="color: #000000;">}</span><br /><span style="color: #B900B9;">//or by default</span><br />SET ADO <span style="color: #00C800;">DEFAULT</span> RECNO FIELD <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">"HBRECNO"</span><br /><br /><span style="color: #B900B9;">//This is the same as for other rdds</span><br />SET AUTOPEN <span style="color: #0000ff;">ON</span> <span style="color: #B900B9;">//might be OFF if you wish</span><br />SET AUTORDER <span style="color: #0000ff;">TO</span> <span style="color: #000000;">1</span> <span style="color: #B900B9;">// first index opened can be other</span><br /> <br /><span style="color: #B900B9;">//default connection if for ACCESS YOU NEED TO INCLUDE FULL PATH</span><br />SET ADO <span style="color: #00C800;">DEFAULT</span> DATABASE <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">"testadordd"</span> <span style="color: #00C800;">SERVER</span> <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">"localhost"</span> ENGINE <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">"MYSQL"</span> USER <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">"adordd"</span> PASSWORD <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">""</span> <br /><br /><span style="color: #B900B9;">//control locking in adordd for both table and record dont puT final \ </span><br /> SET ADO LOCK CONTROL SHAREPATH <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">"D:<span style="color: #000000;">\W</span>HATEVER"</span> RDD <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">"DBFCDX"</span><br /><br /><span style="color: #B900B9;">//dont need lock control</span><br />SET ADO FORCE LOCK OFF<br /><br /><span style="color: #B900B9;">//AFTER SETTINGS DONE</span><br /><span style="color: #B900B9;">//we can just use table </span><br />use TABLE1 <span style="color: #0000ff;">alias</span> <span style="color: #ff0000;">"whatever"</span><br /><br /><span style="color: #B900B9;">//or we can open another con</span><br />use <span style="color: #ff0000;">"TABLE1@"</span>Driver=<span style="color: #000000;">{</span>mySQL ODBC <span style="color: #000000;">5.3</span> ANSI Driver<span style="color: #000000;">}</span>;<span style="color: #ff0000;">" + ;<br /> "</span><span style="color: #00C800;">server</span>=localhost<span style="color: #ff0000;">" + ;<br /> "</span>;Port=<span style="color: #000000;">3306</span>;Option=<span style="color: #000000;">32</span><span style="color: #ff0000;">"+;<br /> "</span>;database=otherdatabase<span style="color: #ff0000;">" + ;<br /> "</span>;uid=adordd<span style="color: #ff0000;">" + ;<br /> "</span>;pwd=<span style="color: #ff0000;">''</span><span style="color: #ff0000;">" +"</span>;<span style="color: #ff0000;">" ALIAS "</span>whatever<span style="color: #ff0000;">"<br /><br /><br /></span></div>[/code:2zmzshia]
For you trial:
SET ADO DEFAULT DATABASE TO "ccrtbl" SERVER TO "localhost" ENGINE TO "MYSQL" USER TO "root" PASSWORD TO "nimda"
//if you want to try locks
//control locking in adordd for both table and record dont puT final \
SET ADO LOCK CONTROL SHAREPATH TO "your Drive:\WHATEVER" RDD TO "DBFCDX"
//dont need lock control
SET ADO FORCE LOCK OFF
SET ADO DEFAULT RECNO FIELD TO "my autoinc field" //indicate your autoinc filed in the table (default for all)
USE easyinfo ALIAS "tbl"
//THIS IS THECORRECT SYNTAX
// DONT USE IT IM GOING TO TAKE THIS OUT
//AS IT WILL NOT BE NEEDED WITH ALTERNATIVES ABOVE.
USE easyfo VIA "ADORDD" ALIAS "tbl" FROM DATABASE "ccrtbl" MYSQL ;
FROM SERVER "localhost" USER "root" PASSWORD "nimda"
Please try it and let me know.
|
ADORDD Error : ADODEFAULT(5256)
|
I need to use MySql and how to set this following line. I'm not quite clear.
[code=fw:x7c29ebm]<div class="fw" id="{CB}" style="font-family: monospace;"> SET ADO LOCK CONTROL SHAREPATH <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">"E:<span style="color: #000000;">\T</span>EMP"</span> RDD <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">"DBFCDX"</span></div>[/code:x7c29ebm]
This line is used for index expression. If I have 12 tag (DBFCDX) in 1 table, I have to define at the begining of the program every time the program start.
[code=fw:x7c29ebm]<div class="fw" id="{CB}" style="font-family: monospace;">SET ADODBF TABLES <span style="color: #0000ff;">INDEX</span> LIST <span style="color: #0000ff;">TO</span> <span style="color: #000000;">{</span> <span style="color: #000000;">{</span><span style="color: #ff0000;">"TABLE1"</span>,<span style="color: #000000;">{</span><span style="color: #ff0000;">"FIRST"</span>,<span style="color: #ff0000;">"FIRST"</span><span style="color: #000000;">}</span> ,<span style="color: #000000;">{</span><span style="color: #ff0000;">"LAST"</span>,<span style="color: #ff0000;">"LAST"</span><span style="color: #000000;">}</span>,<span style="color: #000000;">{</span><span style="color: #ff0000;">"MEMNO"</span>,<span style="color: #ff0000;">"MEMNO"</span><span style="color: #000000;">}</span>,<span style="color: #000000;">{</span><span style="color: #ff0000;">"TYPE+LAST"</span>,<span style="color: #ff0000;">"TYPE+LAST"</span><span style="color: #000000;">}</span>,<span style="color: #000000;">{</span><span style="color: #ff0000;">"BIRTHDATE"</span>,<span style="color: #ff0000;">"DTOS(BIRTHDATE)"</span><span style="color: #000000;">}</span>,etc.<span style="color: #000000;">}</span>, <span style="color: #000000;">{</span><span style="color: #ff0000;">"TABLE2"</span> ,<span style="color: #ff0000;">"CODID"</span>,<span style="color: #ff0000;">"CODID"</span><span style="color: #000000;">}</span><span style="color: #000000;">}</span> <span style="color: #000000;">}</span></div>[/code:x7c29ebm]
|
ADORDD Error : ADODEFAULT(5256)
|
[quote="dutch":3mby1io3]I need to use MySql and how to set this following line. I'm not quite clear.
[code=fw:3mby1io3]<div class="fw" id="{CB}" style="font-family: monospace;"> SET ADO LOCK CONTROL SHAREPATH <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">"E:<span style="color: #000000;">\T</span>EMP"</span> RDD <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">"DBFCDX"</span></div>[/code:3mby1io3][/quote:3mby1io3]
+1
|
ADORDD Error : ADODEFAULT(5256)
|
This line does return incorrect. Because it cannot find the "TLOCKS" table in MySql Database. It is warning everytime when open the program.
It will effect, if turn LOCK CONTROL ON. I think it will be find, If use "DBFCDX" but still got problem with "MySql".
SET ADO LOCK CONTROL SHAREPATH TO "E:\TEMP" RDD TO "ADORDD" // DBFCDX"
[code=fw:8dzjmm6k]<div class="fw" id="{CB}" style="font-family: monospace;">cTable := cPath+<span style="color: #ff0000;">"<span style="color: #000000;">\T</span>LOCKS"</span>+RDDINFO<span style="color: #000000;">(</span>RDDI_TABLEEXT,,rRdd<span style="color: #000000;">)</span></div>[/code:8dzjmm6k]
|
ADORDD Error : ADODEFAULT(5256)
|
Hello,
Please set SET ADO FORCE LOCK OFF.
So MySQL will do the locking.
This feature was a special situation for Antonio´s customer.
So, the settings will be:
[code=fw:3l7km9jl]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /> SET ADO <span style="color: #00C800;">DEFAULT</span> RECNO FIELD <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">"HBRECNO"</span><br /><br /> SET AUTOPEN OFF <span style="color: #B900B9;">//ON //might be OFF if you wish</span><br /><br /> <span style="color: #B900B9;">//SET AUTORDER TO 1 // first index opened can be other</span><br /><br /> SET ADO FORCE LOCK OFF<br /><br /> SET ADO <span style="color: #00C800;">DEFAULT</span> DATABASE <span style="color: #0000ff;">TO</span> cDataBase <span style="color: #00C800;">SERVER</span> <span style="color: #0000ff;">TO</span> cServer ENGINE <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">"MYSQL"</span> USER <span style="color: #0000ff;">TO</span> cUser PASSWORD <span style="color: #0000ff;">TO</span> cPassWord<br /><br /><br /> </div>[/code:3l7km9jl]
|
ADORDD Error : ADODEFAULT(5256)
|
Dutch,
[quote="dutch":3t9pke4i]This line does return incorrect. Because it cannot find the "TLOCKS" table in MySql Database. It is warning everytime when open the program.
It will effect, if turn LOCK CONTROL ON. I think it will be find, If use "DBFCDX" but still got problem with "MySql".
SET ADO LOCK CONTROL SHAREPATH TO "E:\TEMP" RDD TO "ADORDD" // DBFCDX"
[code=fw:3t9pke4i]<div class="fw" id="{CB}" style="font-family: monospace;">cTable := cPath+<span style="color: #ff0000;">"<span style="color: #000000;">\T</span>LOCKS"</span>+RDDINFO<span style="color: #000000;">(</span>RDDI_TABLEEXT,,rRdd<span style="color: #000000;">)</span></div>[/code:3t9pke4i][/quote:3t9pke4i]
Can you post here all ado sets?
The TLOCKS table isn't SQL but dbfcdx or other Harbour rdd that allow true lock.
SET ADO LOCK CONTROL SHAREPATH TO "E:\TEMP" RDD TO "DBFCDX"
You have to supply to the sharepath and the rddname. Thats it.
Of course that rdd must be linked with your app because it will be used.
[code=fw:3t9pke4i]<div class="fw" id="{CB}" style="font-family: monospace;">SET ADODBF TABLES <span style="color: #0000ff;">INDEX</span> LIST <span style="color: #0000ff;">TO</span> <span style="color: #000000;">{</span> <span style="color: #000000;">{</span><span style="color: #ff0000;">"TABLE1"</span>,<span style="color: #000000;">{</span><span style="color: #ff0000;">"FIRST"</span>,<span style="color: #ff0000;">"FIRST"</span><span style="color: #000000;">}</span> ,<span style="color: #000000;">{</span><span style="color: #ff0000;">"LAST"</span>,<span style="color: #ff0000;">"LAST"</span><span style="color: #000000;">}</span>,<span style="color: #000000;">{</span><span style="color: #ff0000;">"MEMNO"</span>,<span style="color: #ff0000;">"MEMNO"</span><span style="color: #000000;">}</span>,<span style="color: #000000;">{</span><span style="color: #ff0000;">"TYPE+LAST"</span>,<span style="color: #ff0000;">"TYPE+LAST"</span><span style="color: #000000;">}</span>,<span style="color: #000000;">{</span><span style="color: #ff0000;">"BIRTHDATE"</span>,<span style="color: #ff0000;">"DTOS(BIRTHDATE)"</span><span style="color: #000000;">}</span>,etc.<span style="color: #000000;">}</span>, <span style="color: #000000;">{</span><span style="color: #ff0000;">"TABLE2"</span> ,<span style="color: #ff0000;">"CODID"</span>,<span style="color: #ff0000;">"CODID"</span><span style="color: #000000;">}</span><span style="color: #000000;">}</span> <span style="color: #000000;">}</span></div>[/code:3t9pke4i]
Concerning indexes this has to be placed before trying to open any file.
But you will need also the
[code=fw:3t9pke4i]<div class="fw" id="{CB}" style="font-family: monospace;">SET ADO TABLES <span style="color: #0000ff;">INDEX</span> LIST <span style="color: #0000ff;">TO</span> <span style="color: #000000;">{</span> <span style="color: #000000;">{</span><span style="color: #ff0000;">"TABLE1"</span>,<span style="color: #000000;">{</span><span style="color: #ff0000;">"FIRST"</span>,<span style="color: #ff0000;">"FIRST"</span><span style="color: #000000;">}</span> ,<span style="color: #000000;">{</span><span style="color: #ff0000;">"LAST"</span>,<span style="color: #ff0000;">"LAST"</span><span style="color: #000000;">}</span>,<span style="color: #000000;">{</span><span style="color: #ff0000;">"MEMNO"</span>,<span style="color: #ff0000;">"MEMNO"</span><span style="color: #000000;">}</span>,<span style="color: #000000;">{</span><span style="color: #ff0000;">"TYPE+LAST"</span>,<span style="color: #ff0000;">"TYPE,LAST"</span><span style="color: #000000;">}</span>,<span style="color: #000000;">{</span><span style="color: #ff0000;">"BIRTHDATE"</span>,<span style="color: #ff0000;">"BIRTHDATE"</span><span style="color: #000000;">}</span>,etc.<span style="color: #000000;">}</span>, <span style="color: #000000;">{</span><span style="color: #ff0000;">"TABLE2"</span> ,<span style="color: #ff0000;">"CODID"</span>,<span style="color: #ff0000;">"CODID"</span><span style="color: #000000;">}</span><span style="color: #000000;">}</span> <span style="color: #000000;">}</span></div>[/code:3t9pke4i]
Please check the changes + with , The first "TYPE+LAST" I assume is the index name you want.
You can see these two sets has:
SET ADO TABLES all index expressions without any clipper function and the fields separated by ,.
These are used to build SQL SELECT expression ORDER BY
SET ADODBF TABLES are the same but with clipper fuctions and fields with +.
These are used to evaluate clipper expression ex:
&(indexkey(0))
ordkey()
ordfor()
etc.
I hope to have answer you question.
|
ADORDD Error : ADODEFAULT(5256)
|
[code=fw:vs0hdtbr]<div class="fw" id="{CB}" style="font-family: monospace;">Dear Antonio F.,<br />I <span style="color: #00C800;">try</span> <span style="color: #0000ff;">to</span> find in ADORDD.PRG, because I got an error <span style="color: #0000ff;">message</span> <span style="color: #00C800;">for</span> existing table TLOCKS in MySql. You have checked the existing TLOCKS.DBF <span style="color: #0000ff;">from</span> SET ADO LOCK CONTROL SHAREPATH <span style="color: #0000ff;">TO</span> .... <span style="color: #0000ff;">setting</span> but it got an error <span style="color: #0000ff;">message</span> <span style="color: #0000ff;">when</span> I use MySql DB.<br /><br /><span style="color: #00C800;">If</span> I use Clipper Expression in <span style="color: #0000ff;">INDEX</span> file, I need only SET ADODBF TABLE <span style="color: #0000ff;">INDEX</span> LIST <span style="color: #0000ff;">TO</span>. Is it correct?<br /><br />Thanks in advance.</div>[/code:vs0hdtbr]
I dont understand very well you question.
Please read last readme posted in Github.
You need always to set both ADODBF TABLES and ADO TABLES
How do you have a tLocks in MySql ?
Do you have such a table already in your app?
|
ADORDD Error : ADODEFAULT(5256)
|
Hi Antonio,
We have a bigger ERP (more 400 prg) with many of 300 dbf files, and want try use ADORDD with MySql.
I´m not understand how to use SET ADODBF commands.
|
ADORDD Error : ADODEFAULT(5256)
|
Vilian,
Did you get the last version posted a couple of hours ago and read the readme thats now more like a small manual?
|
ADORDD Error : ADODEFAULT(5256)
|
Antônio,
Thanks, I will get now.
|
ADORDD Error : ADODEFAULT(5256)
|
Antônio,
We have 287 DBF files and 472 CDX files.
We need to use [b:d7yldukw]SET ADODBF[/b:d7yldukw] and [b:d7yldukw]SET ADO Tables [/b:d7yldukw] only in main program or anyway open files ?
|
ADORDD Error : ADODEFAULT(5256)
|
Thanks Lucas,
I have set LOCK OFF as your recommendation. It works now.
[quote="lucasdebeltran":1txb5isj]Hello,
Please set SET ADO FORCE LOCK OFF.
So MySQL will do the locking.
[code=fw:1txb5isj]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /> SET ADO <span style="color: #00C800;">DEFAULT</span> RECNO FIELD <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">"HBRECNO"</span><br /><br /> SET AUTOPEN OFF <span style="color: #B900B9;">//ON //might be OFF if you wish</span><br /><br /> <span style="color: #B900B9;">//SET AUTORDER TO 1 // first index opened can be other</span><br /><br /> SET ADO FORCE LOCK OFF<br /><br /> SET ADO <span style="color: #00C800;">DEFAULT</span> DATABASE <span style="color: #0000ff;">TO</span> cDataBase <span style="color: #00C800;">SERVER</span> <span style="color: #0000ff;">TO</span> cServer ENGINE <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">"MYSQL"</span> USER <span style="color: #0000ff;">TO</span> cUser PASSWORD <span style="color: #0000ff;">TO</span> cPassWord<br /> </div>[/code:1txb5isj][/quote:1txb5isj]
Dear Antonio F.,
I try to find in ADORDD.PRG, because I got an error message for existing table TLOCKS in MySql. You have checked the existing TLOCKS.DBF from SET ADO LOCK CONTROL SHAREPATH TO .... setting but it got an error message when I use MySql DB.
If I use Clipper Expression in INDEX file, I need only SET ADODBF TABLE INDEX LIST TO. Is it correct?
Thanks in advance.
[quote="AHF":1txb5isj]Dutch,
Can you post here all ado sets?
The TLOCKS table isn't SQL but dbfcdx or other Harbour rdd that allow true lock.
SET ADO LOCK CONTROL SHAREPATH TO "E:\TEMP" RDD TO "DBFCDX"
You have to supply to the sharepath and the rddname. Thats it.
Of course that rdd must be linked with your app because it will be used.
[code=fw:1txb5isj]<div class="fw" id="{CB}" style="font-family: monospace;">SET ADODBF TABLES <span style="color: #0000ff;">INDEX</span> LIST <span style="color: #0000ff;">TO</span> <span style="color: #000000;">{</span> <span style="color: #000000;">{</span><span style="color: #ff0000;">"TABLE1"</span>,<span style="color: #000000;">{</span><span style="color: #ff0000;">"FIRST"</span>,<span style="color: #ff0000;">"FIRST"</span><span style="color: #000000;">}</span> ,<span style="color: #000000;">{</span><span style="color: #ff0000;">"LAST"</span>,<span style="color: #ff0000;">"LAST"</span><span style="color: #000000;">}</span>,<span style="color: #000000;">{</span><span style="color: #ff0000;">"MEMNO"</span>,<span style="color: #ff0000;">"MEMNO"</span><span style="color: #000000;">}</span>,<span style="color: #000000;">{</span><span style="color: #ff0000;">"TYPE+LAST"</span>,<span style="color: #ff0000;">"TYPE+LAST"</span><span style="color: #000000;">}</span>,<span style="color: #000000;">{</span><span style="color: #ff0000;">"BIRTHDATE"</span>,<span style="color: #ff0000;">"DTOS(BIRTHDATE)"</span><span style="color: #000000;">}</span>,etc.<span style="color: #000000;">}</span>, <span style="color: #000000;">{</span><span style="color: #ff0000;">"TABLE2"</span> ,<span style="color: #ff0000;">"CODID"</span>,<span style="color: #ff0000;">"CODID"</span><span style="color: #000000;">}</span><span style="color: #000000;">}</span> <span style="color: #000000;">}</span></div>[/code:1txb5isj]
Concerning indexes this has to be placed before trying to open any file.
But you will need also the
[code=fw:1txb5isj]<div class="fw" id="{CB}" style="font-family: monospace;">SET ADO TABLES <span style="color: #0000ff;">INDEX</span> LIST <span style="color: #0000ff;">TO</span> <span style="color: #000000;">{</span> <span style="color: #000000;">{</span><span style="color: #ff0000;">"TABLE1"</span>,<span style="color: #000000;">{</span><span style="color: #ff0000;">"FIRST"</span>,<span style="color: #ff0000;">"FIRST"</span><span style="color: #000000;">}</span> ,<span style="color: #000000;">{</span><span style="color: #ff0000;">"LAST"</span>,<span style="color: #ff0000;">"LAST"</span><span style="color: #000000;">}</span>,<span style="color: #000000;">{</span><span style="color: #ff0000;">"MEMNO"</span>,<span style="color: #ff0000;">"MEMNO"</span><span style="color: #000000;">}</span>,<span style="color: #000000;">{</span><span style="color: #ff0000;">"TYPE+LAST"</span>,<span style="color: #ff0000;">"TYPE,LAST"</span><span style="color: #000000;">}</span>,<span style="color: #000000;">{</span><span style="color: #ff0000;">"BIRTHDATE"</span>,<span style="color: #ff0000;">"BIRTHDATE"</span><span style="color: #000000;">}</span>,etc.<span style="color: #000000;">}</span>, <span style="color: #000000;">{</span><span style="color: #ff0000;">"TABLE2"</span> ,<span style="color: #ff0000;">"CODID"</span>,<span style="color: #ff0000;">"CODID"</span><span style="color: #000000;">}</span><span style="color: #000000;">}</span> <span style="color: #000000;">}</span></div>[/code:1txb5isj]
Please check the changes + with , The first "TYPE+LAST" I assume is the index name you want.
You can see these two sets has:
SET ADO TABLES all index expressions without any clipper function and the fields separated by ,.
These are used to build SQL SELECT expression ORDER BY
SET ADODBF TABLES are the same but with clipper fuctions and fields with +.
These are used to evaluate clipper expression ex:
&(indexkey(0))
ordkey()
ordfor()
etc.
I hope to have answer you question.[/quote:1txb5isj]
|
ADORDD Error : ADODEFAULT(5256)
|
Vilian,
All the sets only need to set once at top of main or some init program.
You only need to set ADO TABLE and ADODBF TABLE the tables with indexes.
Tables without indexes dont have to be set.
|
ADORDD Error : ADODEFAULT(5256)
|
Dear Antonio F.,
If I use MySql, I have to set ADODBF TABLES with Clipper Expression Index.
Do I need to set ADO TABLES also?
[quote="AHF":ud8ympqr]
You need always to set both ADODBF TABLES and ADO TABLES[/quote:ud8ympqr]
Yes, It has created in my MySql Db.
No, It just create from your code (LOCK CONTROL)
[quote="AHF":ud8ympqr]
How do you have a tLocks in MySql ?
Do you have such a table already in your app?[/quote:ud8ympqr]
|
ADORDD Error : ADODEFAULT(5256)
|
Ducth,
Please post your set SET ADO LOCK CONTROL
Please check the Lucas post in the topic 2012 server.
|
ADORDD Error : ADODEFAULT(5256)
|
Dear Antonio,
I have set SET ADO FORCE LOCK OFF as Lucas recommendation, it's working now.
Can I make SET RELATION TO ... INTO ....?
Thanks in advance,
Dutch
|
ADORDD Error : ADODEFAULT(5256)
|
Dutch,
You can do whatever you do with any other rdd like dbfcdx.
Please read the readme.pdf in github its like a small manual you have everything there.
The only limitation is the variables evaluation in index expressions as they are unknown to adordd SQL.
Here its just like ADS rdd.
And actions over delete records.
Thats it
|
ADORDD Error : ADODEFAULT(5256)
|
This is my sample code. I have 2 table and need to make RELATION but it got an error "ADORDD/1201 Work area not indexed: GST"
1. ccrtbl it has tbl_gstno = gst_intno in ccrgst
2. ccrgst
Now I try to make index for both table. What I do wrong?
[code=fw:279ucz3o]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">'adordd.ch'</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">'fivewin.ch'</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">'xbrowse.ch'</span><br /><br />REQUEST ADORDD<br /><br /><span style="color: #00C800;">Function</span> main<br /><span style="color: #00C800;">LOCAL</span> cSql :=<span style="color: #ff0000;">""</span><br /><span style="color: #00C800;">local</span> oDlg, oBrw, oFont, oBtn<br /> <br /> RddRegister<span style="color: #000000;">(</span><span style="color: #ff0000;">"ADORDD"</span>,<span style="color: #000000;">1</span><span style="color: #000000;">)</span> <br /> RddSetDefault<span style="color: #000000;">(</span><span style="color: #ff0000;">"ADORDD"</span><span style="color: #000000;">)</span> <br /><br /> <span style="color: #B900B9;">//This is the same as for other rdds</span><br /> SET AUTOPEN <span style="color: #0000ff;">ON</span> <span style="color: #B900B9;">//might be OFF if you wish</span><br /> SET AUTORDER <span style="color: #0000ff;">TO</span> <span style="color: #000000;">1</span> <span style="color: #B900B9;">// first index opened can be other</span><br /> SET ADO <span style="color: #00C800;">DEFAULT</span> DATABASE <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">"easyfo"</span> <span style="color: #00C800;">SERVER</span> <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">"localhost"</span> ENGINE <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">"MYSQL"</span> USER <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">"root"</span> PASSWORD <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">"nimda"</span> <br /> SET ADO FORCE LOCK OFF<br /> SET ADO <span style="color: #00C800;">DEFAULT</span> RECNO FIELD <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">"ID"</span> <br /> SET ADO TEMPORAY NAMES <span style="color: #0000ff;">INDEX</span> LIST <span style="color: #0000ff;">TO</span> <span style="color: #000000;">{</span><span style="color: #ff0000;">"TMP"</span>,<span style="color: #ff0000;">"TEMP"</span><span style="color: #000000;">}</span><br /> SET ADODBF TABLE <span style="color: #0000ff;">INDEX</span> LIST <span style="color: #0000ff;">TO</span> <span style="color: #000000;">{</span> <span style="color: #000000;">{</span><span style="color: #ff0000;">"ccrtbl"</span>,<span style="color: #000000;">{</span><span style="color: #ff0000;">"CCRTBL1"</span>,<span style="color: #ff0000;">"UPPER(TBL_LAST)"</span><span style="color: #000000;">}</span><span style="color: #000000;">}</span>, ;<br /> <span style="color: #000000;">{</span><span style="color: #ff0000;">"ccrgst"</span>,<span style="color: #000000;">{</span><span style="color: #ff0000;">"CCRGST1"</span>,<span style="color: #ff0000;">"GST_INTNO"</span><span style="color: #000000;">}</span><span style="color: #000000;">}</span> ;<br /> <span style="color: #000000;">}</span><br /> USE ccrgst <span style="color: #0000ff;">ALIAS</span> <span style="color: #ff0000;">'gst'</span> <span style="color: #00C800;">NEW</span> SHARED<br /> USE ccrtbl <span style="color: #0000ff;">ALIAS</span> <span style="color: #ff0000;">'tbl'</span> <span style="color: #00C800;">NEW</span> SHARED<br /> SET RELATION <span style="color: #0000ff;">TO</span> tbl->tbl_gstno INTO gst<br /> tbl-><span style="color: #000000;">(</span>dbgotop<span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">'Tahoma'</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">-14</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">600</span>, <span style="color: #000000;">800</span> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">'Test ADORDD'</span> <span style="color: #0000ff;">PIXEL</span> ;<br /> <span style="color: #0000ff;">FONT</span> oFont<br /> <br /> @ <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">OF</span> oDlg ;<br /> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">350</span>,<span style="color: #000000;">280</span> <span style="color: #0000ff;">PIXEL</span> ;<br /> FIELDS tbl->tbl_rmno, tbl->tbl_last, tbl->tbl_first, dtoc<span style="color: #000000;">(</span>tbl->tbl_arr<span style="color: #000000;">)</span>, dtoc<span style="color: #000000;">(</span>tbl->tbl_dep<span style="color: #000000;">)</span> ;<br /> HEADERS <span style="color: #ff0000;">'Room'</span>, <span style="color: #ff0000;">'Last'</span>, <span style="color: #ff0000;">'First'</span>, <span style="color: #ff0000;">'Arrival'</span>, <span style="color: #ff0000;">'Departure'</span> ;<br /> FIELDSIZES <span style="color: #000000;">50</span>, <span style="color: #000000;">150</span>, <span style="color: #000000;">150</span>, <span style="color: #000000;">70</span>, <span style="color: #000000;">70</span> ;<br /> <span style="color: #0000ff;">ALIAS</span> <span style="color: #ff0000;">'tbl'</span> ; <span style="color: #B900B9;">// SORT "tbl_rmno" ;</span><br /> LINES <br /> <br /> oBrw:<span style="color: #000000;">nMarqueeStyle</span> := MARQSTYLE_HIGHLROWMS<br /> oBrw:<span style="color: #000000;">nMarqueeStyle</span> := MARQSTYLE_HIGHLROW<br /> oBrw:<span style="color: #000000;">nRowDividerStyle</span> := LINESTYLE_LIGHTGRAY<br /> oBrw:<span style="color: #000000;">nColDividerStyle</span> := LINESTYLE_LIGHTGRAY<br /> oBrw:<span style="color: #000000;">nHeaderHeight</span> := <span style="color: #000000;">26</span><br /> oBrw:<span style="color: #000000;">nRowHeight</span> := <span style="color: #000000;">24</span><br /> oBrw:<span style="color: #000000;">lHScroll</span> := .F.<br /> oBrw:<span style="color: #000000;">nStretchCol</span> := STRETCHCOL_LAST<br /> oBrw:<span style="color: #000000;">lAllowRowSizing</span> := .F.<br /> oBrw:<span style="color: #000000;">lColDividerComplete</span>:= .T.<br /><br /> oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <br /> oDlg:<span style="color: #000000;">oClient</span> := oBrw<br /> <br /> @ <span style="color: #000000;">281</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">BTNBMP</span> oBtn <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">'Delete'</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">35</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">PIXEL</span> ;<br /> <span style="color: #000000;">2007</span> ;<br /> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span><span style="color: #00C800;">if</span><span style="color: #000000;">(</span>MsgYesNo<span style="color: #000000;">(</span><span style="color: #ff0000;">'Delete : '</span>+rtrim<span style="color: #000000;">(</span>tbl->Tbl_last<span style="color: #000000;">)</span><span style="color: #000000;">)</span>,tbl-><span style="color: #000000;">(</span>DbDelete<span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span>, <span style="color: #000000;">)</span>,oBrw:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /><br /> @ <span style="color: #000000;">281</span>,<span style="color: #000000;">41</span> <span style="color: #0000ff;">BTNBMP</span> oBtn <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">'Guest Name'</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">35</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">PIXEL</span> ;<br /> <span style="color: #000000;">2007</span> ;<br /> <span style="color: #0000ff;">ACTION</span> <span style="color: #0000ff;">Msginfo</span><span style="color: #000000;">(</span><span style="color: #ff0000;">'Guest Last : '</span>+rtrim<span style="color: #000000;">(</span>tbl->Tbl_last<span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /> <br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTER</span><br /><br />CLOSE tbl<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:279ucz3o]
|
ADORDD Error : ADODEFAULT(5256)
|
Dutch,
You have to set both SET ADO TABLES INDEX LIST TO... and SET ADODBF TABLES INDEX LIST TO...
|
ADORDD Error : ADODEFAULT(5256)
|
I did both set but still got the same error.
[code=fw:1rnjp3fy]<div class="fw" id="{CB}" style="font-family: monospace;">Application<br />==========<br /> Path and <span style="color: #0000ff;">name</span> : <span style="color: #000000;">D</span>:\V6\TADORDD\<span style="color: #0000ff;">Release</span>\test.EXE <span style="color: #000000;">(</span><span style="color: #000000;">32</span> bits<span style="color: #000000;">)</span><br /> Gr??e : <span style="color: #000000;">2</span>,<span style="color: #000000;">948</span>,<span style="color: #000000;">608</span> bytes<br /> Time <span style="color: #0000ff;">from</span> start : <span style="color: #000000;">0</span> hours <span style="color: #000000;">0</span> mins <span style="color: #000000;">57</span> secs <br /> Error occurred <span style="color: #00C800;">at</span> : <span style="color: #000000;">06</span>/<span style="color: #000000;">17</span>/<span style="color: #000000;">15</span>, <span style="color: #000000;">17</span>:<span style="color: #000000;">18</span>:<span style="color: #000000;">15</span><br /> Description : <span style="color: #000000;">Error</span> ADORDD/<span style="color: #000000;">1201</span> Work area not indexed: <span style="color: #000000;">GST</span><br /><br />Stack Calls<br />===========<br /> Called <span style="color: #0000ff;">from</span> : => UR_SUPER_ERROR<span style="color: #000000;">(</span><span style="color: #000000;">0</span><span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span> : <span style="color: #000000;">D</span>:\V6\AdoRdd\adordd.prg => ADO_RELEVAL<span style="color: #000000;">(</span><span style="color: #000000;">3912</span><span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span> : <span style="color: #000000;">D</span>:\V6\AdoRdd\adordd.prg => ADO_FORCEREL<span style="color: #000000;">(</span><span style="color: #000000;">3843</span><span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span> : <span style="color: #000000;">D</span>:\V6\AdoRdd\adordd.prg => ADO_GOTOP<span style="color: #000000;">(</span><span style="color: #000000;">859</span><span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span> : => DBGOTOP<span style="color: #000000;">(</span><span style="color: #000000;">0</span><span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span> : <span style="color: #000000;">D</span>:\V6\TADORDD\test.prg => MAIN<span style="color: #000000;">(</span><span style="color: #000000;">41</span><span style="color: #000000;">)</span></div>[/code:1rnjp3fy]
[code=fw:1rnjp3fy]<div class="fw" id="{CB}" style="font-family: monospace;"> SET ADODBF TABLE <span style="color: #0000ff;">INDEX</span> LIST <span style="color: #0000ff;">TO</span> <span style="color: #000000;">{</span> <span style="color: #000000;">{</span><span style="color: #ff0000;">"ccrtbl"</span>,<span style="color: #000000;">{</span><span style="color: #ff0000;">"CCRTBL1"</span>,<span style="color: #ff0000;">"TBL_RMNO"</span><span style="color: #000000;">}</span><span style="color: #000000;">}</span>, ;<br /> <span style="color: #000000;">{</span><span style="color: #ff0000;">"ccrgst"</span>,<span style="color: #000000;">{</span><span style="color: #ff0000;">"CCRGST1"</span>,<span style="color: #ff0000;">"GST_INTNO"</span><span style="color: #000000;">}</span><span style="color: #000000;">}</span> ;<br /> <span style="color: #000000;">}</span><br /><br /> SET ADO TABLES <span style="color: #0000ff;">INDEX</span> LIST <span style="color: #0000ff;">TO</span> <span style="color: #000000;">{</span> <span style="color: #000000;">{</span><span style="color: #ff0000;">"ccrtbl"</span>,<span style="color: #000000;">{</span><span style="color: #ff0000;">"CCRTBL1"</span>,<span style="color: #ff0000;">"TBL_RMNO"</span><span style="color: #000000;">}</span><span style="color: #000000;">}</span>, ;<br /> <span style="color: #000000;">{</span><span style="color: #ff0000;">"ccrgst"</span>,<span style="color: #000000;">{</span><span style="color: #ff0000;">"CCRGST1"</span>,<span style="color: #ff0000;">"GST_INTNO"</span><span style="color: #000000;">}</span><span style="color: #000000;">}</span> ;<br /> <span style="color: #000000;">}</span></div>[/code:1rnjp3fy]
[quote="lucasdebeltran":1rnjp3fy]Dutch,
You have to set both SET ADO TABLES INDEX LIST TO... and SET ADODBF TABLES INDEX LIST TO...[/quote:1rnjp3fy]
|
ADORDD Error : ADODEFAULT(5256)
|
[u:2y1nj7pk][b:2y1nj7pk][color=#BF0080:2y1nj7pk]Thank you so much Antonio and Lucas[/color:2y1nj7pk][/b:2y1nj7pk][/u:2y1nj7pk]
Index is working now, when I change all to uppercase. The RELATION is working too.
[code=fw:2y1nj7pk]<div class="fw" id="{CB}" style="font-family: monospace;"> SET ADODBF TABLES <span style="color: #0000ff;">INDEX</span> LIST <span style="color: #0000ff;">TO</span> <span style="color: #000000;">{</span> <span style="color: #000000;">{</span><span style="color: #ff0000;">"CCRTBL"</span>,<span style="color: #000000;">{</span><span style="color: #ff0000;">"CCRTBL1"</span>,<span style="color: #ff0000;">"TBL_RMNO"</span><span style="color: #000000;">}</span><span style="color: #000000;">}</span>, ;<br /> <span style="color: #000000;">{</span><span style="color: #ff0000;">"CCRGST"</span>,<span style="color: #000000;">{</span><span style="color: #ff0000;">"CCRGST1"</span>,<span style="color: #ff0000;">"GST_INTNO"</span><span style="color: #000000;">}</span><span style="color: #000000;">}</span> ;<br /> <span style="color: #000000;">}</span><br /><br /> SET ADO TABLES <span style="color: #0000ff;">INDEX</span> LIST <span style="color: #0000ff;">TO</span> <span style="color: #000000;">{</span> <span style="color: #000000;">{</span><span style="color: #ff0000;">"CCRTBL"</span>,<span style="color: #000000;">{</span><span style="color: #ff0000;">"CCRTBL1"</span>,<span style="color: #ff0000;">"TBL_RMNO"</span><span style="color: #000000;">}</span><span style="color: #000000;">}</span>, ;<br /> <span style="color: #000000;">{</span><span style="color: #ff0000;">"CCRGST"</span>,<span style="color: #000000;">{</span><span style="color: #ff0000;">"CCRGST1"</span>,<span style="color: #ff0000;">"GST_INTNO"</span><span style="color: #000000;">}</span><span style="color: #000000;">}</span> ;<br /> <span style="color: #000000;">}</span></div>[/code:2y1nj7pk]
[quote:2y1nj7pk]SET ADO TABLES INDEX LIST TO = indexes without of any clipper like expression only to be used by SQL
SET ADODBF TABLES INDEX LIST TO = indexes with the clipper like expressions needed by the app for its evaluations.
When we use &(indexkey(0)) we cant evaluate a index expression in ADO TABLES "name+dDate+nValue" we will get an error but we can issues a sql select like that.
Thus we need the ADODBF expression "name+DTOS(dDate)+STR(nValue) to do it.
The ADO indexes are for queries the ADODBF are for the normal clipper expressions to allow its evaluation.
ARRAY SPEC FOR BOTH CASES:
ATTENTION ALL MUST BE UPPERCASE
{ {"TABLE1",{"FIRST","FIRST"} }, {"TABLE2" ,{"CODID","CODID"}} }[/quote:2y1nj7pk]
|
ADORDD FAQs
|
After several users and client questions I decided to compile them all in adordd faqs.
Hope it will help you deciding to port your app to SQL.
1) Is adordd pure ADO ?
Yes
2) Does it work like another rdd without any limitations ?
Yes and its even more compatible with clipper dbf kind of rdds than ADS rdd.
You don't need anymore to be stuck to dbf kind of rdds.
3) Can I just link it with my app and run?
No.
You need to pre configure adordd with a couple of SETs in the top of your app prg,
but you don't need to alter any of your app code.
Please check 01_README.PDF and tryadordd.prg at github.
All this will take only a couple of minutes.
4) How do I configue adordd ?
At your initial or main procedure place:
[code=fw:1mu5me1l]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#INCLUDE</span> <span style="color: #ff0000;">"adordd.ch"</span><br /><br /> RddRegister<span style="color: #000000;">(</span><span style="color: #ff0000;">"ADORDD"</span>,<span style="color: #000000;">1</span><span style="color: #000000;">)</span> <br /> RddSetDefault<span style="color: #000000;">(</span><span style="color: #ff0000;">"ADORDD"</span><span style="color: #000000;">)</span> <br /><br /> <span style="color: #00C800;">IF</span> RDDSETDEFAULT<span style="color: #000000;">(</span><span style="color: #000000;">)</span> == <span style="color: #ff0000;">"ADORDD"</span><br /><br /> <span style="color: #B900B9;">//clipper index expressions as used by your app.</span><br /> <span style="color: #B900B9;">//if your app uses dynamic build tables names place here a tablename only the static part of it.</span><br /> SET ADODBF TABLES <span style="color: #0000ff;">INDEX</span> LIST <span style="color: #0000ff;">TO</span> check 01_readme.pdf <span style="color: #00C800;">for</span> arrray spec<br /> <br /> <span style="color: #B900B9;">//temporary index names static part of index name</span><br /> SET ADO TEMPORAY NAMES <span style="color: #0000ff;">INDEX</span> LIST <span style="color: #0000ff;">TO</span> <span style="color: #000000;">{</span><span style="color: #ff0000;">"TMP"</span>,<span style="color: #ff0000;">"TEMP"</span><span style="color: #000000;">}</span><br /> <span style="color: #B900B9;">//you should place here all index expressions that change the type or en of a field and or your UDFs </span><br /> SET ADO <span style="color: #0000ff;">INDEX</span> UDFS <span style="color: #0000ff;">TO</span> <span style="color: #000000;">{</span><span style="color: #ff0000;">"IF"</span>,<span style="color: #ff0000;">"&"</span>,<span style="color: #ff0000;">"SUBSTR"</span>,<span style="color: #ff0000;">"=="</span>,<span style="color: #ff0000;">"DESCEND"</span>,<span style="color: #ff0000;">"MYFUNC"</span><span style="color: #000000;">}</span><br /><br /> <span style="color: #B900B9;">//only needed for engines not supporting these kind of fields ex oracle sqlite access</span><br /> SET ADO TABLES LOGICAL FIELDS LIST <span style="color: #0000ff;">TO</span> <span style="color: #000000;">{</span> <span style="color: #000000;">{</span> <span style="color: #ff0000;">"ACESS"</span>, <span style="color: #000000;">{</span> <span style="color: #ff0000;">"PODEFAZER"</span> <span style="color: #000000;">}</span> <span style="color: #000000;">}</span> <span style="color: #000000;">}</span><br /> <br /> <span style="color: #B900B9;">//only needed for engines not supporting exact decimal field notation ex access sqlite</span><br /> SET ADO TABLES DECIMAL FIELDS LIST <span style="color: #0000ff;">TO</span> ;<br /> <span style="color: #000000;">{</span> <span style="color: #000000;">{</span><span style="color: #ff0000;">"ENCCLIST"</span>,<span style="color: #000000;">{</span><span style="color: #ff0000;">"PRECOVENDA"</span>,<span style="color: #000000;">4</span>,<span style="color: #ff0000;">"PRECOVEEST"</span>,<span style="color: #000000;">4</span> <span style="color: #000000;">}</span> <span style="color: #000000;">}</span>,;<br /> <span style="color: #000000;">{</span><span style="color: #ff0000;">"ENCFOCLI"</span>, <span style="color: #000000;">{</span><span style="color: #ff0000;">"PRECOUNIT"</span>, <span style="color: #000000;">4</span> <span style="color: #000000;">}</span> <span style="color: #000000;">}</span> <span style="color: #000000;">}</span><br /><br /> Both these sets are written <span style="color: #00C800;">for</span> you by adordd <span style="color: #0000ff;">when</span> uploading the tables.<br /><br /> <span style="color: #B900B9;">//defaut field to be used as recno</span><br /> SET ADO <span style="color: #00C800;">DEFAULT</span> RECNO FIELD <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">"HBRECNO"</span><br /> <span style="color: #B900B9;">//only needed if diferent for tables with different recno field from the default</span><br /> <span style="color: #B900B9;">//SET ADO FIELDRECNO TABLES LIST TO {{"TABLE1",{"ID"}},{"TABLE1",{"ID"}}}</span><br /> <span style="color: #B900B9;">//field to be used as deleted flag</span><br /> SET ADO <span style="color: #00C800;">DEFAULT</span> DELETED FIELD <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">"HBDELETE"</span><br /> <span style="color: #B900B9;">//only needed if diferent for tables with different deleted flag field from the default</span><br /> <span style="color: #B900B9;">//SET ADO FIELDDELETED TABLES LIST TO {"CLIENTE","HBMYDLETED1" }</span><br /><br /> <span style="color: #B900B9;">// if you want to have lock control as in any other rdd.</span><br /> <span style="color: #B900B9;">// you will need to have a share path to it</span><br /> <span style="color: #B900B9;">// working in WAN you will need for ex a VPN to this share path.</span><br /> <span style="color: #B900B9;">//SET ADO LOCK CONTROL SHAREPATH TO "d:\followup-testes" RDD TO "DBFCDX"</span><br /> SET ADO FORCE LOCK OFF<br /><br /> <span style="color: #B900B9;">// here connection gets active</span><br /> SET ADO <span style="color: #00C800;">DEFAULT</span> DATABASE <span style="color: #0000ff;">TO</span> <br /><br /> <span style="color: #B900B9;">//upload the database path structure as part of the table name.</span><br /> <span style="color: #B900B9;">//suppose that you have same table name in different folders.</span><br /> <span style="color: #B900B9;">// without tis set you could not upload both.</span><br /> <span style="color: #B900B9;">// with thsi set the path becomes part of the table name.</span><br /> SET ADO TABLENAME WITH PATH <span style="color: #0000ff;">ON</span><br /> <span style="color: #B900B9;">// uploaded with one path working now with another</span><br /> SET ADO ROOT PATH <span style="color: #0000ff;">TO</span> .... INSTEAD <span style="color: #0000ff;">OF</span> .....<br /> <br /> <span style="color: #B900B9;">//this set has an impact on performance as app execution continues</span><br /> <span style="color: #B900B9;">//before recordset itsstill being build.</span><br /> SET ADO CACHESIZE <span style="color: #0000ff;">TO</span> <span style="color: #000000;">50</span> ASYNC <span style="color: #0000ff;">ON</span> ASYNCNOWAIT <span style="color: #0000ff;">ON</span><br /><br /> <span style="color: #B900B9;">//pre open recordset at startup for faster acces during app execution</span><br /> SET ADO PRE OPEN THRESHOLD <span style="color: #0000ff;">TO</span> <span style="color: #000000;">5000</span><br /><br /> <span style="color: #00C800;">ENDIF</span><br /><br /> </div>[/code:1mu5me1l]
5) Does it works with xHarbour and Harbour ?
Yes.
6) How do I port my dbfs to SQL and how long can it take?
Place in your initial procedure after all adordd SETs:
[code=fw:1mu5me1l]<div class="fw" id="{CB}" style="font-family: monospace;"><br />hb_AdoUpload<span style="color: #000000;">(</span> <span style="color: #ff0000;">"C:<span style="color: #000000;">\M</span>y root databse path"</span>, <span style="color: #ff0000;">"DBFCDX"</span>, <span style="color: #ff0000;">"MY SQL CHOSEN ENGINE"</span>, .f. <span style="color: #000000;">)</span><br /> </div>[/code:1mu5me1l]
Choosing the last parameter .f. lOverwrite it allows you if you need to interrupt
porting of dbfs to SQL to run it again from the last uploaded table.
After loading it your app will continue execution now in the SQL chosen engine.
You can after comment that line to avoid run it again when app starts again.
Depending n your tables average size (millions of records) it can take long time.
If this is your case leave it uploading during night.
7) Can I open tables with million of records without a where clause?
Yes.
In this case you might use SET ADO THRESHOLD to wait a little more in app start up but
it will be extremely fast during execution.
<!-- s8) --><img src="{SMILIES_PATH}/icon_cool.gif" alt="8)" title="Cool" /><!-- s8) --> When I open big tables several times during app execution doesn't this lead to
out of memory or very slow opening of that table?
Adordd builds each table recordset only once.
If your table recordsets have million of records you will need enough memory for it and it can easily
reach some hundred MB or more.
When you open that table again the memory consumption its minimum as adordd clones that table set, which
means a kind of pointer to previous open recordset being extremely fast opening it again and very
low on memory use.
9) Can I use other SQL classes or function like adofuncs with adordd ?
Yes.
You can use the traditional navigational approach like clipper or SQL approach with INSERT, UPDATE, etc or a mix of both.
Adordd will have always the table recordset updated with table last version no matter if for ex updates are made
through functions or SQL statments through adordd or any other classes or functions.
10) But aren't there any restrictions using adordd and don't I need have to change any of my app code?
No restrictions.
No app change code.It works like any other dbf kind of rdd.
11) Is it fast like my dbf rdd application?
Its not so fast as dbf kind of rdd if your app has only 1 to 5 users but almost as fast.
The point is that adordd will not have performance degradation if your app works with 5 or 300 users
and neither on LAN or WAN as opposite to dbf rdd.
Adordd will need minimum working load on your SQL engine server.
12) Does it has transaction control ?
It has everything your SQL engine might offer.
If your chosen SQl engine is Transactional you will have transactions control in adordd.
13) What SQL engines can I use ?
ADS
ACCESS
ANYWHERE
DBASE
POSTGRE
FIREBIRD
FOXPRO
INFORMIX
MSSQL
MYSQL
ORACLE
POSTGRE
SQLITE
But others can be easily added to be supported.
14) What about if MS stops development or support to MS ADO in future?
Adordd its prepared to work with any other user class that provides the few methods and data
adordd uses from MS ADO.
This class could use arrays or dbfs as recordsets and interface through C to each SQL library bypassing
ODBC which might be much faster.
|
ADORDD FAQs
|
How do I solve error Called from UR_SUPER_ADDFIELD(0) ?
Solution:
must link tryadordd.prg with addorrd.prg, and not use hbusrrdd.ch from adordd repository (rename it or delete of your project, HB has your own hbusrrdd.ch in HB32dev\include)
|
ADORDD FAQs
|
Antonio F.,
Thanks for posting this. It is very informative and helpful.
Regards,
James
|
ADORDD FAQs
|
[quote:1izaw4r3]
I try to upload with hb_AdoUpload() however some tables with a couple of million of records take an eternity to be uploaded. Its impossible!
[/quote:1izaw4r3]
Solution:
In this case you have to upload these tables with some other tool.
Please try this:
[code=fw:1izaw4r3]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">//assuming that default rdd is adordd.</span><br /><br />afiles <span style="color: #B900B9;">//files to be uploaded from some folder</span><br /><br /><span style="color: #00C800;">for</span> n:= <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> len<span style="color: #000000;">(</span> afiles <span style="color: #000000;">)</span><br /> use afiles<span style="color: #000000;">[</span>n<span style="color: #000000;">]</span> VIA <span style="color: #ff0000;">"DBFCDX"</span> <span style="color: #B900B9;">// might be another like ADS</span><br /><br /> <span style="color: #00C800;">if</span> lastrec<span style="color: #000000;">(</span><span style="color: #000000;">)</span> > ?? <span style="color: #B900B9;">//your threshold</span><br /> <span style="color: #B900B9;">//to avoid overwrite existing tables you must check before if table exists</span><br /> copy <span style="color: #0000ff;">to</span> sqltable <span style="color: #00C800;">while</span> recno<span style="color: #000000;">(</span><span style="color: #000000;">)</span> < <span style="color: #000000;">1</span> <span style="color: #B900B9;">//creates empty table at SQL </span><br /> copy <span style="color: #0000ff;">to</span> cFileNoExt<span style="color: #000000;">(</span> afiles<span style="color: #000000;">[</span>n<span style="color: #000000;">]</span> <span style="color: #000000;">)</span>+<span style="color: #ff0000;">".csv"</span> <span style="color: #00C800;">while</span> !eof<span style="color: #000000;">(</span><span style="color: #000000;">)</span> DELIMITED WITH <your delimiter> <span style="color: #B900B9;">//all your data exported</span><br /><br /> <span style="color: #00C800;">else</span><br /> copy <span style="color: #0000ff;">to</span> sqltable <span style="color: #00C800;">while</span> !eof<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #B900B9;">// other smaller tables are exported directly</span><br /><br /> <span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">next</span><br /> </div>[/code:1izaw4r3]
This should be pretty fast!
After running this you will have all your tables uploaded to SQL engine.
The tables within your threshold will be empty (only structure has been created) and you'll have all exported data in tablename.csv file name.
Now you must find a way through some other available tool to rapidly import data from each .csv file name
into each SQL table.
Every SQL engine has some tool to do this job.
|
ADORDD FAQs
|
adordd its not closing the connection when exiting the app.
Solution:
ado_exit from adordd should be auto called when exiting the app however it seems
that without QUIT command thats not true in some conditions.
If you want to close all tables,sets and connection place before exiting in your app a call
to ADODB_CLOSE()
|
ADORDD FAQs
|
If I upload my tables with or without SET PATH ON and then I run my app from a different folder or set path
where there aren't any files (tables, indexes etc) at all and adordd its not working.
Solution:
If you are running from a different folder where aren't any files function file() tests in your app become invalid
because this function only checks the file system for the file.
If you keep the same folder and files you don't need to alter your app although these files are only there for
file() testing and since the files exist on SQL engine its ok.
If for ex you do this:
if !file("mypath\myfile")
dbcreate( "mypath\myfile"...
If that file gets deleted at the file system it will be created both at File System (fake empty file)
and at the SQL engine the true table file otherwise not.
If does not exist at the file system and exists at SQL then adordd recreates the file at SQL without any warning!
So changing to a folder where these file() tests are not working anymore you need to alter all the occurrences
of File() to hb_AdoRddFile() in order to look first at SQL if file exists and if not then at File System.
hb_AdoRddFile() detects if tables (table extension) or indexes (index extension) and if other extension checks
only file system for that file.
So you only do a replace in all your prgs files File(.. BY hb_AdoRddFile(.. keeping everything else exactly the same.
So the ex:
if !file("mypath\myfile")
dbcreate( "mypath\myfile"...
Its now working with SQL even if that file doesn't exist at file system.
Temporary files (index, tables) you don't need to do anything because adordd creates fake files
at the file system as indicate in your app and at SQL engine so your app continues to work exactly the same.
hb_AdoRddFile() will work with any other rdd so you can use it as a replacement for File() in any conditions.
Besides this if you uploaded all your files with SET ADO PATH ON you need now to SET ADO ROOT PATH TO "NEW DRIVE PATH" INSTEAD OF "OLD DRIVE PATH" otherwise the compound table name "mypath_tablename" will not work anymore because adordd now tries to open "new_drive_path_tablename" that does not exist.
If you uploaded tables with SET ADO PATH OFF you don't need to do nothing.
However please note that if you have the same table name in different folders uploading it like this
it will not be possible to have duplicated table names.
This can be set dynamically at your app accordingly to the path set by your app code so that it can run from
anywhere.
|
ADORDD FAQs
|
Dear Sir
How to connect to MSSQL using ADORDD and Create Database/Table ?
Thanks & Regards
Yunus.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.