I want to finish on next Tuesday the routines of SEEK / INDEX.
I want to finish on next Tuesday the routines of SEEK / INDEX.
Antonio noticed that the queries used in these examples are formatted for MySQL, I correct?
Vailton,
Yes, mostly.
Dear Vailton, please change that "red brain" avatar. It hurts ![]()
* Noted that it is necessary to allocate some default values for items of aWAData [] to avoid errors with NIL values such as a APPEND BLANK be called before a RecCount (). I adjusted it.
* Created in some drivers to control the possible SQL in use.
* GetFieldNames () / GetFieldEmptyValues () now receives an additional parameter to detect the type of driver in use and format the return correctly.
* New function SQLGetFullTableName () which returns the name of the table with his SCHEMA inside the database.
* Created the function SQLAdjustFn () which formats the file name passed as argument to a valid name in the database. Ideal for use in CREATE, USE, COPY, etc. ..
* GoBottom implementation
* Transaction Counter
* Introduced a flag for dbAppend (), InvalidBuffer and control of transactions.
* SQL_PUTVALUE () / SQL_GETVALUE () works with Buffer now.
* SQL_GOCOLD () implementation
* New function to build a SQL command (INSERT / UPDATE): SQL_WRITERECORD ()
* Support for LOGICAL / DATE fields in CREATE () / REPLACE
Comments on SQL_RECCOUNT ():
To compute the correct value of SQL_RECCOUNT () I suggest using the function
MAX () and not the value of COUNT () since we have 3 records with values
different:
Ex:
SQL_RECNO FIRST LAST AGE
************************************************** ***********************
1 HARBOUR PROJECT 9
2 XHARBOUR PROJECT 5
3 DBase VULCAN 28
4 CLIPPER SUMMER 23
************************************************** ***********************
Reccount: 4
After GOTO 3 / DELETE / PACK:
SQL_RECNO FIRST LAST AGE
************************************************** ***********************
1 HARBOUR PROJECT 9
2 XHARBOUR PROJECT 5
4 CLIPPER SUMMER 23
************************************************** ***********************
Reccount: 3
If we try to GOTO 3 the result is EOF ()... but i preferred not to amend this code.* Notei que é necessário atribuir alguns valores padrões para os itens de aWAData[] para evitar erros com valores NIL como no caso de um APPEND BLANK ser chamado ANTES de um RecCount(). Eu ajustei isto.
* Criado algumas constantes para controlar os possĂveis drivers SQL em uso.
* GetFieldNames()/GetFieldEmptyValues() agora recebe um parâmetro adicional para poder detectar o tipo de driver em uso e formatar o retorno corretamente.
* Nova função SQLGetFullTableName() que retorna o nome da tabela com o seu SCHEMA dentro do banco de dados.
* Criada a função SQLAdjustFn() que formata o nome do arquivo passado como argumento para um nome válido dentro do banco de dados. Ideal para ser usado em CREATE, USE, COPY, etc..
* GoBottom implementation
* Transaction counter
* Introduzido um flag para dbAppend(), InvalidBuffer & controle de transações.
* SQL_PUTVALUE() / SQL_GETVALUE() works with Buffer now.
* SQL_GOCOLD() implementation
* New function to build a SQL command (INSERT/UPDATE): SQL_WRITERECORD()
* Support for LOGICAL/DATE fields in CREATE() / REPLACE
Comentários sobre SQL_RECCOUNT():
Para computar o valor correto de SQL_RECCOUNT() eu sugeriria utilizar a função
MAX() e nĂŁo o valor de COUNT() visto que podemos ter 3 registros com valores
diferentes:
Ex:
SQL_RECNO FIRST LAST AGE
*************************************************************************
1 HARBOUR PROJECT 9
2 XHARBOUR PROJECT 5
3 DBase VULCAN 28
4 CLIPPER SUMMER 23
*************************************************************************
Reccount: 4
After GOTO 3 / DELETE / PACK :
SQL_RECNO FIRST LAST AGE
*************************************************************************
1 HARBOUR PROJECT 9
2 XHARBOUR PROJECT 5
4 CLIPPER SUMMER 23
*************************************************************************
Reccount: 3
Se tentarmos um GOTO 3 pela lĂłgica anterior resultaria em um EOF(), mas eu
preferi não alterar o código da função.Vailton,
Many thanks for your contributions to SQLWIN ![]()
In order to keep track of changes until we reach a workable version (to be uploaded to the harbour project SVN), we have arranged a page on our wiki, so we can visually find the differences from one version to the next one.
Here it is:
http://wiki.fivetechsoft.com/doku.php?i ... evelopment
I send you an email with your login and password to the wiki so you can update the wiki, and we can easily track the changes into its source code ![]()
p.s. Much nicer Avatar, thanks
(though your personal photo would be much more appreciated by all of us)
Vailton,
Please upload your changes (the entire sqlwin.prg) to the wiki:
http://wiki.fivetechsoft.com/doku.php?i ... evelopment
so we can see your modifications in the source code. Thanks ![]()
You should have received an email with your login and password for the wiki.
Ok I am waiting for the mail until it reached nothing.
Vailton,
Already sent ![]()
Antonio,
I can simply paste the entire source code that changed on this Wiki page?
Sorry many questions, is that never before used a Wiki.
![]()
Vailton,
Yes. Paste it in between:
...
<code clipper>
...all sqlwin.prg code
</code>
I have updated the code on page Antonio. As in my tests I split the main routines and routines to test the RDD in separate files, I took the liberty of creating another section in the Wiki for these routines.
I await comments,
PS: Excuse me for my bad English. I have done much use of Google Translate by these days.
![]()
Vailton,
Ok, very good ![]()
Now we can easily see the new changes:
http://wiki.fivetechsoft.com/doku.php?i ... ntdo=diff
http://wiki.fivetechsoft.com/doku.php?d ... evelopment
&
Very interesting this ... Were you able to test changes? What think?