topic
stringlengths
1
63
text
stringlengths
1
577k
when de los gets
Este es el código que estoy utilizando: // Genero el objeto get, esto esta dentro de un for ObjGet := TGet():New( (aDefFields[i][1]+1)*GET_CHARPIX_H, aDefFields[i][2]*GET_CHARPIX_W, bBloq,, nWidth*GET_CHARPIX_W, 11.3, cPicture,,,,oFont, .F.,, .T.,, .F.,, .F., .F.,, .F.,,, .F. ) //leo la clausula when para ese get lcWhen := aDefFields[i][6] //armo un bloque con la clausula y otra variable lcWhenBloq := "{||nFormEditPos:= " + STR( i, 3, 0 ) + "," + lcWhen + "}" // le asigno la evaluacion del bloque al dato bWhen del get ObjGet:bWhen := &( lcWhenBloq ) // le asigno la lectura del valid al objeto get ObjGet:bValid := &( aDefFields[i][7] ) Cada vez que un get pierde foco los pasos que realiza son los siguientes: * pasa por lostfocus de la clase tget * entra en gotfocus de la clase tget para asignarle el foco al get siguiente * evalua el valid del get que perdio foco * realiza todos los when y en las ventanas que tengo mas de 30 get se ve como pasa uno por uno aparte de los mensajes * le da foco al proximo get Muchas Gracias. Saludos. Leonor
when de los gets
Leonor: Estuve prestando atencion a un dialogo con whens y asi es, se evaluan todos los when, pero es el comportamiento normal y deseable (ademas ya lo confirmo el propio Antonio). En el codigo no se ve que contiene aDefFields[i][6] como condicion de los when, pero de todas maneras porque no queres que se evaluen todos los when de los gets ?. Sino, si queres controlar vos el momento de habilitar o deshabilitar los gets tendrias que hacerlo vos con :Enable() y <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->isable() en cada get en el momento que lo necesites. Saludos,
when de los gets
Bien en realidad esto lo encuentro por otro problema relacionado que tengo: cuando un get pierde foco realiza los siguientes pasos: * entra en lostfocus de la clase tget * entra en gotfocus de la clase tget para darle foco al proximo get * realiza la condicion valid del get que perdio foco, cuando esa condicion no se cumple hace que pierda foco el get proximo y le vuelve a colocar el foco al que esta validando. Para hacer que pierda foco el get siguiente verifica tambien la condicion valid del mismo cuando el proximo get no es obligatorio esta todo bien, pero si el proximo get es obligatorio entra en un blucle y no puede salir de el. Como puedo solucionar ese problema. Mil Gracias por el tiempo que me estan dedicando. Saludos. Leonor
when de los gets
Leonor: A que te referis con "entra en un blucle y no puede salir de el", cuando un get no cumple el valid pasa lo que vos decis, el foco 'rebota' y vuelve al get que no cumple el valid y no podes ir al siguiente hasta que no se cumpla, salvo que tengas especificado por ejemplo la tecla VK_UP para devolver .T. en el valid y en ese caso x ejemplo volver al get anterior. Saludos,
when de los gets
Te explico puntualmente un caso en el que me entra en un bucle y no sale de el. Vamos a suponer que tengo 4 get trabajando en una ventana: Codigo: primer get con valid verificando que no exista en la tabla y mensaje de codigo existente Nombre: segundo get con valid que no sea vacio y mensaje tiene que ingresar un dato si o si Direccion: tercer get no importa con que Localidad: cuarto get no importa con que Toma foco codigo, ingreso un codigo existente presiono enter, entra en lostfocus de clase tget, entra en gotfocus de clase tget pasando el foco al segundo get, valida el primer get como existe efectivamente rebota y quiere volver el foco al primer get, entonces entra en lostfocus el segundo get lo valida y como es vacio me muestra simultaneamente los dos msginfo y no para hasta que aborto el programa. Yo tengo una funcion armada que revisa cuando el último get pierde foco guarda todos los gets en la tabla correspondiente, esa funcion esta asignada al dato bLostFocus de cada get pero previamente conte los gets activos en la ventana y lo primero que pregunto es si es el último get lo hace sino sigue. Si en el valid del segundo get no hay ninguna condicion el foco rebota al primer get y queda ahi hasta que coloco un codigo inexistente como corresponde, el problema se presenta cuando el valid del get siguiente tiene una condicion obligatoria. Nuevamente Mil Gracias. Saludos. Leonor.
when de los gets
Leonor: Eso no deberia pasar, el valid del segundo get no deberia actuar si no se cumple el del primero. El problema debe estar en el codigo que debes tener asignado a algun :bGotFocus o :bLostFocus que debe hacer que se refresquen los dos gets y actuen ambos valids. Para no hacerla tan larga por aca hace lo siguiente, mandame un prg reducido ilustrativo del problema que yo pueda compilar, probar y corregir a mi correo. Saludos,
where do I get an example xBrowse (TDolphin)? *Fixed*
Dear All, I try to move to MySql with xBrowse but I cannot fine absolutely simple example in the group. Can anyone show an example to use xBrowse MySql via TDolphin or TMySql. Like [code=fw:19a50pyx]<div class="fw" id="{CB}" style="font-family: monospace;">@  <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #0000ff;">XBROWSE</span> COLUMNS oQry:<span style="color: #000000;">Field1</span>, oQry:<span style="color: #000000;">Field2</span> ;<br />                          HEADERS <span style="color: #ff0000;">'Field1 Header'</span>, <span style="color: #ff0000;">'Field2 Header'</span> ;<br />                          DATASOURCE oQry ;<br />                          ....<br /> </div>[/code:19a50pyx] I can make from XBROWSER( oQry ) but it is not user define columns. Thanks in advance,
where do I get an example xBrowse (TDolphin)? *Fixed*
dutch: This is the way I do. Maybe it helps you. (MYSQL) [code=fw:j3ziw7lb]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #000000;">1</span>-<br />oQry:=oServer:<span style="color: #000000;">Query</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"SELECT fechemis,td,numdoc,concepto,SUM(debe) debitos, SUM(haber) creditos, SUM(debe-haber) Diferencia, codibancos FROM "</span> + cTablaFuente + <span style="color: #ff0000;">" GROUP BY numdoc HAVING SUM(debe-haber) != 0;"</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">if</span> oQry:<span style="color: #000000;">LastRec</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> != <span style="color: #000000;">0</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">xBrowse</span><span style="color: #000000;">&#40;</span>oQry,<span style="color: #ff0000;">" DOCUMENTOS"</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">endif</span><br />oQry:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br /><br />.or.<br /><span style="color: #B900B9;">//---------------------------------//</span><br /><span style="color: #000000;">2</span>-<br />oQry := oServer:<span style="color: #000000;">Query</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"SELECT * FROM comprobd ORDER BY numdoc ;"</span><span style="color: #000000;">&#41;</span><br />oQry:<span style="color: #000000;">Gotop</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br />&nbsp; oLbx := TXBrowse<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> oDlg <span style="color: #000000;">&#41;</span> <br />&nbsp; oLbx:<span style="color: #000000;">SetMySql</span><span style="color: #000000;">&#40;</span>oQry,.f.<span style="color: #000000;">&#41;</span><br /><br />&nbsp; oCol = oLbx:<span style="color: #000000;">AddCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; oCol:<span style="color: #000000;">bStrData</span> = <span style="color: #000000;">&#123;</span> || Transform<span style="color: #000000;">&#40;</span> oQry:<span style="color: #000000;">NumCD</span>,<span style="color: #ff0000;">"9999999999"</span><span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #000000;">&#125;</span><br />&nbsp; oCol:<span style="color: #000000;">cHeader</span> = <span style="color: #ff0000;">"Num/CD"</span> <br />&nbsp; oCol:<span style="color: #000000;">nWidth</span> = <span style="color: #000000;">70</span><br />&nbsp; oCol:<span style="color: #000000;">nFootStrAlign</span> := <span style="color: #000000;">1</span><br /><br />&nbsp; oCol = oLbx:<span style="color: #000000;">AddCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; oCol:<span style="color: #000000;">bStrData</span> = <span style="color: #000000;">&#123;</span> || DtoC<span style="color: #000000;">&#40;</span>oQry:<span style="color: #000000;">Fechemis</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; oCol:<span style="color: #000000;">nDataStrAlign</span> := <span style="color: #000000;">1</span><br />&nbsp; oCol:<span style="color: #000000;">cHeader</span> = <span style="color: #ff0000;">"Fecha"</span> <br />&nbsp; oCol:<span style="color: #000000;">nWidth</span> = <span style="color: #000000;">66</span><br />&nbsp;</div>[/code:j3ziw7lb] Regards.
where do I get an example xBrowse (TDolphin)? *Fixed*
Ducth, I tested all the options to work with Mysql, now I'm working with tDolphin with no problem at all, locally, in LAN, WEB. There´s plenty of samples in tDolphin's web <!-- m --><a class="postlink" href="http://tdolphin.blogspot.com/">http://tdolphin.blogspot.com/</a><!-- m --> and in samples directory in tDolhpin´s installation If you have any problem, send me a private mail From Chile Adolfo
where do I get an example xBrowse (TDolphin)? *Fixed*
Tmysql +xbrowse <!-- w --><a class="postlink" href="http://www.xtech.com.cn/down/sample1.prg">www.xtech.com.cn/down/sample1.prg</a><!-- w --> <!-- w --><a class="postlink" href="http://www.xtech.com.cn/down/sample2.prg">www.xtech.com.cn/down/sample2.prg</a><!-- w --> Regards! Shuming Wang
where do I get an example xBrowse (TDolphin)? *Fixed*
[quote="dutch":37jramz0]Dear All, I try to move to MySql with xBrowse but I cannot fine absolutely simple example in the group. Can anyone show an example to use xBrowse MySql via TDolphin or TMySql. Like [code=fw:37jramz0]<div class="fw" id="{CB}" style="font-family: monospace;">@  <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #0000ff;">XBROWSE</span> COLUMNS oQry:<span style="color: #000000;">Field1</span>, oQry:<span style="color: #000000;">Field2</span> ;<br />                          HEADERS <span style="color: #ff0000;">'Field1 Header'</span>, <span style="color: #ff0000;">'Field2 Header'</span> ;<br />                          DATASOURCE oQry ;<br />                          ....<br /> </div>[/code:37jramz0] I can make from XBROWSER( oQry ) but it is not user define columns. Thanks in advance,[/quote:37jramz0] Just the same way as you write code for DBF or ADO RecordSet. [code=fw:37jramz0]<div class="fw" id="{CB}" style="font-family: monospace;"><br />oQry := oSrv:<span style="color: #000000;">Query</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"SELECT * FROM CUSTOMER"</span> <span style="color: #000000;">&#41;</span><br />@ <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">OF</span> oWnd DATASOURCE oQry ;<br />COLUMNS <span style="color: #ff0000;">"First"</span>, <span style="color: #ff0000;">"Last"</span>, <span style="color: #ff0000;">"Salary"</span>  ;<br />HEADERS <span style="color: #ff0000;">"FirstName"</span>, <span style="color: #ff0000;">"SurName"</span>, <span style="color: #ff0000;">"Salary"</span> <otherclauses><br /> </div>[/code:37jramz0] If anyone knows how to code xbrowse for DBF, he already knows coding for any other datasource, be it TDataBase, ADO RecordSet, TMySql or TDolphin or any other. Exactly the same code works for all. Only difference is the value for the clause DATASOURCE. For example, in this statement: [code=fw:37jramz0]<div class="fw" id="{CB}" style="font-family: monospace;"><br />@ <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">OF</span> oWnd DATASOURCE uVar ;<br />COLUMNS <span style="color: #ff0000;">"First"</span>, <span style="color: #ff0000;">"Last"</span>, <span style="color: #ff0000;">"City"</span>, <span style="color: #ff0000;">"Salary"</span> <otherclauses><br /> </div>[/code:37jramz0] if uVar is caharacter variable and is an alias name, it is DBF browse. If uvar is an object and a recordset, it is ADO browse If uvar is an object and TMySql/TDolphin Query, then it is TMySql/TDolphin Query If uVar is an object and TDatabase class, it is TDatabase browse. If uvar is an object and is oTree it is tree browse. If uvar is an object and has Ado properties, it is properties browse. If uvar is any other object, it browses the datas of the object.
where do I get an example xBrowse (TDolphin)? *Fixed*
You modified the title as *Fixed*. Is the xbrowse with Dolphin working well for you? If so can you post a sample xbrowse command you have used?
where do I get an example xBrowse (TDolphin)? *Fixed*
Dear Mr.Rao, Thank you for your kind help, this is the code (sample from Daniel Blog) that working now. [code=fw:jwvu68g0]<div class="fw" id="{CB}" style="font-family: monospace;"><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;">"ribbon.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"hbcompat.ch"</span><br /><br /><span style="color: #00C800;">FUNCTION</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">LOCAL</span> oDlg<br />   <span style="color: #00C800;">LOCAL</span> aBtns := Array<span style="color: #000000;">&#40;</span> <span style="color: #000000;">5</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">LOCAL</span> oBrw, oQry, oServer<br />   <span style="color: #00C800;">local</span> cValType<br /><br />   <br />   D_SetCaseSensitive<span style="color: #000000;">&#40;</span> .T. <span style="color: #000000;">&#41;</span><br />   <br />   <span style="color: #00C800;">IF</span> <span style="color: #000000;">&#40;</span> oServer := ConnectTo<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> == <span style="color: #00C800;">NIL</span><br />      msgalert<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'cannot connect to server'</span><span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br />   <span style="color: #00C800;">ENDIF</span><br />   oServer:<span style="color: #000000;">bDebug</span> = <span style="color: #000000;">&#123;</span>| cQry | LogFile<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"debuf.log"</span>, <span style="color: #000000;">&#123;</span>cQry<span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />   <br />   oQry = oServer:<span style="color: #000000;">Query</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"SELECT * FROM rmty_avl"</span><span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// where rta_rmty='LOB'" )</span><br />   <br />   oQry:<span style="color: #000000;">SetPages</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">100</span> <span style="color: #000000;">&#41;</span><br />   oQry:<span style="color: #000000;">bOnChangePage</span> = <span style="color: #000000;">&#123;</span> || oBrw:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, ChangeTitle<span style="color: #000000;">&#40;</span> oQry, oDlg <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//   cValType := valtype( oQry:FieldGet( 'rta_stamp' )) return "C"</span><br /><span style="color: #B900B9;">//   cValType := oQry:FieldType( 'rta_stamp' )      return "T"</span><br /><span style="color: #B900B9;">//   cValType := valtype( oQry:rta_stamp )          return "C"</span><br /><br /><span style="color: #B900B9;">//   msginfo(cValType)</span><br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Current Page: "</span> + StrZero<span style="color: #000000;">&#40;</span> oQry:<span style="color: #000000;">nCurrentPage</span>, <span style="color: #000000;">5</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">" / "</span> + StrZero<span style="color: #000000;">&#40;</span> oQry:<span style="color: #000000;">nMaxPages</span>, <span style="color: #000000;">5</span> <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">565</span>, <span style="color: #000000;">480</span> <br />   <br /><br />   BuildButtons<span style="color: #000000;">&#40;</span> aBtns, oDlg, oQry <span style="color: #000000;">&#41;</span><br /><br />   @ <span style="color: #000000;">30</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">OF</span> oDlg DATASOURCE oQry ;<br />            COLUMNS <span style="color: #ff0000;">"rta_date"</span>, <span style="color: #ff0000;">"rta_rmty"</span>, <span style="color: #ff0000;">"rta_tlrm"</span>, <span style="color: #ff0000;">"rta_occ"</span> ;<br />            COLSIZES <span style="color: #000000;">100</span>, <span style="color: #000000;">100</span>, <span style="color: #000000;">100</span>, <span style="color: #000000;">100</span> ;<br />            HEADERS <span style="color: #ff0000;">"Date"</span>, <span style="color: #ff0000;">"RmTy"</span>, <span style="color: #ff0000;">"Total Room"</span>, <span style="color: #ff0000;">"Occupied"</span> ;<br />            <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">260</span>, <span style="color: #000000;">200</span> LINES ;<br />            <span style="color: #0000ff;">UPDATE</span><br /><br /><span style="color: #B900B9;">//          AUTOCOLS AUTOSORT PIXEL SIZE 260, 200 LINES</span><br /><br /><span style="color: #B900B9;">// Uncomment this line for fivewin version < 10.7   </span><br /><span style="color: #B900B9;">//   SetDolphin( oBrw, oQry )</span><br />   <br />   oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />      <br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br />   <br />   <br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><br />PROCEDURE BuildButtons<span style="color: #000000;">&#40;</span> aBtns, oDlg, oQry <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">LOCAL</span> nPage<br /><br /><br />   @ <span style="color: #000000;">10</span>, <span style="color: #000000;">10</span> RBBTN aBtns<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"&First"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">20</span>, <span style="color: #000000;">15</span> ;<br />            GROUPBUTTON FIRST  <span style="color: #0000ff;">CENTER</span> ;<br />            <span style="color: #0000ff;">ROUND</span> ROUNDSIZE <span style="color: #000000;">2</span>;<br />            <span style="color: #0000ff;">ACTION</span><span style="color: #000000;">&#40;</span> oQry:<span style="color: #000000;">FirstPage</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> ;<br />            <span style="color: #0000ff;">WHEN</span><span style="color: #000000;">&#40;</span> oQry:<span style="color: #000000;">nCurrentPage</span> > <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>                    <br /><br />   @ <span style="color: #000000;">10</span>, <span style="color: #000000;">30</span> RBBTN  aBtns<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"&Prev"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">20</span>, <span style="color: #000000;">15</span> ;<br />            GROUPBUTTON  <span style="color: #0000ff;">CENTER</span> ;<br />            <span style="color: #0000ff;">ROUND</span> ROUNDSIZE <span style="color: #000000;">2</span>;<br />            <span style="color: #0000ff;">ACTION</span><span style="color: #000000;">&#40;</span> oQry:<span style="color: #000000;">PrevPage</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> ;<br />            <span style="color: #0000ff;">WHEN</span><span style="color: #000000;">&#40;</span> oQry:<span style="color: #000000;">nCurrentPage</span> > <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br /><br />   @ <span style="color: #000000;">10</span>, <span style="color: #000000;">50</span> RBBTN aBtns<span style="color: #000000;">&#91;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"&Goto"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">20</span>, <span style="color: #000000;">15</span> ;<br />             GROUPBUTTON  <span style="color: #0000ff;">CENTER</span> ;<br />             <span style="color: #0000ff;">ROUND</span> ROUNDSIZE <span style="color: #000000;">2</span>;<br />             <span style="color: #0000ff;">ACTION</span><span style="color: #000000;">&#40;</span> nPage := oQry:<span style="color: #000000;">nCurrentPage</span>,;<br />                     MsgGet<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Select Page:"</span>, <span style="color: #ff0000;">"Page"</span>, @nPage <span style="color: #000000;">&#41;</span>,;<br />                     oQry:<span style="color: #000000;">GoToPage</span><span style="color: #000000;">&#40;</span> nPage <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />  <br />   @ <span style="color: #000000;">10</span>, <span style="color: #000000;">70</span> RBBTN aBtns<span style="color: #000000;">&#91;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"&Next"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">20</span>, <span style="color: #000000;">15</span> ;<br />             GROUPBUTTON  <span style="color: #0000ff;">CENTER</span> ;<br />             <span style="color: #0000ff;">ROUND</span> ROUNDSIZE <span style="color: #000000;">2</span>;<br />             <span style="color: #0000ff;">ACTION</span><span style="color: #000000;">&#40;</span> oQry:<span style="color: #000000;">NextPage</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> ;<br />             <span style="color: #0000ff;">WHEN</span><span style="color: #000000;">&#40;</span> oQry:<span style="color: #000000;">nCurrentPage</span> < oQry:<span style="color: #000000;">nMaxPages</span> <span style="color: #000000;">&#41;</span><br /><br />   @ <span style="color: #000000;">10</span>, <span style="color: #000000;">90</span> RBBTN aBtns<span style="color: #000000;">&#91;</span> <span style="color: #000000;">5</span> <span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"&Last"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">20</span>, <span style="color: #000000;">15</span> ;<br />             GROUPBUTTON END  <span style="color: #0000ff;">CENTER</span> ;<br />             <span style="color: #0000ff;">ROUND</span> ROUNDSIZE <span style="color: #000000;">2</span>;             <br />             <span style="color: #0000ff;">ACTION</span><span style="color: #000000;">&#40;</span> oQry:<span style="color: #000000;">LastPage</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> ;<br />             <span style="color: #0000ff;">WHEN</span><span style="color: #000000;">&#40;</span> oQry:<span style="color: #000000;">nCurrentPage</span> < oQry:<span style="color: #000000;">nMaxPages</span> <span style="color: #000000;">&#41;</span><br /><br /><br /><span style="color: #00C800;">RETURN</span> <br /><br />PROCEDURE ChangeTitle<span style="color: #000000;">&#40;</span> oQry, oDlg <span style="color: #000000;">&#41;</span><br /><br />   oDlg:<span style="color: #000000;">cTitle</span> = <span style="color: #ff0000;">"Current Page: "</span> + StrZero<span style="color: #000000;">&#40;</span> oQry:<span style="color: #000000;">nCurrentPage</span>, <span style="color: #000000;">5</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">" / "</span> + StrZero<span style="color: #000000;">&#40;</span> oQry:<span style="color: #000000;">nMaxPages</span>, <span style="color: #000000;">5</span> <span style="color: #000000;">&#41;</span><br />   <br /><span style="color: #00C800;">RETURN</span><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"connto.prg"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"setbrw.prg"</span>  <br /> </div>[/code:jwvu68g0] [quote="nageswaragunupudi":jwvu68g0]You modified the title as *Fixed*. Is the xbrowse with Dolphin working well for you? If so can you post a sample xbrowse command you have used?[/quote:jwvu68g0]
where download resedit 64bits
Hello, I've donwloaded resedit 64 from <!-- w --><a class="postlink" href="http://www.resedit.net">www.resedit.net</a><!-- w --> and it has a lot of malware. I've spend half an hour removing it from my computer. Do you know where to download resedit 64 free of malware ? Regards, José Luis
where download resedit 64bits
Jose Give me your e-mail address and I will zip up my version and send it to you. Rick Lipkin
where download resedit 64bits
Hi Rick, my e-mail is joseluis.snczATgmailDOTcom Thanks and regards,
where download resedit 64bits
Please use wetransfer.com free because gmail rejects attached files with exes inside. Regards,
where download resedit 64bits
[quote="José Luis Sánchez":37c1358f]Please use wetransfer.com free because gmail rejects attached files with exes inside. Regards,[/quote:37c1358f] He can to use .zop or .ror or someone extension in attachments files for avoid gmail antivirus scan.
where download resedit 64bits
Jose I sent your file via regular e-mail .. I am also going to send it through a File hosting service called HighTail.com Rick Lipkin
where download resedit 64bits
Thanks Rick. I realized that the 64 versión doesn't show the adjustment lines in dialogs, isn't it ? In the 32bits versión, when you move a control in a dialog the adjustment grid appears to adjust the size or edges to other controls, but in 64 versión this lines doesn't appears. Or I'm doing something wrong. Regards,
where download resedit 64bits
Jose I have not used the 32 bit version so I have nothing to compare it with .. I do know, when I try to align controls ( right\left ) I do not necessarily get the adjustment I expected .. I have to do it the old fashioned way .. look at the XY co-ordinates and match up the alignment manually... <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( --> .. Hope I understood your question correctly ? Rick Lipkin
where download resedit 64bits
Rick, look this old entry from my blog [url:3v4x2t1e]https&#58;//cincomundos&#46;wordpress&#46;com/2011/04/23/resedit/[/url:3v4x2t1e]. This is how the 32 bots versión looks when move a control, the blue and purple lines are the alignment lines showed in the 32 bit versión. Regards, Jose Luis
where download resedit 64bits
Hola, prueba con estos: <!-- m --><a class="postlink" href="https://app.box.com/s/u9v2rhwwdgtydeu3kdsf5a4po7jqaga8">https://app.box.com/s/u9v2rhwwdgtydeu3kdsf5a4po7jqaga8</a><!-- m --> <!-- m --><a class="postlink" href="https://app.box.com/s/djtm0omalydantevhzeofo9kxmkwvt8e">https://app.box.com/s/djtm0omalydantevhzeofo9kxmkwvt8e</a><!-- m --> Saludos Marcelo
where download resedit 64bits
Estimados amigos, he verificado los enlaces que publique y veo que están dos versiones la 1.6.4 y la 1.6.6 saludos
where download resedit 64bits
Jose Resedit 1.66 is the Current revision. Rick Lipkin
where is
Where is the visual fivewin ????i can´t wait more kkkkkkkkkkkkkkkkkkkkeveryday come in to see about ittttttttttAntonio post demo to us try itttt please..
where is
We are working on it until we can publish a first enough functional release. We are delayed, sorry... <!-- s:oops: --><img src="{SMILIES_PATH}/icon_redface.gif" alt=":oops:" title="Embarassed" /><!-- s:oops: -->
where is
All right Antonio <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->Only send this topic because did a long timethat u post link that was to be vfw.exe and more of 180 topic and nothing of visual fivewinGood Luck and that this job be so good the same that FiveWIn <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->thanks <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
where is
Someone news, Visual FiveWin ?
where is César E. Lozada ?
Cesar can you send me your tts class please ?
where is César E. Lozada ?
Cesar can you send me your tts class please ?
where is César E. Lozada ?
Silvio: This class worked with FWH2.7+XH099.5 and I can't make it run with newer FWH/xH versions. I'm trying to adapt it. If I success, I'll post a link for you download it. Regards.
where is César E. Lozada ?
thanks My problem is this on newest fwh not run, perhaps it can be compiled but then the exe make gpf I need it for mine dyslexic boy at school .... can you try to save the sound text on Mp3 file or another sound format ?
where is César E. Lozada ?
Silvio: I found another way to implement voices. You need: 1) google, download and INSTALL sapi5x.exe (I installed sapi51.exe) 2) download TTS voices in desired langauges (I found a lot of them in <!-- m --><a class="postlink" href="http://www.vioio.com/voices.htm">http://www.vioio.com/voices.htm</a><!-- m -->). But you can also use a paid high quality commercial voice. Here is the code: //Create oVoice:=CreateObject("Sapi.SpVoice") // Installed voices description nTotalVoices := oVoice:GetVoices():Count() //Number of installed voices aV:={} FOR i:=0 TO nTotalVoices-1 o:=oVoice:GetVoices()[i] aAdd(aV,o:GetDescription()) NEXT //Select voice nVoice oVoice:Voice:=oVoice:GetVoices()[nVoice] //nVoice=0..nTotalVoices-1 SysRefresh() //Configure oVoice:Volume:=100 //0..100 oVoice:Rate:=0 //-10..10 (Speed) //Actions oVoice:Speak(cText) oVoice:Pause() oVoice:Resume() More information about sapi.svoice in: <!-- m --><a class="postlink" href="http://msdn.microsoft.com/en-us/library/ms723602%28VS.85%29.aspx">http://msdn.microsoft.com/en-us/library ... 85%29.aspx</a><!-- m --> Tested working with FWH1007+xH1.216633+BCC55 in WinXP-SP3. No time for write a class (sorry). Regards César Lozada.
where is César E. Lozada ?
thanks I try to modify your old class but I need also the picth command I found this page [url:m4bdk5tg]http&#58;//www&#46;microsoft&#46;com/downloads/en/details&#46;aspx?FamilyID=5e86ec97-40a7-453f-b0ee-6583171b4530&displaylang=en[/url:m4bdk5tg] and I saw on the chm file there are many other commands perhaps you can see if we can save it unto a wave format or mp3 format. I 'm thinking you are only the best to see if it is possible because you Know the sapi commands good more than us I hope you found time for help us ...
where is César E. Lozada ?
Silvio, Look at this <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=6&t=12983&hilit=texto+a+voz#p68640">viewtopic.php?f=6&t=12983&hilit=texto+a+voz#p68640</a><!-- l --> In the last sample there is a way to redirect the output to a wav file. Is very simple. If anything more I can help or if something do not understand ... here I am.
where is Frank Demont
I tried to sent you an message at your mail ( demont[dot]frank[at]scarlet[dot]be) but it not run Can you write me at private mail silvio[dot]falconi[at]gmail[dot]com please ?
where is Jose Ignacio Jimenez Alarcon
some can give his email ?
where is Jose Ignacio Jimenez Alarcon
some can give me his email ?
where is José Luis Sánchez
Can you send me an private email pls I want ask you a question
where is Manfred Guttler ?
On 99 I write to Manfred for a print function but he not write to me his address was : Ringweg 11 - D - 29323 Wietze ( Germany) Someone can help me , please !!
where is Mastintin ? | donde está Mastintin
I have sent many messages to my friend Manuel but I have not received any reply Le envié muchos mensajes a mi amigo Manuel, pero no he recibido ninguna respuesta
where is Paco ?
where is canalfive ? I must sent a message to paco, where is he ? regards
where is Paco ?
<!-- e --><a href="mailto:paco@canalfive.com">paco@canalfive.com</a><!-- e --> Ea.
where is Santiago Perez ??
Santiago can you write to private email please !!!
where is jsco ?
send me a msg to my provate email pls
where is the tfiscal class
Some have tfiscal.prg class fivewin ?
where is ukservice ?
Can you write to private email please ?
where to download Activesync & Emulator ?
Hi, I unable to download following files from microsoft website, - Microsoft Activesync - Emulator - VCE Can anyone pls mail me or point me to a working download site ? Regards Hoe email: <!-- e --><a href="mailto:easywin3@yahoo.com">easywin3@yahoo.com</a><!-- e -->
where to download Activesync & Emulator ?
Hoe, <!-- m --><a class="postlink" href="http://www.microsoft.com/downloads/details.aspx?FamilyId=3D6F581E-C093-4B15-AB0C-A2CE5BFFDB47&displaylang=en">http://www.microsoft.com/downloads/deta ... laylang=en</a><!-- m -->
where to download Activesync & Emulator ?
Thanks. I can't access the page when I in China. Even this support forum also can't access. Many websites are blocked by China government. Regards Hoe
where to download Activesync & Emulator ?
Hoe, You may use a web proxy, i.e.: (these are google appengine based) <!-- m --><a class="postlink" href="http://fly-proxy.appspot.com/">http://fly-proxy.appspot.com/</a><!-- m --> <!-- m --><a class="postlink" href="http://bingproxy.appspot.com/">http://bingproxy.appspot.com/</a><!-- m --> If USA is also blocked, you may use a proxy from a country where you can have access
where to download Activesync & Emulator ?
Dear Hoe, I've sent you ActiveSync 4.5 and VCE.ZIP but Emulator is too big (more than 300 Mb.). Regards, Dutch
where to get or download borland c++5.8.2?
Hi, We know fwh new version upgrade compiled by borland c++5.8.2, where to get or download it? TKS! Shuming Wang
where to get or download borland c++5.8.2?
[quote:10qxzfuu]* New: FWH has been built using BCC 5.82. From now on we will use this Borland C version. You can download BCC582 from: <!-- m --><a class="postlink" href="http://www.fivetechsoft.com/files/software/bcc582.zip">http://www.fivetechsoft.com/files/software/bcc582.zip</a><!-- m --> [/quote:10qxzfuu]
where to get or download borland c++5.8.2?
Hua, TKS! Shuming Wang
where to place gotop() in xbrowse
Where should I place xBrw:gotop() inside xbrowse . That code below is not causing the xbrowse to go top xBrw:pageup() is working but not my demand . [code:y8uwt0ir] STATIC FUNCTION listmete&#40; oWnd &#41; *-------------------------- local oDlg, oCol local nTotal&#58;=0 local oBrw local nfor,cFilter&#58;="",bFilter&#58;="" local y local V_me_mc_serl&#58;= space&#40;7&#41; REQUEST ADS rddRegister&#40; "ADS", 1 &#41; rddsetdefault&#40; "ADS" &#41; AdsSetDeleted&#40;&#46;T&#46;&#41; SET SERVER LOCAL SET FILETYPE TO CDX select 4 use mete index on mete->ME_mc_serl to mete index on str&#40;mete->year&#41; + str&#40;mete->month&#41; to mete1 index on mete->me_date to mete2 set index to mete if MsgGet&#40; "Serial Machine", "Enter Serial Machine", @V_me_mc_serl,; "&#46;&#46;\lupa&#46;bmp" &#41; select 3 use mach set index to mach5 *MSGINFO&#40;IndexKey&#40;&#41;&#41; if ! DbSeek&#40; &#40;V_me_mc_serl &#41;&#41; MsgAlert&#40; "I don't find that serial" &#41; endif endif y &#58;= "'"+padr&#40;V_me_mc_serl,7&#41;+"'" cFilter &#58;= "me_mc_serl = "+ y bFilter = "&#123;||"+cFilter+"&#125;" select 4 use mete DBSETFILTER&#40;&bFilter,cFilter&#41; mete->&#40;DBGOTOP&#40;&#41;&#41; DEFINE DIALOG oDlg of oWnd FROM 0,0 TO 45,128 TITLE "Meter reads browse " oBrw &#58;= TXBrowse&#40;&#41;&#58;New&#40; oDlg &#41; oBrw&#58;nMarqueeStyle &#58;= MARQSTYLE_HIGHLCELL oBrw&#58;nColDividerStyle &#58;= LINESTYLE_BLACK oBrw&#58;nRowDividerStyle &#58;= LINESTYLE_BLACK oBrw&#58;lColDividerComplete &#58;= &#46;t&#46; oBrw&#58;nHeaderLines &#58;= 1 oBrw&#58;nFooterLines &#58;= 1 oBrw&#58;nDataLines &#58;= 1 oBrw&#58;lFooter &#58;= &#46;t&#46; oBrw&#58;SetRDD&#40;&#41; oBrw&#58;CreateFromCode&#40;&#41; oBrw&#58;nTop = 0 oBrw&#58;nLeft = 0 oBrw&#58;nWidth = 1000 oBrw&#58;nHeight =600 for nFor &#58;= 1 to Fcount&#40;&#41; *oBrw&#58;aCols&#91; nFor &#93;&#58;cFooter &#58;= alltrim&#40;STR&#40;TOTALEM2&#40;V_me_mc_serl&#41;,12,0&#41;&#41; if nFor=27 oBrw&#58;aCols&#91; nFor &#93;&#58;cHeader &#58;= FieldName&#40; nFor &#41; oBrw&#58;aCols&#91; nFor &#93;&#58;cFooter &#58;= alltrim&#40;STR&#40;TOTALEM2&#40;&#41;,12,2&#41;&#41; loop endif *oBrw&#58;aCols&#91; nFor &#93;&#58;cHeader &#58;= FieldName&#40; nFor &#41; *oBrw&#58;aCols&#91; nFor &#93;&#58;cFooter &#58;= FieldName&#40; nFor &#41; next oBrw&#58;Refresh&#40;&#46;t&#46;&#41; // Repaint the ListBox ACTIVATE DIALOG oDlg ON INIT &#40;oBrw&#58;SetSize&#40; 1000, 600 &#41;,BuildButtons&#40; oDlg &#41;,oBrw&#58;gotop&#40;&#41;,oBrw&#58;Refresh&#40;&#46;t&#46;&#41;,oDlg&#58;Refresh&#40;&#46;t&#46;&#41;&#41; RETURN NIL [/code:y8uwt0ir]
where to place gotop() in xbrowse
Ehab, Here are some things to try. You shouldn't use the alias name in indexes. I see that you are opening two files and not specifying the alias in the browse definition. Try adding this: oBrw:cAlias:="mete" Also, it appears that you open mete, index it, then reopen it (causing the indexes to be closed) and you don't reopen the indexes. I don't know why you would even need to issue a oBrw:gotop() since the database should already be there. I would try checking right after this code: select 4 use mete DBSETFILTER(&bFilter,cFilter) mete->(DBGOTOP()) [b:1k4mvc3u]msgInfo( [put field name here] )[/b:1k4mvc3u] If you are not at the top record here, then it has nothing to do with the browse. James
where to place gotop() in xbrowse
Ehab, Please understand what means a small and self contained sample to test. We don't have your DBFs, and we can not build your portion of code. In order to provide tech support, you have to provide a small and self contained sample that reproduces the error to fix. Thanks,
which database?
Hi, I need help: which database client server is good for FWH? And are theee good free databases? Thanks
which database?
Have you thought about using remote desktop. We are changing our installations to remote desktop. I think this is the way to go. Best regards, Otto
which database?
Otto, do you think that? twenty user's using remote desktop. do you think that is the future ?
which database?
Why not? EMG
which database?
ciao Enrico, in pratica invece di pensare ad usare un database client/server tipo ADS o Mysql uso la gestione di remote desktop? puoi darmi un aiuto?
which database?
No, non posso aiutarti. La mia era solo una domanda: perché pensi (se lo pensi) che il remote desktop non possa essere un'ottimo sostituto del peer to peer e del client/server? EMG
which database?
perchè pensavo che la tua fosse una convinzione. Non conosco bene il remote desktop proposto da Otto e credevo che tu avessi esperienza in merito
which database?
No, mi dispiace. EMG
which database?
Excellent solution Remote desktop You don't have to modify your software Performances incredible (i/o on the same server in wich you connect to, not through the network) The only problem is to have a server and some clients and licenses...obviously. Marco
which database?
I forgot: it works well even through a VPN <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
which database?
Puoi usare : <!-- m --><a class="postlink" href="http://www.otc.pl/index.asp?s=33">http://www.otc.pl/index.asp?s=33</a><!-- m --> oppure (lo steso prodotto ) <!-- m --><a class="postlink" href="http://www.winflector.com/english/download.html">http://www.winflector.com/english/download.html</a><!-- m --> Maurizio <!-- w --><a class="postlink" href="http://www.nipeservice.com">www.nipeservice.com</a><!-- w -->
which is the fastest way to load contets of a DBF into an Ar
Hi, Which is the fastest way to load the contents of a DBF into an Array. Something faster than this: [code=fw:3q6o0g8w]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #0000ff;">SELECT</span> <span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"CUSTOMER"</span><span style="color: #000000;">&#41;</span><br />DbGoTop<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">do</span> <span style="color: #00C800;">while</span> !eof<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp;aadd<span style="color: #000000;">&#40;</span>myarray, CUSTOMER->NAME<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;dbskip<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">enddo</span></div>[/code:3q6o0g8w] Thank you <!-- s;) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";)" title="Wink" /><!-- s;) -->
which is the fastest way to load contets of a DBF into an Ar
Did you try dbEval( { || aadd(myarray, CUSTOMER->NAME) } )?
which is the fastest way to load contets of a DBF into an Ar
Thank you, but it takes one more second!!!.
which is the fastest way to load contets of a DBF into an Ar
The above code works quite fine on small and medium databases. More time is spent on data access than on code execution. Data access speeds can vary for the same code at different times depending on various factors, including whether some parts of the data requested are already in the cached memory. However here are some tips for speed optimization if we are dealing with large databases and arrays. 1. Preallocating memory for the total array size: [code=fw:2q86dzus]<div class="fw" id="{CB}" style="font-family: monospace;"><br />aData := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />ASizeAlloc<span style="color: #000000;">&#40;</span> aData, CUSTOMER-><span style="color: #000000;">&#40;</span> LASTREC<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:2q86dzus] Preallocation of memory saves the time usually taken by successive AAdd() operations for requesting allocation of additional memory for the growing array. 2. Avoid switching of Alias: Instead of AAdd( aData, CUSTOMER-NAME ), better to use AAdd( aData, FIELD->NAME ). Note: CUSTOMER alias ia already selected. This saves time taken for switching alias each time. 3. Use with ReadOnly and without indexes. Using a DBF with READONLY and without opening indexes improves the through put speeds. Finally, speed benefits of all these optimizations can be perceived only on larger databaess and even then these savings are minor when compared with the total data access timings, which as I said depend on various other factors.
which is the fastest way to load contets of a DBF into an Ar
All good stuff that Rao pointed out. Here are some more ideas. When the data is static, or relatively so, consider loading the data into a static array at the start of the app or of a routine that will be using the data multiple times. Thus the data is only loaded once. Anytime the computer appears to have hung, or gone into limbo, users will be frustrated. If you can provide some visual feedback that makes the computer appear to be working when it is doing something like loading data, then the users will more easily accept the delay. Note that visual feedback will actually slow down the process due to the increased CPU work, but the users will accept this more easily than no visual feedback. Regards, James
which is the fastest way to load contets of a DBF into an Ar
Thank you for all your ideas. Unfortunately, data is not static, so I can´t load at startup. I thought it was a C level alternative.
which is the fastest way to load contets of a DBF into an Ar
Hi, Maybe you need to change the process. If system is very slow i assume is a result to load a big table and my question for u is... It's necessary ?
which is the fastest way to load contets of a DBF into an Ar
As Carles says, "Is it necessary?" Can you just access the database directly using an index and/or filters? How big is the array? How long is it taking to load it? I don't think C could help much, because most of the time is spent reading the disk which is hardware dependent. Regards, James
which is the fastest way to load contets of a DBF into an Ar
[quote:w0dkjtwh]I don't think C could help much, because most of the time is spent reading the disk which is hardware dependent. [/quote:w0dkjtwh] As I mentioned earlier, most of the times it is the data access speeds that decide the total time taken. Optimizing the code execution speeds does not yield perceptible time savings. In any case for this kind of code, accessing DBF, even C level subfunction does not greatly reduce time. We can think of C Subcode for highly comutational itensive routines.
which is the fastest way to load contets of a DBF into an Ar
Hi, in my server there is a running process (named search32.exe) that load three big tables into three different arrays. When a user from application have to perform a wild search ( in all character type fields ) eg search "COMPUTER PADOVA" program searches all customer that have these two words in any fields. In server process I have to load three arrays aClifor := load_dbf( "clifor" ) aMag_ri := load_dbf( "mag_ri" ) aBf_r := load_dbf( "bf_r" ) The searches are very fast but the problem is another: When a Record is modified I write in a log file these two informations: table_name, record_number Search32 process is polling looking in log file every new request: there are two kinf of requests: search request and update record request. This is the source code of agg_rec ( for updating array from dbf ) [code=fw:2mvwv32p]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">FUNCTION</span> AGG_REC<span style="color: #000000;">&#40;</span> cFile, aFile, nRecord <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">LOCAL</span> cDelete<br /><span style="color: #00C800;">LOCAL</span> aRec := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br /><span style="color: #00C800;">LOCAL</span> nFld, nNew<br /><span style="color: #00C800;">LOCAL</span> nNuovi<br /><span style="color: #00C800;">LOCAL</span> aNew := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br /><span style="color: #00C800;">LOCAL</span> nStart := LEN<span style="color: #000000;">&#40;</span> aFile <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">LOCAL</span> i<br /><span style="color: #B900B9;">// se ci sono nuovi record prima crea i nuovi elementi dell'array vuoti</span><br /><span style="color: #B900B9;">// if there are new records at first create new empty elements</span><br /><br /><span style="color: #00C800;">IF</span> nRecord > LEN<span style="color: #000000;">&#40;</span> aFile <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;nNuovi := nRecord - LEN<span style="color: #000000;">&#40;</span> aFile <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">FOR</span> nNew := <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> nNuovi<br />&nbsp; &nbsp; &nbsp; &nbsp;aRec := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">FOR</span> nFld := <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> FCount<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">IF</span> fieldtype<span style="color: #000000;">&#40;</span> nFld <span style="color: #000000;">&#41;</span> = <span style="color: #ff0000;">"C"</span> .OR. fieldtype<span style="color: #000000;">&#40;</span> nFld <span style="color: #000000;">&#41;</span> = <span style="color: #ff0000;">"M"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AADD<span style="color: #000000;">&#40;</span> aRec , <span style="color: #ff0000;">""</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">NEXT</span> i<br /><br />&nbsp; &nbsp; &nbsp; &nbsp;AADD<span style="color: #000000;">&#40;</span> aFile , aRec <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;AADD<span style="color: #000000;">&#40;</span> aNew , nStart + nNew <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">NEXT</span> nNew<br /><span style="color: #00C800;">ELSE</span><br />&nbsp; &nbsp;AADD<span style="color: #000000;">&#40;</span> aNew , nRecord <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">ENDIF</span><br /><br /><span style="color: #0000ff;">SELECT</span> &cFile<br /><br /><span style="color: #00C800;">FOR</span> nNew := <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> LEN<span style="color: #000000;">&#40;</span> aNew <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; i := aNew<span style="color: #000000;">&#91;</span> nNew <span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; GOTO aNew<span style="color: #000000;">&#91;</span> nNew <span style="color: #000000;">&#93;</span><br /><br />&nbsp; &nbsp; aFile<span style="color: #000000;">&#91;</span> i , U_DELETE <span style="color: #000000;">&#93;</span> := cDelete<br /><br />&nbsp; &nbsp; aFile<span style="color: #000000;">&#91;</span> i , U_DELETE <span style="color: #000000;">&#93;</span> := <span style="color: #ff0000;">" "</span><br />&nbsp; &nbsp; aRec := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp; AADD<span style="color: #000000;">&#40;</span> aRec , IIF<span style="color: #000000;">&#40;</span> DELETED<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> , <span style="color: #ff0000;">"D"</span>, <span style="color: #ff0000;">" "</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">FOR</span> nFld := <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> FCount<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> fieldtype<span style="color: #000000;">&#40;</span> nFld <span style="color: #000000;">&#41;</span> = <span style="color: #ff0000;">"C"</span> .OR. fieldtype<span style="color: #000000;">&#40;</span> nFld <span style="color: #000000;">&#41;</span> = <span style="color: #ff0000;">"M"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AADD<span style="color: #000000;">&#40;</span> aRec , UPPER<span style="color: #000000;">&#40;</span> fieldget<span style="color: #000000;">&#40;</span> nFld <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">NEXT</span> i<br /><br />&nbsp; &nbsp; <span style="color: #00C800;">FOR</span> nFld := <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> LEN<span style="color: #000000;">&#40;</span> aFile<span style="color: #000000;">&#91;</span> i <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> aFile<span style="color: #000000;">&#91;</span> i , nFld <span style="color: #000000;">&#93;</span> <> aRec<span style="color: #000000;">&#91;</span> nFld <span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aFile<span style="color: #000000;">&#91;</span> i , nFld <span style="color: #000000;">&#93;</span> := aRec<span style="color: #000000;">&#91;</span> nFld <span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp; <span style="color: #00C800;">NEXT</span> nFld<br /><br /><span style="color: #00C800;">NEXT</span> nNew<br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span></div>[/code:2mvwv32p] With this solution: - users can perform wild search in customer table (50.000 record and 50 mb of size) in 3/8 seconds - when a record is updated in 1 second memory server array is updated too in one seconds - in less than one minute each table is loaded into his own array in memory. In my opinion this solution solves the worst feature of the programs that use dbf tables in a file/server architecture
which is the fastest way to load contets of a DBF into an Ar
Marco , have you tried with INDEX TEMPORARY and work in the DBF ? are very faster . Maurizio <!-- w --><a class="postlink" href="http://www.nipeservice.com">www.nipeservice.com</a><!-- w -->
which is the fastest way to load contets of a DBF into an Ar
Are you using xHarbour.com professional or enterprise? If so, you can use FTS (Fast Text Search) to index and search all or part of data file while sharing with other users.
which is the fastest way to load contets of a DBF into an Ar
Thank you very much. I am using Harbour and I won´t change to xHarbour. I need the Array in order to use the Autoget feature.
which lib for console application
I'm doing some tests with XHarbour, and I've realized it is very slow in console output. a sample program like [quote:29ymmq0z] for a=1 to 10000 ? a next [/quote:29ymmq0z] needs many seconds to terminate, while in Clipper 5.2e runs like a flash! I use GTWIN.lib, perhaps it's not the fastest... any help, friends? thank you.
which lib for console application
As far as I know, Clipper uses a buffering technique for the console output. EMG
which lib for console application
Riccardo, Win16 bits console is faster than Win32 console <!-- s:? --><img src="{SMILIES_PATH}/icon_confused.gif" alt=":?" title="Confused" /><!-- s:? --> Maybe its the used GT... lib that could be improved.
which lib for console application
You can try gtwvt.lib. EMG
who is using a dbf in exclusive mode?
Hello. Is possible to know who is using a dbf in exclusive mode?. Thank you.
who is using a dbf in exclusive mode?
If the dbf table is in a microsoft server volume You can launch from server openfiles /Query /V But probably this is not the correct answer to your question
who use PostgreSQL with Fivewin ?
hi, i like to know who is using PostgreSQL with Fivewin <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: --> it seems me nobody use PostgreSQL but MySQL / MariaDB, or <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: --> --- if nobody is using PostgreSQL i like to ask for "new Concept" Alaska have a Concept for PostgreSQL so all Xbase++ User will follow it when use PgDBE it would be a big Argument if Fivewin can use PostgreSQL "the same Way" as PgDBE
who use PostgreSQL with Fivewin ?
I used (4-5 years ago) FW_SetUnicode( .t. ) oPQ:= TPQServer():New( cHost, BaseName, TableName, password, , "public")
who use PostgreSQL with Fivewin ?
hi Natter, YES, i mean TPQServer Constribution which can be used with Fivewin i have "Problem" with PRIMARY KEY made by Xbase++ Concept of PgDBE Alaska seems to use PRIMARY KEY in "other" Way so it does not work correct with "SavePQQ()" --- i got a Workaround*** from Rao, but if "nobody" is using PostgreSQL yet we can prepare it for all Xbase++ User [url:3476wdlk]https&#58;//forums&#46;fivetechsupport&#46;com/viewtopic&#46;php?t=43733[/url:3476wdlk] all Xbase++ User, who are using PgDBE, will have "same" PRIMARY KEY which FUNCTION GetSerialCol() can "identify" if is in c:\fwh\source\function\pgsuport.prg but it is "Comment out" <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( --> i can not use it "outside" PRG while it include #xtranslate and STATIC FUNCION PGLinked() it will not "hurt" anybody when "enable" FUNCTION GetSerialCol(). PLEASE --- to enhance SavePQQ() i check if PRIMARY KEY is FIELD "__record" -> Xbase++ PdDBE there are also some "Trigger"which i must "update" else Data will be "corrupt" for Xbase++ Apps using PgDBE but the Main work is : how to emulate ISAM Style Concept of Xbase++ PgDBE have a lot of Overhead so i look for a harbour / Fivewin Way --- when build TPQServer LIB there is a File rddcopy.c it have HB_FUNC( HB_PQCOPYFROMWA ) Question : how to use "PostgreSQL RDBMS low-level (client API) interface code" with CLASS TPQServer <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->
who use PostgreSQL with Fivewin ?
Hello, I use postgres, only for reading and updating data. [code=fw:gxllwc5o]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">Function</span> AdoPostgre<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">local</span> oPon, oRs, oData, cString, aLIst, oRec<br /><br />cString := <span style="color: #ff0000;">"Driver={PostgreSQL ANSI};Server=localhost;Port=5432;Database=postgres;Uid=postgres;Pwd=ekatroncito;"</span><br /><span style="color: #00C800;">TRY</span><br />  oPon := TOleAuto<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">new</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"adodb.connection"</span><span style="color: #000000;">&#41;</span><br />CATCH<br />  <span style="color: #00C800;">Return</span><span style="color: #000000;">&#40;</span>.f.<span style="color: #000000;">&#41;</span><br />END<br />oPon:<span style="color: #000000;">ConnectionString</span> := cString<br /><br /><span style="color: #00C800;">TRY</span><br />  oPon:<span style="color: #000000;">Open</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />CATCH<br />  ? <span style="color: #ff0000;">"Error en la conexión"</span><br />  <span style="color: #00C800;">Return</span><span style="color: #000000;">&#40;</span>.f.<span style="color: #000000;">&#41;</span><br />END<br /><br />oRec := TOleAuto<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"adodb.recordset"</span><span style="color: #000000;">&#41;</span><br /><br />oRec:<span style="color: #000000;">CursorLocation</span> := <span style="color: #000000;">3</span>  <span style="color: #B900B9;">// adUseClient</span><br />oRec:<span style="color: #000000;">CursorType</span> := <span style="color: #000000;">3</span> <span style="color: #B900B9;">// adOpenStatic</span><br />oRec:<span style="color: #000000;">ActiveConnection</span>:= oPon<br /><br />oRec:<span style="color: #000000;">Open</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"UPDATE test SET name = 'PRUEBA DE UPDDATE' WHERE code <= 20"</span><span style="color: #000000;">&#41;</span><br /><br />oRec:<span style="color: #000000;">Open</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"SELECT * FROM test"</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #0000ff;">xbrowse</span><span style="color: #000000;">&#40;</span>oRec<span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">Return</span><span style="color: #000000;">&#40;</span><span style="color: #00C800;">niL</span><span style="color: #000000;">&#41;</span><br /><br /> </div>[/code:gxllwc5o]
who use PostgreSQL with Fivewin ?
hi, thx for Answer. you seems to use ODBC, not sure if have same Problem like CLASS TPQServer()
who use PostgreSQL with Fivewin ?
Hi Jimmy, I used MySQL Server with TMySQL connect 3-4 years ago.
who use PostgreSQL with Fivewin ?
hi Richard, i want to use PostgreSQL which seems not used by Fivewin User. but i have Problem when use PostgreSQL Table which was create by Xbase++ my Fivewin Version 23/07 does NOT work correct with "SavePQQ()" PRIMARY KEY will NOT correct recognize so WHERE does not work --- if nobody work with PostgreSQL and TPQServer() Constribution i would like to ask for new "SavePQQ()" i do have modify "SavePQQ()" and now it work correct with PostgreSQL Table create by Xbase++
who use PostgreSQL with Fivewin ?
[quote:j31g5123]my Fivewin Version 23/07 does NOT work correct with "SavePQQ()" [/quote:j31g5123] While we totally disagree, we suggest a totally different approach for you. For the purpose of reading, editing and saving PostGre records, please totally avoid using FWH's TDataRow. Also totally avoid using any functions of FWPGSUPPORT.PRG for reading, saving and primary keys. Instead you may directly use methods of TPQquery and TPQrow classes of Harbour's hbpgsql.lib. This is very simple. This is the way to go: [code=fw:j31g5123]<div class="fw" id="{CB}" style="font-family: monospace;"> &nbsp; oQry &nbsp;:= oServer:<span style="color: #000000;">Query</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"select * from states"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;XBROWSER oQry:<span style="color: #000000;">aStruct</span> &nbsp; <span style="color: #B900B9;">// structure</span><br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">// Getting primary keys</span><br />&nbsp; &nbsp;oQry:<span style="color: #000000;">SetKey</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;? oQry:<span style="color: #000000;">aKeys</span> <span style="color: #B900B9;">// --> {"id"} // primary keys array</span><br /><br />&nbsp; &nbsp;oRow &nbsp;:= oQry:<span style="color: #000000;">GetBlankRow</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #B900B9;">// for appending</span><br />&nbsp; &nbsp;<span style="color: #B900B9;">// or</span><br />&nbsp; &nbsp;oRow &nbsp;:= oQry:<span style="color: #000000;">GetRow</span><span style="color: #000000;">&#40;</span> nRow <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// for editing</span><br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">// oRow has mainly datas aStruct and aRow</span><br />&nbsp; &nbsp;<span style="color: #B900B9;">// aRow contains field values</span><br />&nbsp; &nbsp;? oRow:<span style="color: #000000;">aRow</span> <span style="color: #B900B9;">//--> { 1, "WA", "Washington" }</span><br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">// NOW, USING fieldnames from oRow:aStruct</span><br />&nbsp; &nbsp;<span style="color: #B900B9;">// and field values from oRow:aRow</span><br />&nbsp; &nbsp;<span style="color: #B900B9;">// Build your own dialog and edit the values</span><br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">// finally save the changes using:</span><br />&nbsp; &nbsp;oQry:<span style="color: #0000ff;">Update</span><span style="color: #000000;">&#40;</span> oRow <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #B900B9;">// or</span><br />&nbsp; &nbsp;oQry:<span style="color: #000000;">Append</span><span style="color: #000000;">&#40;</span> oRow <span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:j31g5123] You may read more in "tpostgre.prg" of Harbour. Now, it is entirely between you and Harbour's library and FWH does not come in your way at all. If you like to have a working sample, please let us know.
who use PostgreSQL with Fivewin ?
hi, as i can say METHOD SavePQQ() work with Fivewin Sample but NOT with Xbase++ PostgreSQL Table but when "nobody" is using PostgreSQL under Fivewin yet, why not change / new METHOD SavePQQ() to make it "ready" for Xbase++ <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: --> i know Concept of PgDBE so i can help to made Fivewin "ready***" for PostgreSQL Table made by Xbase++ you can "identify" PostgreSQL Table, made by Xbase++, while it have these "internal" FIELDs [code=fw:1ty45pvf]<div class="fw" id="{CB}" style="font-family: monospace;">      cQuery += <span style="color: #ff0000;">" __deleted    boolean NOT NULL DEFAULT false, "</span><br />      cQuery += <span style="color: #ff0000;">" __record     serial  NOT NULL, "</span><br />      cQuery += <span style="color: #ff0000;">" __rowversion integer NOT NULL DEFAULT 0, "</span><br />      cQuery += <span style="color: #ff0000;">" __keyversion integer NOT NULL DEFAULT 0, "</span><br />      cQuery += <span style="color: #ff0000;">" __lock_owner integer NOT NULL DEFAULT 0, "</span></div>[/code:1ty45pvf] and PRIMARY KEY is ALLWAYS [code=fw:1ty45pvf]<div class="fw" id="{CB}" style="font-family: monospace;">      cQuery += <span style="color: #ff0000;">" CONSTRAINT "</span> + cTable + <span style="color: #ff0000;">"_pkey PRIMARY KEY (__record)"</span></div>[/code:1ty45pvf] ***not talking about "Index" FIELD made by PgDBE --- as i say it is NOT a Problem of CLASS TPQServer(), it is METHOD SavePQQ() of Fivewin it is a different Concept but Fivewin already have the Solution GetSerialCol() ... why is it not "active" <!-- s:roll: --><img src="{SMILIES_PATH}/icon_rolleyes.gif" alt=":roll:" title="Rolling Eyes" /><!-- s:roll: --> this is "try and Error" [code=fw:1ty45pvf]<div class="fw" id="{CB}" style="font-family: monospace;">   <span style="color: #00C800;">FOR</span> n := <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> LEN<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aStructPG</span> <span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">IF</span> ::<span style="color: #000000;">aStructPG</span><span style="color: #000000;">&#91;</span> n, <span style="color: #000000;">10</span> <span style="color: #000000;">&#93;</span> == <span style="color: #ff0000;">"PRI"</span> .AND. ;<br />                 oQry:<span style="color: #000000;">TableName</span> == ::<span style="color: #000000;">aStructPG</span><span style="color: #000000;">&#91;</span> n, <span style="color: #000000;">7</span> <span style="color: #000000;">&#93;</span><br />         <span style="color: #00C800;">IF</span> cSeq == <span style="color: #00C800;">nil</span> .AND. ::<span style="color: #000000;">aStructPG</span><span style="color: #000000;">&#91;</span> n, <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span> == <span style="color: #ff0000;">'+'</span><br />            cSeq := ::<span style="color: #000000;">aStructPG</span><span style="color: #000000;">&#91;</span> n, <span style="color: #000000;">9</span> <span style="color: #000000;">&#93;</span><br />         <span style="color: #00C800;">ENDIF</span><br />         <span style="color: #00C800;">IF</span> VALTYPE<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aData</span><span style="color: #000000;">&#91;</span> n, <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">'C'</span><br />            AADD<span style="color: #000000;">&#40;</span> aKey, <span style="color: #000000;">&#123;</span> n, ::<span style="color: #000000;">aStructPG</span><span style="color: #000000;">&#91;</span> n, <span style="color: #000000;">8</span> <span style="color: #000000;">&#93;</span>, TRIM<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aOrg</span><span style="color: #000000;">&#91;</span> n, <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span>, TRIM<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aData</span><span style="color: #000000;">&#91;</span> n, <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">ELSE</span><br />            AADD<span style="color: #000000;">&#40;</span> aKey, <span style="color: #000000;">&#123;</span> n, ::<span style="color: #000000;">aStructPG</span><span style="color: #000000;">&#91;</span> n, <span style="color: #000000;">8</span> <span style="color: #000000;">&#93;</span>, ::<span style="color: #000000;">aOrg</span><span style="color: #000000;">&#91;</span> n, <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span>, ::<span style="color: #000000;">aData</span><span style="color: #000000;">&#91;</span> n, <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">ENDIF</span><br />      <span style="color: #00C800;">ENDIF</span><br />   <span style="color: #00C800;">NEXT</span></div>[/code:1ty45pvf] this is Postgre SQL Way [code=fw:1ty45pvf]<div class="fw" id="{CB}" style="font-family: monospace;">   cSql := <span style="color: #ff0000;">"select ordinal_position,column_default,column_name from "</span> + ;<br />           <span style="color: #ff0000;">"information_schema.columns where table_name = '"</span> + oQry:<span style="color: #000000;">TableName</span> + <span style="color: #ff0000;">"'"</span> + ;<br />           <span style="color: #ff0000;">" and column_default like 'nextval(%'"</span></div>[/code:1ty45pvf] the 2nd Solution will ALLWAYS work correct ( when use nextval() NOT currval() )
who use PostgreSQL with Fivewin ?
hi, this CODE is to Import DBF into PostgreSQL Table "ala Xbase++" it is different than FWPG_ImportFromDBF() as it include "internal" FIELD which Xbase++ use after Table is create try use BROWSEr and "edit" it. when "save" you will got the Problem [code=fw:kd7zp2w0]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">FUNCTION</span> DoImportNow<span style="color: #000000;">&#40;</span> cHostName, cDatabase, cUser, cPassWord, cTable, cDbf <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">LOCAL</span> cQuery, i, iMax, nPosi<br /><span style="color: #00C800;">LOCAL</span> oServer, oTable<br /><span style="color: #00C800;">LOCAL</span> cField, cType, nLen, nReccount<br /><span style="color: #00C800;">LOCAL</span> sType<br /><span style="color: #00C800;">LOCAL</span> dType<br /><span style="color: #00C800;">LOCAL</span> nHandle<br /><span style="color: #00C800;">LOCAL</span> nStart, nStop, cLogFile<br /><span style="color: #00C800;">LOCAL</span> lUseBlob, cPreText, cIns<br /><span style="color: #00C800;">LOCAL</span> nLenStruc, nLenSum := <span style="color: #000000;">0</span><br /><span style="color: #00C800;">LOCAL</span> aDbfStruct<br /><span style="color: #00C800;">LOCAL</span> lCreateTable := .T.<br /><span style="color: #00C800;">LOCAL</span> nEvery       := <span style="color: #000000;">100</span><br /><span style="color: #00C800;">LOCAL</span> nCount       := <span style="color: #000000;">0</span><br /><span style="color: #00C800;">LOCAL</span> lTruncate    := .F.<br /><span style="color: #00C800;">LOCAL</span> lUseTrans    := .F.<br /><span style="color: #00C800;">LOCAL</span> nBatchSize   := <span style="color: #000000;">20</span><br /><span style="color: #00C800;">LOCAL</span> nBatchhave   := <span style="color: #000000;">0</span><br /><span style="color: #00C800;">LOCAL</span> _cVia        := <span style="color: #ff0000;">"DBFCDX"</span><br /><br />   SbarText<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">""</span> <span style="color: #000000;">&#41;</span><br />   SbarText<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Import DBF "</span> + cDbf <span style="color: #000000;">&#41;</span><br />   SbarText<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"to"</span> <span style="color: #000000;">&#41;</span><br />   SbarText<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Hostname "</span> + cHostName <span style="color: #000000;">&#41;</span><br />   SbarText<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Catalog  "</span> + cDatabase <span style="color: #000000;">&#41;</span><br />   SbarText<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Table    "</span> + cTable <span style="color: #000000;">&#41;</span><br />   SbarText<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">""</span> <span style="color: #000000;">&#41;</span><br /><br />   lUseBlob := .F.<br /><br />   cLogFile := RTRIM<span style="color: #000000;">&#40;</span> cTable <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">".log"</span><br />   <span style="color: #B900B9;">// create log file</span><br />   <span style="color: #00C800;">IF</span> <span style="color: #000000;">&#40;</span> nHandle := FCREATE<span style="color: #000000;">&#40;</span> cLogFile <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> == F_ERROR<br />      <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Cannot create log file"</span> <span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">RETURN</span> .F.<br />   <span style="color: #00C800;">ENDIF</span><br /><br />   USE <span style="color: #000000;">&#40;</span> cDbf <span style="color: #000000;">&#41;</span> VIA TRIM<span style="color: #000000;">&#40;</span>_cVia<span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">ALIAS</span> <span style="color: #ff0000;">"IMPORT"</span> EXCLUSIVE <span style="color: #B900B9;">// CODEPAGE TRIM(_cCodepage)</span><br />   aDbfStruct := DBSTRUCT<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   nReccount := RECCOUNT<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   oServer := TPQServer<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> :<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> cHostName, cDatabase, cUser, cPassWord <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">IF</span> oServer:<span style="color: #000000;">NetErr</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />      <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> oServer:<span style="color: #000000;">ErrorMsg</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, <span style="color: #ff0000;">"TPQServer"</span> <span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">RETURN</span> .F.<br />   <span style="color: #00C800;">ENDIF</span><br /><br />   oServer:<span style="color: #000000;">lallCols</span> := .F.<br /><br />   <span style="color: #00C800;">IF</span> lCreateTable<br />      <span style="color: #00C800;">IF</span> oServer:<span style="color: #000000;">TableExists</span><span style="color: #000000;">&#40;</span> cTable <span style="color: #000000;">&#41;</span><br />         oServer:<span style="color: #000000;">DeleteTable</span><span style="color: #000000;">&#40;</span> cTable <span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">IF</span> oServer:<span style="color: #000000;">NetErr</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />            <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> oServer:<span style="color: #000000;">ErrorMsg</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, <span style="color: #ff0000;">"DeleteTable"</span> <span style="color: #000000;">&#41;</span><br />            FWRITE<span style="color: #000000;">&#40;</span> nHandle, <span style="color: #ff0000;">"Error: "</span> + oServer:<span style="color: #000000;">ErrorMsg</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> + hb_eol<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />            FCLOSE<span style="color: #000000;">&#40;</span> nHandle <span style="color: #000000;">&#41;</span><br />            <span style="color: #00C800;">RETURN</span> .F.<br />         <span style="color: #00C800;">ENDIF</span><br />      <span style="color: #00C800;">ENDIF</span><br /><br />      <span style="color: #B900B9;">// oServer:CreateTable( cTable, aDbfStruct )</span><br />      <span style="color: #B900B9;">//</span><br />      <span style="color: #B900B9;">// "own" Way to include "internal" FIELD(s)</span><br /><br />      cQuery := <span style="color: #ff0000;">"CREATE TABLE "</span> + cTable + <span style="color: #ff0000;">" ( "</span><br />      SbarText<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Create Table "</span> + cTable <span style="color: #000000;">&#41;</span><br />      SbarText<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">""</span> <span style="color: #000000;">&#41;</span><br /><br />      iMax := LEN<span style="color: #000000;">&#40;</span> aDbfStruct <span style="color: #000000;">&#41;</span><br />      i = <span style="color: #000000;">1</span><br />      <span style="color: #00C800;">FOR</span> i = <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> iMax<br />         nLenSum += aDbfStruct<span style="color: #000000;">&#91;</span> i <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#91;</span> DBS_LEN <span style="color: #000000;">&#93;</span><br />         cQuery += aDbfStruct<span style="color: #000000;">&#91;</span> i, DBS_NAME <span style="color: #000000;">&#93;</span><br /><br />         SbarText<span style="color: #000000;">&#40;</span> aDbfStruct<span style="color: #000000;">&#91;</span> i <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#91;</span> DBS_NAME <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">DO</span> <span style="color: #00C800;">CASE</span><br />            <span style="color: #00C800;">CASE</span> aDbfStruct<span style="color: #000000;">&#91;</span> i, DBS_TYPE <span style="color: #000000;">&#93;</span> = <span style="color: #ff0000;">"C"</span><br />               cQuery += <span style="color: #ff0000;">" character("</span> + ALLTRIM<span style="color: #000000;">&#40;</span> STR<span style="color: #000000;">&#40;</span> aDbfStruct<span style="color: #000000;">&#91;</span> i, DBS_LEN <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">"), "</span><br />               nLenSum += <span style="color: #000000;">4</span><br />            <span style="color: #00C800;">CASE</span> aDbfStruct<span style="color: #000000;">&#91;</span> i, DBS_TYPE <span style="color: #000000;">&#93;</span> = <span style="color: #ff0000;">"N"</span><br />               cQuery += <span style="color: #ff0000;">" numeric("</span> + ALLTRIM<span style="color: #000000;">&#40;</span> STR<span style="color: #000000;">&#40;</span> aDbfStruct<span style="color: #000000;">&#91;</span> i, DBS_LEN <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">','</span> + ALLTRIM<span style="color: #000000;">&#40;</span> STR<span style="color: #000000;">&#40;</span> aDbfStruct<span style="color: #000000;">&#91;</span> i, DBS_DEC <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">"), "</span><br />               nLenSum += <span style="color: #000000;">2</span><br />            <span style="color: #00C800;">CASE</span> aDbfStruct<span style="color: #000000;">&#91;</span> i, DBS_TYPE <span style="color: #000000;">&#93;</span> = <span style="color: #ff0000;">"D"</span><br />               cQuery += <span style="color: #ff0000;">" date, "</span><br />               nLenSum += <span style="color: #000000;">4</span><br /><br />            <span style="color: #00C800;">CASE</span> aDbfStruct<span style="color: #000000;">&#91;</span> i, DBS_TYPE <span style="color: #000000;">&#93;</span> = <span style="color: #ff0000;">"M"</span><br />               <span style="color: #B900B9;">// IF lUseBlob = .T.</span><br />               <span style="color: #B900B9;">//    cQuery += " bytea, "</span><br />               <span style="color: #B900B9;">// ELSE</span><br />               cQuery += <span style="color: #ff0000;">" text, "</span><br />               <span style="color: #B900B9;">// ENDIF</span><br />               nLenSum += <span style="color: #000000;">4</span><br /><br />            <span style="color: #00C800;">CASE</span> aDbfStruct<span style="color: #000000;">&#91;</span> i, DBS_TYPE <span style="color: #000000;">&#93;</span> = <span style="color: #ff0000;">"L"</span><br />               nLenSum += <span style="color: #000000;">8</span><br />               cQuery += <span style="color: #ff0000;">" boolean, "</span><br /><br />            <span style="color: #00C800;">CASE</span> aDbfStruct<span style="color: #000000;">&#91;</span> i, DBS_TYPE <span style="color: #000000;">&#93;</span> = <span style="color: #ff0000;">"V"</span><br />               <span style="color: #B900B9;">// store as HEX String</span><br />               cQuery += <span style="color: #ff0000;">" bytea, "</span><br />         <span style="color: #00C800;">ENDCASE</span><br />      <span style="color: #00C800;">NEXT</span><br /><br />      <span style="color: #B900B9;">// add "internal" Xbase++ v2.x ISAM Emulation Fields</span><br />      cQuery += <span style="color: #ff0000;">" __deleted    boolean NOT NULL DEFAULT false, "</span><br />      cQuery += <span style="color: #ff0000;">" __record     serial  NOT NULL, "</span><br />      cQuery += <span style="color: #ff0000;">" __rowversion integer NOT NULL DEFAULT 0, "</span><br />      cQuery += <span style="color: #ff0000;">" __keyversion integer NOT NULL DEFAULT 0, "</span><br />      cQuery += <span style="color: #ff0000;">" __lock_owner integer NOT NULL DEFAULT 0, "</span><br /><br />      <span style="color: #00C800;">IF</span> nReccount * nLenSum < <span style="color: #000000;">4096</span><br />         nBatchSize := <span style="color: #000000;">1</span><br />      <span style="color: #00C800;">ENDIF</span><br /><br />      <span style="color: #B900B9;">//</span><br />      cQuery += <span style="color: #ff0000;">" CONSTRAINT "</span> + cTable + <span style="color: #ff0000;">"_pkey PRIMARY KEY (__record)"</span><br />      cQuery += <span style="color: #ff0000;">" )"</span><br /><br />      oTable := oServer:<span style="color: #000000;">Query</span><span style="color: #000000;">&#40;</span> cQuery <span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">IF</span> oServer:<span style="color: #000000;">NetErr</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />         <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> oServer:<span style="color: #000000;">ErrorMsg</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, <span style="color: #ff0000;">"CreateTable"</span> <span style="color: #000000;">&#41;</span><br />         FWRITE<span style="color: #000000;">&#40;</span> nHandle, <span style="color: #ff0000;">"Error: "</span> + oServer:<span style="color: #000000;">ErrorMsg</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> + hb_eol<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />         FCLOSE<span style="color: #000000;">&#40;</span> nHandle <span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">RETURN</span> .F.<br />      <span style="color: #00C800;">ENDIF</span><br />   <span style="color: #00C800;">ENDIF</span><br /><br />   <span style="color: #00C800;">IF</span> lTruncate<br />      oServer:<span style="color: #000000;">Execute</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"truncate table "</span> + cTable <span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">IF</span> oServer:<span style="color: #000000;">NetErr</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />         <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> oServer:<span style="color: #000000;">ErrorMsg</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, <span style="color: #ff0000;">"truncate table"</span> <span style="color: #000000;">&#41;</span><br />         FWRITE<span style="color: #000000;">&#40;</span> nHandle, <span style="color: #ff0000;">"Error: "</span> + oServer:<span style="color: #000000;">ErrorMsg</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> + hb_eol<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />         FCLOSE<span style="color: #000000;">&#40;</span> nHandle <span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">RETURN</span> .F.<br />      <span style="color: #00C800;">ENDIF</span><br />   <span style="color: #00C800;">ENDIF</span><br /><br />   i := <span style="color: #000000;">1</span><br />   <span style="color: #B900B9;">//    SetProperty( "HbImport", "ProgressBar_1", "Value", 0 )</span><br />   <span style="color: #00C800;">IF</span> lUseTrans<br />      oServer:<span style="color: #000000;">StartTransaction</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">ENDIF</span><br /><br />   SbarText<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Start: "</span> + TIME<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />   cPreText := <span style="color: #ff0000;">"INSERT INTO "</span> + cTable + <span style="color: #ff0000;">" VALUES("</span><br /><br />   nEvery := INT<span style="color: #000000;">&#40;</span> RECCOUNT<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> / <span style="color: #000000;">100</span> <span style="color: #000000;">&#41;</span><br /><br />   nStart := SECONDS<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">DO</span> <span style="color: #00C800;">WHILE</span> !EOF<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />      nCount ++<br />      lUseBlob := .F.<br />      cIns := cPreText<br />      i = <span style="color: #000000;">1</span><br />      <span style="color: #00C800;">FOR</span> i = <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> LEN<span style="color: #000000;">&#40;</span> aDbfStruct <span style="color: #000000;">&#41;</span><br />         cField := aDbfStruct<span style="color: #000000;">&#91;</span> i <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#91;</span> DBS_NAME <span style="color: #000000;">&#93;</span><br />         cType := aDbfStruct<span style="color: #000000;">&#91;</span> i <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#91;</span> DBS_TYPE <span style="color: #000000;">&#93;</span><br />         nLen := aDbfStruct<span style="color: #000000;">&#91;</span> i <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#91;</span> DBS_LEN <span style="color: #000000;">&#93;</span><br /><br />         <span style="color: #00C800;">DO</span> <span style="color: #00C800;">CASE</span><br />            <span style="color: #00C800;">CASE</span> aDbfStruct<span style="color: #000000;">&#91;</span> i, DBS_TYPE <span style="color: #000000;">&#93;</span> = <span style="color: #ff0000;">"C"</span><br />               cIns += <span style="color: #ff0000;">" '"</span> + STRTRAN<span style="color: #000000;">&#40;</span> ALLTRIM<span style="color: #000000;">&#40;</span> FIELDGET<span style="color: #000000;">&#40;</span> i <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, <span style="color: #ff0000;">"'"</span>, <span style="color: #ff0000;">'"'</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">"',"</span><br /><br />            <span style="color: #00C800;">CASE</span> aDbfStruct<span style="color: #000000;">&#91;</span> i, DBS_TYPE <span style="color: #000000;">&#93;</span> = <span style="color: #ff0000;">'N'</span><br />               cIns += <span style="color: #ff0000;">" "</span> + ALLTRIM<span style="color: #000000;">&#40;</span> STR<span style="color: #000000;">&#40;</span> FIELDGET<span style="color: #000000;">&#40;</span> i <span style="color: #000000;">&#41;</span>, aDbfStruct<span style="color: #000000;">&#91;</span> i, DBS_LEN <span style="color: #000000;">&#93;</span>, aDbfStruct<span style="color: #000000;">&#91;</span> i, DBS_DEC <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">","</span><br /><br />            <span style="color: #00C800;">CASE</span> aDbfStruct<span style="color: #000000;">&#91;</span> i, DBS_TYPE <span style="color: #000000;">&#93;</span> = <span style="color: #ff0000;">'D'</span><br />               <span style="color: #00C800;">IF</span> EMPTY<span style="color: #000000;">&#40;</span> FIELDGET<span style="color: #000000;">&#40;</span> i <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />                  cIns += <span style="color: #ff0000;">" NULL,"</span><br />               <span style="color: #00C800;">ELSE</span><br />                  cIns += <span style="color: #ff0000;">" '"</span> + DTOC<span style="color: #000000;">&#40;</span> FIELDGET<span style="color: #000000;">&#40;</span> i <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">"',"</span><br />               <span style="color: #00C800;">ENDIF</span><br /><br />            <span style="color: #00C800;">CASE</span> aDbfStruct<span style="color: #000000;">&#91;</span> i, DBS_TYPE <span style="color: #000000;">&#93;</span> = <span style="color: #ff0000;">'M'</span><br />               <span style="color: #B900B9;">// if you have Bitmap in Memo</span><br />               <span style="color: #00C800;">IF</span> lUseBlob = .T.<br />                  <span style="color: #B900B9;">// cIns += " '\x" + cBin2Hex( FIELDGET( i ) ) + "',"</span><br />                  lUseBlob := .T.<br />               <span style="color: #00C800;">ELSE</span><br />                  cIns += <span style="color: #ff0000;">" '"</span> + STRTRAN<span style="color: #000000;">&#40;</span> FIELDGET<span style="color: #000000;">&#40;</span> i <span style="color: #000000;">&#41;</span>, <span style="color: #ff0000;">"'"</span>, <span style="color: #ff0000;">'"'</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">"',"</span><br />               <span style="color: #00C800;">ENDIF</span><br /><br />            <span style="color: #00C800;">CASE</span> aDbfStruct<span style="color: #000000;">&#91;</span> i, DBS_TYPE <span style="color: #000000;">&#93;</span> = <span style="color: #ff0000;">"L"</span><br />               cIns += <span style="color: #ff0000;">"  "</span> + <span style="color: #00C800;">IF</span><span style="color: #000000;">&#40;</span> FIELDGET<span style="color: #000000;">&#40;</span> i <span style="color: #000000;">&#41;</span> = .T., <span style="color: #ff0000;">"true, "</span>, <span style="color: #ff0000;">"false, "</span> <span style="color: #000000;">&#41;</span><br /><br />            <span style="color: #00C800;">CASE</span> aDbfStruct<span style="color: #000000;">&#91;</span> i, DBS_TYPE <span style="color: #000000;">&#93;</span> = <span style="color: #ff0000;">"V"</span><br />               <span style="color: #B900B9;">// better use Type "V"</span><br />               <span style="color: #B900B9;">// cIns += " '\x" + cBin2Hex( FIELDGET( i ) ) + "',"</span><br />               lUseBlob := .T.<br /><br />         <span style="color: #00C800;">ENDCASE</span><br />      <span style="color: #00C800;">NEXT</span><br /><br />      <span style="color: #B900B9;">// add "__deleted" default</span><br />      cIns += <span style="color: #ff0000;">"false,"</span>                                                <span style="color: #B900B9;">// "__deleted"</span><br /><br />      <span style="color: #B900B9;">// use nextval() for Sequence !</span><br />      cIns += <span style="color: #ff0000;">"nextval('"</span> + cTable + <span style="color: #ff0000;">"___record_seq')"</span> + <span style="color: #ff0000;">","</span>          <span style="color: #B900B9;">// use nextval()</span><br /><br />      cIns += <span style="color: #ff0000;">"0,"</span>                                                    <span style="color: #B900B9;">// "__rowversion"</span><br />      cIns += <span style="color: #ff0000;">"0,"</span>                                                    <span style="color: #B900B9;">// "__keyversion"</span><br />      cIns += <span style="color: #ff0000;">"0 "</span>                                                    <span style="color: #B900B9;">// "__lock_owner"</span><br />      cIns += <span style="color: #ff0000;">")"</span><br /><br />      cIns += <span style="color: #ff0000;">";"</span> + CRLF<br /><br />*      nBatchhave ++<br />*      <span style="color: #00C800;">IF</span> nBatchhave >= nBatchSize<br />*         nBatchhave := <span style="color: #000000;">0</span><br /><br />         oTable := oServer:<span style="color: #000000;">Query</span><span style="color: #000000;">&#40;</span> cIns <span style="color: #000000;">&#41;</span><br /><br />         <span style="color: #00C800;">IF</span> oServer:<span style="color: #000000;">NetErr</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />            <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> oServer:<span style="color: #000000;">ErrorMsg</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, <span style="color: #ff0000;">"INSERT Record"</span> <span style="color: #000000;">&#41;</span><br />            SbarText<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Error Record: "</span> + STR<span style="color: #000000;">&#40;</span> RECNO<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">" "</span> + <span style="color: #0000ff;">LEFT</span><span style="color: #000000;">&#40;</span> oTable:<span style="color: #000000;">ErrorMsg</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, <span style="color: #000000;">70</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />            FWRITE<span style="color: #000000;">&#40;</span> nHandle, <span style="color: #ff0000;">"Error at record: "</span> + hb_ntos<span style="color: #000000;">&#40;</span> RECNO<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> + ;<br />                    <span style="color: #ff0000;">" Description: "</span> + cField + hb_eol<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> + ;<br />                    <span style="color: #ff0000;">" Type "</span> + cType + hb_eol<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> + ;<br />                    <span style="color: #ff0000;">" Len  "</span> + STR<span style="color: #000000;">&#40;</span> nLen <span style="color: #000000;">&#41;</span> + hb_eol<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> + ;<br />                    oTable:<span style="color: #000000;">ErrorMsg</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> + hb_eol<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />            FCLOSE<span style="color: #000000;">&#40;</span> nHandle <span style="color: #000000;">&#41;</span><br />            GO BOTTOM<br />         <span style="color: #00C800;">ENDIF</span><br /><br />         <span style="color: #B900B9;">// Reset</span><br />         cIns := <span style="color: #ff0000;">""</span><br />*      <span style="color: #00C800;">ELSE</span><br />*         cIns += <span style="color: #ff0000;">";"</span> + CRLF<br />*      <span style="color: #00C800;">ENDIF</span><br /><br />      <span style="color: #00C800;">IF</span> <span style="color: #000000;">&#40;</span> nCount % nEvery <span style="color: #000000;">&#41;</span> == <span style="color: #000000;">0</span><br />         <span style="color: #B900B9;">// nPosi := GetProperty( "HbImport", "ProgressBar_1", "Value" )</span><br />         <span style="color: #B900B9;">// SetProperty( "HbImport", "ProgressBar_1", "Value", nPosi + 1 )</span><br />         <span style="color: #B900B9;">// DO EVENTS</span><br />         SysRefresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">IF</span> lUseTrans<br />            oServer:<span style="color: #000000;">commit</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />            oServer:<span style="color: #000000;">StartTransaction</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">ENDIF</span><br />      <span style="color: #00C800;">ENDIF</span><br /><br />      <span style="color: #B900B9;">// IF ::lAbort = .T.</span><br />      <span style="color: #B900B9;">//    GO BOTTOM</span><br />      <span style="color: #B900B9;">// ENDIF</span><br /><br />      SKIP<br />   <span style="color: #00C800;">ENDDO</span><br />*   <span style="color: #00C800;">IF</span> <span style="color: #000000;">&#40;</span> nCount % nEvery <span style="color: #000000;">&#41;</span> != <span style="color: #000000;">0</span><br />*      <span style="color: #00C800;">IF</span> lUseTrans<br />         oServer:<span style="color: #000000;">commit</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />*      <span style="color: #00C800;">ENDIF</span><br />*   <span style="color: #00C800;">ENDIF</span><br />   <span style="color: #B900B9;">//    SetProperty( "HbImport", "ProgressBar_1", "Value", 0 )</span><br />   nStop := SECONDS<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   SbarText<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">""</span> <span style="color: #000000;">&#41;</span><br />   SbarText<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"End: "</span> + TIME<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />   SbarText<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">""</span> <span style="color: #000000;">&#41;</span><br />   SbarText<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"records in dbf: "</span> + hb_ntos<span style="color: #000000;">&#40;</span> RECNO<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />   SbarText<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"imported recs: "</span> + hb_ntos<span style="color: #000000;">&#40;</span> nCount <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />   SbarText<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Sec "</span> + Sec2HMS<span style="color: #000000;">&#40;</span> nStop - nStart <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />   SbarText<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Rec/Sec "</span> + hb_ntos<span style="color: #000000;">&#40;</span> nCount / <span style="color: #000000;">&#40;</span> nStop - nStart <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />   SbarText<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">""</span> <span style="color: #000000;">&#41;</span><br /><br />   CLOSE<br />   <span style="color: #00C800;">IF</span> !EMPTY<span style="color: #000000;">&#40;</span> nHandle <span style="color: #000000;">&#41;</span><br />      FCLOSE<span style="color: #000000;">&#40;</span> nHandle <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">ENDIF</span><br /><br />   oTable:<span style="color: #000000;">Destroy</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   oServer:<span style="color: #000000;">Destroy</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">IF</span> FILESIZE<span style="color: #000000;">&#40;</span> cLogFile <span style="color: #000000;">&#41;</span> > <span style="color: #000000;">1</span><br />      RUN <span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"NOTEPAD.EXE "</span> + cLogFile <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">ELSE</span><br />      FERASE<span style="color: #000000;">&#40;</span> cLogFile <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">ENDIF</span><br /><br /><span style="color: #00C800;">RETURN</span> .T.<br /><br />PROCEDURE SbarText<span style="color: #000000;">&#40;</span> cIn <span style="color: #000000;">&#41;</span><br />   fwlog cIn<br /><span style="color: #00C800;">RETURN</span></div>[/code:kd7zp2w0]
who use PostgreSQL with Fivewin ?
[quote:30ixdr5w]as i can say METHOD SavePQQ() work with Fivewin Sample but NOT with Xbase++ PostgreSQL Table[/quote:30ixdr5w] [quote:30ixdr5w]as i say it is NOT a Problem of CLASS TPQServer(), it is METHOD SavePQQ() of Fivewin[/quote:30ixdr5w] SavePQQ() is a method of TDataRow class of FWH. That is the reason, why we advised not to use TDataRow and other FWH functions for reading, editing and modifying the PostGre records and instead directly use TPQquery and TPQrow classes of Harbour's hbpgsql.lib. This helps us to close any further discussion on SavePQQ(). [quote:30ixdr5w]this CODE is to Import DBF into PostgreSQL Table "ala Xbase++[/quote:30ixdr5w] Glad. Now your have your own function to import dbfs. [quote:30ixdr5w]after Table is create try use BROWSEr and "edit" it. when "save" you will got the Problem[/quote:30ixdr5w] When you import dbf with your own code and "edit" using your own code, FWH does not come into picture.