topic
stringlengths
1
63
text
stringlengths
1
577k
tdatabase Filter error
Mr. Silivio You said your original filter with DBF is working. I am not going into the logic. I am giving here conversion of your old DBF filter to be used here [code=fw:2r6l0esg]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">// Values of the variables which the User entered</span><br /><span style="color: #B900B9;">// We are using constants here for example</span><br /><br />cTypeRoom &nbsp; &nbsp; &nbsp;:= <span style="color: #ff0000;">"01"</span><br />nElemento &nbsp; &nbsp; &nbsp;:= <span style="color: #000000;">1</span><br />dDataIniziale &nbsp;:= STOD<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"20180701"</span> <span style="color: #000000;">&#41;</span><br />dDataFinale &nbsp; &nbsp;:= STOD<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"20180807"</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">// Converting the Filter Expression</span><br /><span style="color: #B900B9;">// Start with original filter expression without alias names</span><br /><br />cFilter &nbsp;:= <span style="color: #ff0000;">"AllTrim( TYPE ) == AllTrim( cTypeRoom ) .and. NUM = nElemento .AND. "</span> + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"( dDataIniziale <= CHECK_OUT .AND. dDataFinale >= CHECK_IN )"</span><br /><br />cFilter &nbsp;:= StrTran<span style="color: #000000;">&#40;</span> StrTran<span style="color: #000000;">&#40;</span> StrTran<span style="color: #000000;">&#40;</span> StrTran<span style="color: #000000;">&#40;</span> cFilter, &nbsp; &nbsp; &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"cTypeRoom"</span>, &nbsp; &nbsp; VALTOPRGEXP<span style="color: #000000;">&#40;</span> cTypeRoom <span style="color: #000000;">&#41;</span> &nbsp; &nbsp; <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"nElemento"</span>, &nbsp; &nbsp; VALTOPRGEXP<span style="color: #000000;">&#40;</span> nElemento <span style="color: #000000;">&#41;</span> &nbsp; &nbsp; <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"dDataIniziale"</span>, VALTOPRGEXP<span style="color: #000000;">&#40;</span> dDataIniziale <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"dDataFinale"</span>, &nbsp; VALTOPRGEXP<span style="color: #000000;">&#40;</span> dDataFinale <span style="color: #000000;">&#41;</span> &nbsp; <span style="color: #000000;">&#41;</span><br /><br />? cFilter<br /><br />oReservation:<span style="color: #000000;">SetFilter</span><span style="color: #000000;">&#40;</span> cFilter <span style="color: #000000;">&#41;</span><br /><br />&nbsp;</div>[/code:2r6l0esg] The filter expression after applying the values of the variables looks like this [code=fw:2r6l0esg]<div class="fw" id="{CB}" style="font-family: monospace;"><br />AllTrim<span style="color: #000000;">&#40;</span> TYPE <span style="color: #000000;">&#41;</span> == AllTrim<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"01"</span> <span style="color: #000000;">&#41;</span> .and. NUM = <span style="color: #000000;">1</span> .AND. <span style="color: #000000;">&#40;</span> 0d20180701 <= CHECK_OUT .AND. 0d20180807 >= CHECK_IN <span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:2r6l0esg] If you use this code, you will get the results exactly as in your old program.
tdatabase Filter error
ok Now run ok
tdatabase Filter error
Mr. Silvio Hereafter, you do not take all the above trouble to convert your old DBF filters for use with TDatabase. I suggest you a very simple way. This is your original filter [code=fw:17aemzvz]<div class="fw" id="{CB}" style="font-family: monospace;"><br />SET FILTER <span style="color: #0000ff;">TO</span> AllTrim<span style="color: #000000;">&#40;</span> RE->TYPE <span style="color: #000000;">&#41;</span> == AllTrim<span style="color: #000000;">&#40;</span> cTypeRoom <span style="color: #000000;">&#41;</span> .and. RE->NUM = nElemento ;<br />.AND. <span style="color: #000000;">&#40;</span> dDataIniziale <= RE->CHECK_OUT .AND. dDataFinale >= RE->CHECK_IN <span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:17aemzvz] We can not use alias names, so let us replace RE-> with FIELD-> This is the new filter expression [code=fw:17aemzvz]<div class="fw" id="{CB}" style="font-family: monospace;"><br />SET FILTER <span style="color: #0000ff;">TO</span> AllTrim<span style="color: #000000;">&#40;</span> FIELD->TYPE <span style="color: #000000;">&#41;</span> == AllTrim<span style="color: #000000;">&#40;</span> cTypeRoom <span style="color: #000000;">&#41;</span> .and. FIELD->NUM = nElemento ;<br />.AND. <span style="color: #000000;">&#40;</span> dDataIniziale <= FIELD->CHECK_OUT .AND. dDataFinale >= FIELD->CHECK_IN <span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:17aemzvz] Now, do not bother to replace local variables with their values. Just use Exec() method like this, using exactly the same expession without any conversions: [code=fw:17aemzvz]<div class="fw" id="{CB}" style="font-family: monospace;"><br />oReservation:<span style="color: #000000;">Exec</span><span style="color: #000000;">&#40;</span> < ||<br />&nbsp; &nbsp;SET FILTER <span style="color: #0000ff;">TO</span> AllTrim<span style="color: #000000;">&#40;</span> FIELD->TYPE <span style="color: #000000;">&#41;</span> == AllTrim<span style="color: #000000;">&#40;</span> cTypeRoom <span style="color: #000000;">&#41;</span> .and. FIELD->NUM = nElemento ;<br />&nbsp; &nbsp;.AND. <span style="color: #000000;">&#40;</span> dDataIniziale <= FIELD->CHECK_OUT .AND. dDataFinale >= FIELD->CHECK_IN <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp;> <span style="color: #000000;">&#41;</span><br />oReservation:<span style="color: #000000;">GoTop</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:17aemzvz] This approach will save you a lot of time in converting your old filter expressions.
tdatabase Filter error
thanks it no need to converte the date ? to clear the filter ( set filter to) I can make ? [code=fw:1h11cwtn]<div class="fw" id="{CB}" style="font-family: monospace;">oReservation:<span style="color: #000000;">Exec</span><span style="color: #000000;">&#40;</span> < ||<br />&nbsp; &nbsp; SET FILTER <span style="color: #0000ff;">TO</span> <br />&nbsp; &nbsp;<span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp;> <span style="color: #000000;">&#41;</span></div>[/code:1h11cwtn]
tdatabase Filter error
Yes Yes For clearing filter, it is easier and better to use oDbf:SetFilter( "" )
tdatabase Filter error
thanks
tdatabase Filter error
this evening the app make an error [code=fw:1m45bi34]<div class="fw" id="{CB}" style="font-family: monospace;">Application<br />===========<br />   Path and <span style="color: #0000ff;">name</span>: <span style="color: #000000;">C</span>:\Work\Prg\Bikini_scuola\Bikini\main.Exe <span style="color: #000000;">&#40;</span><span style="color: #000000;">32</span> bits<span style="color: #000000;">&#41;</span><br />   <span style="color: #0000ff;">Size</span>: <span style="color: #000000;">5</span>,<span style="color: #000000;">052</span>,<span style="color: #000000;">928</span> bytes<br />   Compiler version: <span style="color: #000000;">Harbour</span> <span style="color: #000000;">3.2</span>.0dev <span style="color: #000000;">&#40;</span>r1703231115<span style="color: #000000;">&#41;</span><br />   FiveWin  version: <span style="color: #000000;">FWH</span> <span style="color: #000000;">19.03</span><br />   C compiler version: <span style="color: #000000;">Borland</span>/Embarcadero C++ <span style="color: #000000;">7.0</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">32</span>-bit<span style="color: #000000;">&#41;</span><br />   Windows version: <span style="color: #000000;">6.2</span>, Build <span style="color: #000000;">9200</span> <br /><br />   Time <span style="color: #0000ff;">from</span> start: <span style="color: #000000;">0</span> hours <span style="color: #000000;">0</span> mins <span style="color: #000000;">10</span> secs <br />   Error occurred <span style="color: #00C800;">at</span>: <span style="color: #000000;">03</span><span style="color: #000000;">-05</span><span style="color: #000000;">-2019</span>, <span style="color: #000000;">19</span>:<span style="color: #000000;">17</span>:<span style="color: #000000;">51</span><br />   Error description: <span style="color: #000000;">Error</span> BASE/<span style="color: #000000;">1074</span>  Argument error: <=<br />   Args:<br />     <span style="color: #000000;">&#91;</span>   <span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> = U   <br />     <span style="color: #000000;">&#91;</span>   <span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> = D   <span style="color: #000000;">26</span><span style="color: #000000;">-07</span><span style="color: #000000;">-2018</span><br /><br />Stack Calls<br />===========<br />   Called <span style="color: #0000ff;">from</span>:  => <span style="color: #000000;">&#40;</span>b<span style="color: #000000;">&#41;</span>EVAL<span style="color: #000000;">&#40;</span> <span style="color: #000000;">719</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>:  => DBGOTOP<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\DATABASE.PRG => <span style="color: #000000;">&#40;</span>b<span style="color: #000000;">&#41;</span>TDATABASE<span style="color: #000000;">&#40;</span> <span style="color: #000000;">189</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\DATABASE.PRG => TDATABASE:<span style="color: #000000;">GOTOP</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">source</span>\PSpiaggia.prg => CHANGE_PLAN<span style="color: #000000;">&#40;</span> <span style="color: #000000;">722</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">source</span>\PSpiaggia.prg => <span style="color: #000000;">&#40;</span>b<span style="color: #000000;">&#41;</span>BEACH<span style="color: #000000;">&#40;</span> <span style="color: #000000;">217</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">DIALOG</span>.PRG => TFSDI:<span style="color: #000000;">INITIATE</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">864</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">DIALOG</span>.PRG => TFSDI:<span style="color: #0000ff;">ACTIVATE</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">330</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">source</span>\PSpiaggia.prg => BEACH<span style="color: #000000;">&#40;</span> <span style="color: #000000;">217</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">source</span>\main.prg => <span style="color: #000000;">&#40;</span>b<span style="color: #000000;">&#41;</span>TAPPLICATION_NEW<span style="color: #000000;">&#40;</span> <span style="color: #000000;">313</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">WINDOW</span>.PRG => TWINDOW:<span style="color: #0000ff;">ACTIVATE</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1064</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">source</span>\main.prg => TAPPLICATION:<span style="color: #0000ff;">ACTIVATE</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">364</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">source</span>\main.prg => MAIN<span style="color: #000000;">&#40;</span> <span style="color: #000000;">76</span> <span style="color: #000000;">&#41;</span></div>[/code:1m45bi34] On Function Change_Plan(dDataIniziale,dDataFinale,lshowNumeri) I Made [code=fw:1m45bi34]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br />oReservation:<span style="color: #000000;">setorder</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span><br />    oReservation:<span style="color: #000000;">Exec</span><span style="color: #000000;">&#40;</span> < ||<br />    SET FILTER <span style="color: #0000ff;">TO</span> AllTrim<span style="color: #000000;">&#40;</span> FIELD->TYPE <span style="color: #000000;">&#41;</span> == AllTrim<span style="color: #000000;">&#40;</span> cTypeRoom <span style="color: #000000;">&#41;</span> .and. FIELD->NUM = nElemento ;<br />   .AND. <span style="color: #000000;">&#40;</span> dDataIniziale <= FIELD->CHECK_OUT .AND. dDataFinale >= FIELD->CHECK_IN <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br />   > <span style="color: #000000;">&#41;</span><br />   oReservation:<span style="color: #000000;">gotop</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /> </div>[/code:1m45bi34] the dbf is index on INDEX ON ROOMS_ID + DToS(CHECK_IN )
tdatabase Filter error
most likely the value of dDataIniziale is nil.
tdatabase Filter error
no this is only for test static dDataIniziale,dDataFinale,lshowNumeri on function Beach() //only for test oApp:dDataIniziale := ctod("01-07-2018") oApp:dDataFinale := ctod("07-08-2018") oApp:lshowNumeri:= .t. on Function Change_Plan oReservation:setorder(1) oReservation:Exec( < || SET FILTER TO AllTrim( FIELD->TYPE ) = AllTrim( cTypeRoom ) .and. FIELD->NUM = nElemento ; .AND. ( oApp:dDataIniziale <= FIELD->CHECK_OUT .AND. oApp:dDataFinale >= FIELD->CHECK_IN ) return nil > ) oReservation:gotop() but on application the date is set to date() on Main.prg ::dDataIniziale := date() ::dDataFinale := date() ::lShowNumeri := .t. before to load the ribbonbar ::BuildRibbonbar() and the on RibbonBar there are two datepick to select the date [code=fw:329frbo3]<div class="fw" id="{CB}" style="font-family: monospace;"> @ <span style="color: #000000;">0.9</span>,<span style="color: #000000;">12</span> &nbsp;DTPICKER &nbsp;oDate1 <span style="color: #0000ff;">VAR</span> &nbsp;oApp:<span style="color: #000000;">dDataIniziale</span> &nbsp;<span style="color: #0000ff;">OF</span> &nbsp; oGr1 &nbsp; <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">145</span>,<span style="color: #000000;">25</span> &nbsp;<span style="color: #0000ff;">VALID</span> oApp:<span style="color: #000000;">dDataIniziale</span><=oApp:<span style="color: #000000;">dDataFinale</span> &nbsp;<span style="color: #0000ff;">UPDATE</span> <span style="color: #0000ff;">picture</span> <span style="color: #ff0000;">"ddd dd mmm yyyy"</span> <span style="color: #0000ff;">FONT</span> oFontBig<br />&nbsp; &nbsp; @ <span style="color: #000000;">0.9</span>,<span style="color: #000000;">40</span> &nbsp;DTPICKER &nbsp;oDate2 <span style="color: #0000ff;">VAR</span> &nbsp;oApp:<span style="color: #000000;">dDataFinale</span> &nbsp;<span style="color: #0000ff;">OF</span> &nbsp; oGr1 &nbsp;<span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">145</span>,<span style="color: #000000;">25</span> &nbsp; &nbsp;<span style="color: #0000ff;">VALID</span> oApp:<span style="color: #000000;">dDataIniziale</span><=oApp:<span style="color: #000000;">dDataFinale</span> &nbsp;<span style="color: #0000ff;">UPDATE</span> <span style="color: #0000ff;">picture</span> <span style="color: #ff0000;">"ddd dd mmm yyyy"</span> &nbsp;<span style="color: #0000ff;">FONT</span> oFontBig<br />&nbsp;</div>[/code:329frbo3] and a button with a menu sample : [code=fw:329frbo3]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Today"</span> &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> oApp:<span style="color: #000000;">dDataIniziale</span> &nbsp;:=date<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,oApp:<span style="color: #000000;">dDataFinale</span> &nbsp; &nbsp;:=date<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,oDate1:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,oDate2:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,CHANGE_PLAN<span style="color: #000000;">&#40;</span> oApp:<span style="color: #000000;">dDataIniziale</span>,oApp:<span style="color: #000000;">dDataFinale</span>,oApp:<span style="color: #000000;">lShowNumeri</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span></div>[/code:329frbo3] and the user can select the Interval of date() as you see on this picture [img:329frbo3]https&#58;//i&#46;postimg&#46;cc/hjgTGggp/m&#46;jpg[/img:329frbo3]
tdatabase Filter error
I change something .... now ddatainiziale and ddatafinale are a data of class Tapplication where is the ribbonbar and as you can see seem run ok [img:7k26i5f3]https&#58;//i&#46;postimg&#46;cc/PrdY58z9/vv&#46;jpg[/img:7k26i5f3]
tdatabase arraytodbf
there is a command to rewrite dbf from array into tdatabase class ^?
tdatabase arraytodbf
tested : read from backup and write to original 1. read backup-data to array 2. zap original dbf 3. write backup-data to original [code=fw:1too9qy6]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">// ---------------------- restore data from original DBF ( backup )----------</span><br /><br /><span style="color: #00C800;">FUNCTION</span> NET_RESTORE3<span style="color: #000000;">&#40;</span>oBrw<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">LOCAL</span>  lReturn := .F., aData := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br /><br />PACKZAP_1<span style="color: #000000;">&#40;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// zap original dbf</span><br /><br /><span style="color: #B900B9;">// original data</span><br />USE CUST_ORG <span style="color: #00C800;">NEW</span> <span style="color: #0000ff;">ALIAS</span> <span style="color: #ff0000;">"CUSTNEW"</span> SHARED VIA <span style="color: #ff0000;">"DBFCDX"</span><br />oCustNew    := TDataBase<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: #0000ff;">Select</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"CUSTNEW"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">// Read required data into array</span><br />cList    := <span style="color: #ff0000;">"*,RECNO()"</span><br />aData    := oCustNew:<span style="color: #000000;">FW_DbfToArray</span><span style="color: #000000;">&#40;</span> @cList <span style="color: #000000;">&#41;</span>  <br />aNew     := Array<span style="color: #000000;">&#40;</span> oCustNew:<span style="color: #000000;">FCount</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> + <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />AEval<span style="color: #000000;">&#40;</span> aNew, <span style="color: #000000;">&#123;</span> |u,i| aNew<span style="color: #000000;">&#91;</span> i <span style="color: #000000;">&#93;</span> := uValBlank<span style="color: #000000;">&#40;</span> oCustNew:<span style="color: #000000;">FieldGet</span><span style="color: #000000;">&#40;</span> i <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>, <span style="color: #000000;">1</span>, oCustNew:<span style="color: #000000;">FCount</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />nRecNoCol:= Len<span style="color: #000000;">&#40;</span> aNew <span style="color: #000000;">&#41;</span><br />aNew<span style="color: #000000;">&#91;</span> nRecNoCol <span style="color: #000000;">&#93;</span> := <span style="color: #000000;">0</span><br /><span style="color: #B900B9;">// Read done close backup</span><br />oCustNew:<span style="color: #000000;">Close</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">// write new data to customer.dbf from backup</span><br />WITH OBJECT oBrw:<span style="color: #000000;">oDbf</span><br />    oCust:<span style="color: #000000;">FW_ArrayToDbf</span><span style="color: #000000;">&#40;</span> aData <span style="color: #000000;">&#41;</span><br />END<br /><br />oCust:<span style="color: #000000;">GoTop</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />oBrw:<span style="color: #000000;">SetoDbf</span><span style="color: #000000;">&#40;</span>oCust<span style="color: #000000;">&#41;</span><br />oBrw:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #0000ff;">MSGINFO</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Original data restored !"</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #000000;">&#40;</span>lReturn<span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">// -----------------</span><br /><br /><span style="color: #00C800;">FUNCTION</span> PACKZAP_1<span style="color: #000000;">&#40;</span>nStyle<span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">IF</span> oCust:<span style="color: #000000;">lShared</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> = .T.<br />    oCust:<span style="color: #000000;">Close</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />    oCust := TCustomers<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span>.F.<span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// exclusive</span><br />    oCust:<span style="color: #000000;">use</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />    <span style="color: #B900B9;">// MSGINFO( oCust:lShared(),"Shared")  </span><br /><span style="color: #00C800;">ENDIF</span><br /><br /><span style="color: #00C800;">IF</span> oCust:<span style="color: #000000;">Used</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />    <span style="color: #00C800;">IF</span> nStyle = <span style="color: #000000;">1</span><br />        oCust:<span style="color: #000000;">Pack</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><span style="color: #ff0000;">"Done Pack"</span><span style="color: #000000;">&#41;</span><br />    <span style="color: #00C800;">ELSE</span><br />        oCust:<span style="color: #000000;">Zap</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><span style="color: #ff0000;">"Done Zap"</span><span style="color: #000000;">&#41;</span><br />    <span style="color: #00C800;">ENDIF</span><br /><span style="color: #00C800;">ENDIF</span><br /><br />oCust:<span style="color: #000000;">Close</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />oCust := TCustomers<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span>.T.<span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// back to shared</span><br />oCust:<span style="color: #000000;">use</span><span style="color: #000000;">&#40;</span><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 /> </div>[/code:1too9qy6] regards Uwe <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
tdatabase arraytodbf
[quote="ukoenig":2eg19p40]tested : read from backup and write to original 1. read backup-data to array 2. zap original dbf 3. write backup-data to original [code=fw:2eg19p40]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">// ---------------------- restore data from original DBF ( backup )----------</span><br /><br /><span style="color: #00C800;">FUNCTION</span> NET_RESTORE3<span style="color: #000000;">&#40;</span>oBrw<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">LOCAL</span>  lReturn := .F., aData := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br /><br />PACKZAP_1<span style="color: #000000;">&#40;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// zap original dbf</span><br /><br /><span style="color: #B900B9;">// original data</span><br />USE CUST_ORG <span style="color: #00C800;">NEW</span> <span style="color: #0000ff;">ALIAS</span> <span style="color: #ff0000;">"CUSTNEW"</span> SHARED VIA <span style="color: #ff0000;">"DBFCDX"</span><br />oCustNew    := TDataBase<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: #0000ff;">Select</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"CUSTNEW"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">// Read required data into array</span><br />cList    := <span style="color: #ff0000;">"*,RECNO()"</span><br />aData    := oCustNew:<span style="color: #000000;">FW_DbfToArray</span><span style="color: #000000;">&#40;</span> @cList <span style="color: #000000;">&#41;</span>  <br />aNew     := Array<span style="color: #000000;">&#40;</span> oCustNew:<span style="color: #000000;">FCount</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> + <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />AEval<span style="color: #000000;">&#40;</span> aNew, <span style="color: #000000;">&#123;</span> |u,i| aNew<span style="color: #000000;">&#91;</span> i <span style="color: #000000;">&#93;</span> := uValBlank<span style="color: #000000;">&#40;</span> oCustNew:<span style="color: #000000;">FieldGet</span><span style="color: #000000;">&#40;</span> i <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>, <span style="color: #000000;">1</span>, oCustNew:<span style="color: #000000;">FCount</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />nRecNoCol:= Len<span style="color: #000000;">&#40;</span> aNew <span style="color: #000000;">&#41;</span><br />aNew<span style="color: #000000;">&#91;</span> nRecNoCol <span style="color: #000000;">&#93;</span> := <span style="color: #000000;">0</span><br /><span style="color: #B900B9;">// Read done close backup</span><br />oCustNew:<span style="color: #000000;">Close</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">// write new data to customer.dbf from backup</span><br />WITH OBJECT oBrw:<span style="color: #000000;">oDbf</span><br />    oCust:<span style="color: #000000;">FW_ArrayToDbf</span><span style="color: #000000;">&#40;</span> aData <span style="color: #000000;">&#41;</span><br />END<br /><br />oCust:<span style="color: #000000;">GoTop</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />oBrw:<span style="color: #000000;">SetoDbf</span><span style="color: #000000;">&#40;</span>oCust<span style="color: #000000;">&#41;</span><br />oBrw:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #0000ff;">MSGINFO</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Original data restored !"</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #000000;">&#40;</span>lReturn<span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">// -----------------</span><br /><br /><span style="color: #00C800;">FUNCTION</span> PACKZAP_1<span style="color: #000000;">&#40;</span>nStyle<span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">IF</span> oCust:<span style="color: #000000;">lShared</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> = .T.<br />    oCust:<span style="color: #000000;">Close</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />    oCust := TCustomers<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span>.F.<span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// exclusive</span><br />    oCust:<span style="color: #000000;">use</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />    <span style="color: #B900B9;">// MSGINFO( oCust:lShared(),"Shared")  </span><br /><span style="color: #00C800;">ENDIF</span><br /><br /><span style="color: #00C800;">IF</span> oCust:<span style="color: #000000;">Used</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />    <span style="color: #00C800;">IF</span> nStyle = <span style="color: #000000;">1</span><br />        oCust:<span style="color: #000000;">Pack</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><span style="color: #ff0000;">"Done Pack"</span><span style="color: #000000;">&#41;</span><br />    <span style="color: #00C800;">ELSE</span><br />        oCust:<span style="color: #000000;">Zap</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><span style="color: #ff0000;">"Done Zap"</span><span style="color: #000000;">&#41;</span><br />    <span style="color: #00C800;">ENDIF</span><br /><span style="color: #00C800;">ENDIF</span><br /><br />oCust:<span style="color: #000000;">Close</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />oCust := TCustomers<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span>.T.<span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// back to shared</span><br />oCust:<span style="color: #000000;">use</span><span style="color: #000000;">&#40;</span><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 /> </div>[/code:2eg19p40] regards Uwe <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->[/quote:2eg19p40] 1. I must open a dbf with tdatabase on share mode. 2. The index have For !deleted() 3 I cannot make pack and zap 4. I can only delete all records. My aData atray can be of 450,800, and over records. It can be too hard to save.
tdatabase arraytodbf
Silvio, what happens with deleted records <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: --> after deleting records normally You need a pack or do You want to clear the fields or keep them marked as deleted adding new data from the array <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: --> just delete PACKZAP_1(2) // zap original dbf and the array-data will be added to the original dbf and keeps the original data I deleted some records from the original and added the data as array from the backup ( same like the original ) like You can see there are double data now. red is deleted and new from the array-import ( added ) just see the recno - number [code=fw:3ufcfgqa]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #000000;">3</span> I cannot make pack and zap<br /><span style="color: #000000;">4</span>. I can only delete all records.</div>[/code:3ufcfgqa] [img:3ufcfgqa]http&#58;//www&#46;pflegeplus&#46;com/IMAGES/Network17&#46;jpg[/img:3ufcfgqa] regards Uwe
tdatabase class not working with memos
Using FiveWin 18.07: one of my client reports that the program is not allowing to save data as usual (program previously compiled and worked correctly several years using version 14.04) Further investigation narrowed the problem on the Tdatabase class: While saving on a Memo field: [code=fw:384dml5a]<div class="fw" id="{CB}" style="font-family: monospace;">  prov:=<span style="color: #ff0000;">""</span><br />  <span style="color: #00C800;">FOR</span> i:=<span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">6</span><br />     prov+=PADR<span style="color: #000000;">&#40;</span>ALLTRIM<span style="color: #000000;">&#40;</span>fill_in<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">+236</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span>,<span style="color: #000000;">84</span><span style="color: #000000;">&#41;</span><br />  <span style="color: #00C800;">NEXT</span> i<br />  msgstop<span style="color: #000000;">&#40;</span>len<span style="color: #000000;">&#40;</span>prov<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>  <span style="color: #B900B9;">//504 as it should be</span><br />  oDbf:<span style="color: #000000;">trincheras</span>:=prov<br />  msgstop<span style="color: #000000;">&#40;</span>len<span style="color: #000000;">&#40;</span>oDbf:<span style="color: #000000;">trincheras</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>  <span style="color: #B900B9;">//still says 504 OK</span><br />  ....  <span style="color: #B900B9;">//continue with other Memo fields</span><br />  prov:=<span style="color: #ff0000;">""</span><br />  <span style="color: #00C800;">FOR</span> i:=<span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">6</span><br />     prov+=PADR<span style="color: #000000;">&#40;</span>ALLTRIM<span style="color: #000000;">&#40;</span>fill_in<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">+242</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span>,<span style="color: #000000;">84</span><span style="color: #000000;">&#41;</span><br />  <span style="color: #00C800;">NEXT</span> i<br />...<br /><br /><br /> </div>[/code:384dml5a] No apparent problem here, but the surprise comes when recovering the same field latter on: [code=fw:384dml5a]<div class="fw" id="{CB}" style="font-family: monospace;">msgstop<span style="color: #000000;">&#40;</span>len<span style="color: #000000;">&#40;</span>oDbf:<span style="color: #000000;">trincheras</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>  <span style="color: #B900B9;">//7 since the user choose to fill-in only seven space (correct), but, Where are my 504 characters saved? Field have been trimmed</span><br /><span style="color: #00C800;">FOR</span> i:=<span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">6</span><br />  fill_in<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">+236</span><span style="color: #000000;">&#93;</span>:=<span style="color: #0000ff;">SUBSTR</span><span style="color: #000000;">&#40;</span>oDbf:<span style="color: #000000;">trincheras</span>,<span style="color: #000000;">&#40;</span>i<span style="color: #000000;">-1</span><span style="color: #000000;">&#41;</span>*<span style="color: #000000;">84</span><span style="color: #000000;">+1</span>, <span style="color: #000000;">84</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">NEXT</span><br />msgstop<span style="color: #000000;">&#40;</span>len<span style="color: #000000;">&#40;</span>fill_in<span style="color: #000000;">&#91;</span><span style="color: #000000;">237</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">//still 7 since field has been trimmed unexpectedly</span><br />...<br /><span style="color: #B900B9;">//same for ALL other memo fields</span></div>[/code:384dml5a] Fixed provisionally with an ending character like this, but this was not planned at all <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( --> [code=fw:384dml5a]<div class="fw" id="{CB}" style="font-family: monospace;"> prov:=<span style="color: #ff0000;">""</span><br />  <span style="color: #00C800;">FOR</span> i:=<span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">6</span><br />     prov+=PADR<span style="color: #000000;">&#40;</span>ALLTRIM<span style="color: #000000;">&#40;</span>fill_in<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">+236</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span>,<span style="color: #000000;">84</span><span style="color: #000000;">&#41;</span><br />  <span style="color: #00C800;">NEXT</span> i<br />  oDbf:<span style="color: #000000;">trincheras</span>:=prov+<span style="color: #ff0000;">"^"</span>  <span style="color: #B900B9;">//mark end of field</span><br />  msgstop<span style="color: #000000;">&#40;</span>len<span style="color: #000000;">&#40;</span>oDbf:<span style="color: #000000;">trincheras</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">//now we have 505 characters</span><br />  prov:=<span style="color: #ff0000;">""</span><br />  <span style="color: #00C800;">FOR</span> i:=<span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">6</span><br />     prov+=PADR<span style="color: #000000;">&#40;</span>ALLTRIM<span style="color: #000000;">&#40;</span>fill_in<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">+242</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span>,<span style="color: #000000;">84</span><span style="color: #000000;">&#41;</span><br />  <span style="color: #00C800;">NEXT</span> i<br />  oDbf:<span style="color: #000000;">mediospase</span>:=prov +<span style="color: #ff0000;">"^"</span><br />...<br /><span style="color: #B900B9;">//recover</span><br />msgstop<span style="color: #000000;">&#40;</span>len<span style="color: #000000;">&#40;</span>oDbf:<span style="color: #000000;">trincheras</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>  <span style="color: #B900B9;">//505 (forced by me)</span><br /><span style="color: #00C800;">FOR</span> i:=<span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">6</span><br />  fill_in<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">+236</span><span style="color: #000000;">&#93;</span>:=<span style="color: #0000ff;">SUBSTR</span><span style="color: #000000;">&#40;</span>oDbf:<span style="color: #000000;">trincheras</span>,<span style="color: #000000;">&#40;</span>i<span style="color: #000000;">-1</span><span style="color: #000000;">&#41;</span>*<span style="color: #000000;">84</span><span style="color: #000000;">+1</span>, <span style="color: #000000;">84</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">NEXT</span><br />msgstop<span style="color: #000000;">&#40;</span>len<span style="color: #000000;">&#40;</span>fill_in<span style="color: #000000;">&#91;</span><span style="color: #000000;">237</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">//now, 84 (user is happy again) only problem is that he has to go though all 7000 registers and save all of them to fix this. Now he is not happy at all (neither do I)</span><br /><br /> </div>[/code:384dml5a] Is there a simple fix modifying something on the TDataBase class? Thanks Emiliano Llano Díaz
tdatabase class not working with memos
TDatabase trims values while saving to memo fields. Do you not want to trim the values while saving?
tdatabase class not working with memos
The old behavior while using this class was saving what it was told without further, hidden, actions. It is a little confusing not finding what it has been saved on the field (even while sometimes, I must confess, is somewhat unnecessary saving extra spaces at the end of a string). Now I am not even sure if this behavior is the "norm" even with string fields or not <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: --> As I wrote in my previous post, I "repair" it adding an extra character at the end of the string.
tdatabase class not working with memos
We modified database.prg to resolve the issue. Please send me an email to the address: nageswaragunupudi [at] gmail [dot] com We will send you revised libraries incorporating the modifications and modified database.prg. You may use these revised libraries.
tdatabase for append / copy
I'm a fan of data objects ( tdatabase / tdata ). Credit James Bott with introducing me to them and it makes my work so much easier. Two capabilities missing from these classes is: oDbf:CopyTo( oDbf2 ) which would allow us to copy all, or filtered, contents of an open data object to a new data file and oDbf:AppendFrom( oDbf2 ) which would allow us to append all, or filtered, records from a second database Does anyone have these two functions now ? If not, I will work on them and provide them to Antonio for inclusion in tDatabase. Tim
tdatabase for append / copy
Tim, I have not tested it myself but it seems as this may be a valid starting point: [code=fw:1jpgcs5h]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">METHOD</span> CopyTo<span style="color: #000000;">&#40;</span> oDbf, aFields, bFor, bWhile, nNext, nRec, cRdd, cCp <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TDataBase<br /><br />   <span style="color: #00C800;">local</span> uVal<br /><br />   <span style="color: #00C800;">if</span> ValType<span style="color: #000000;">&#40;</span> oDbf <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">"O"</span><br />      uVal = <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">cAlias</span> <span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span> __dbCopy<span style="color: #000000;">&#40;</span> oDbf:<span style="color: #000000;">cAlias</span>, aFields, bFor, bWhile, nNext, nRec, cRdd, cCp <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> uVal<br /> </div>[/code:1jpgcs5h] We could copy the records through the target object, but I think that may slow down the process very much
tdatabase for append / copy
Not exactly working ... yet ... will work with it this week. It didn't like the object. Tim
tdatabase for append / copy
Try this: [code=fw:2inkkeeu]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">METHOD</span> CopyTo<span style="color: #000000;">&#40;</span> cFile, aFields, bFor, bWhile, nNext, nRec, cRdd, cCp <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TDataBase<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> uVal<br />&nbsp; &nbsp;uVal = <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">cAlias</span> <span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span> __dbCopy<span style="color: #000000;">&#40;</span> cFile, aFields, bFor, bWhile, nNext, nRec, cRdd, cCp <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br /><span style="color: #00C800;">return</span> uVal</div>[/code:2inkkeeu] Here is a sample test program: [code=fw:2inkkeeu]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">// Test for copyto() method</span><br /><span style="color: #00C800;">function</span> main<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oDB<br />&nbsp; &nbsp;oDB:= Tdatabase<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: #000000;">&#41;</span><br />&nbsp; &nbsp;oDB:<span style="color: #000000;">open</span><span style="color: #000000;">&#40;</span>,<span style="color: #ff0000;">"clients"</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oDB:<span style="color: #000000;">copyto</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"temp"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oDB:<span style="color: #000000;">close</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">msgInfo</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"done"</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:2inkkeeu] Regards, James
tdatabase for append / copy
And here is an AppendFrom() method. [code=fw:ee1wwlaj]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">METHOD</span> AppendFrom<span style="color: #000000;">&#40;</span> cFile, aFields, bFor, bWhile, nNext, nRec, lRest <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TDataBase<br /><br />&nbsp; &nbsp; &nbsp;__dbApp<span style="color: #000000;">&#40;</span> cFile, aFields, bFor, bWhile, nNext, nRec, lRest <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;<br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:ee1wwlaj] Regards, James
tdatabase for append / copy
James, thanks! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
tdatabase for append / copy
Thanks. Where can I find a reference listing ( document ) for xHarbour __db???????? functions. Its not in the manual.
tdatabase for append / copy
You can find a reference to it in std.ch Keep in mind this does not cover sdf or delimited. #command APPEND [FROM <(f)>] [FIELDS <fields,...>] ; [FOR <for>] [WHILE <while>] [NEXT <next>] ; [RECORD <rec>] [<rest:REST>] [ALL] [VIA <rdd>] ; [CODEPAGE <cp>] [CONNECTION <conn>] => ; __dbApp( <(f)>, { <(fields)> }, ; <{for}>, <{while}>, <next>, <rec>, <.rest.>, <rdd>, <conn>, <cp> )
tdatabase for append / copy
Thanks Gale. Actually I'm looking for a list of all __dbxxxxx( ) functions. I'm always appreciative when someone provides a command syntax here, but wonder where they come from because I can't find any of it in my documentation. Tim
tdatabase for append / copy
Please read and study std.ch file in the (x)harbour\include folder. These are the default command translates of all xbase commands into clipper/harbour functions.
tdatabase for append / copy
Here is a list of just the __db functions. There are others starting with leading double underscores. These are all in the STD.CH file. You can find the syntax for these by Googling them. __dbPack() __dbZap() __dbContinue() __dbLocate() __dbCreate() __dbCopyStuct() __dbCopyXStruct() __dbDelim() __dbSDF() __dbCopy() __dbApp() __dbSort() __dbTotal() __dbUpdate() __dbJoin() __dbList()
tdatarow :Request information
I wish Know how change the button on the dialog and the name of the field to show sample for the customer.dbf Cognome: Nome : Indirizzo: intead of FIRST : LAST : STREET: a question if I need a combobox or radio the TdataRow is programmed to make this controls on dialog of editbrowse() ?
tdatarow :Request information
[code=fw:1px1xtdm]<div class="fw" id="{CB}" style="font-family: monospace;">USE CUSTOMER <span style="color: #00C800;">NEW</span> <span style="color: #0000ff;">ALIAS</span> CUST<br />oRec := TDataRow<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;">"CUST"</span>, <span style="color: #ff0000;">"FIRST,LAST,STREET,CITY"</span> <span style="color: #000000;">&#41;</span><br />oRec:<span style="color: #000000;">SetPrompt</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"FIRST"</span>, <span style="color: #ff0000;">"Cognome"</span> <span style="color: #000000;">&#125;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"LAST"</span>, &nbsp;<span style="color: #ff0000;">"Nome"</span> &nbsp; &nbsp;<span style="color: #000000;">&#125;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"STREET"</span>,<span style="color: #ff0000;">"Indirizzo"</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />oRec:<span style="color: #000000;">FieldCbxItems</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"CITY"</span>, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"Roma"</span>, <span style="color: #ff0000;">"Milano"</span>, <span style="color: #ff0000;">"Turino"</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />oRec:<span style="color: #00C800;">Edit</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:1px1xtdm]
tdatarow :Request information
Hello, Very interesting feature. But in orden to fully use it in Spain we need the tooltips of the buttons will use Fwstrings(). Thank you.
tdbf a 32 bits
Hola a todos del foro Alguien tendria el tdbf a 32 bits compilado para xharbour y fwh, el que tenia lo tengo a 16 bits, ya compile y no me salio, tengo problemas. si alguien lo compilo sin errores y esta operativo por favor si podrian enviarme una copia de la lib. Gracias Salu2 Francis
tdbf a 32 bits
¿ Pero para que quieres la lib ?, agrega el PRG con el fuente de la clase a tu lista de archivos de codigo fuente y listo. El codigo fuente es igual para 16 y para 32. y ahora que lo menciono .... ¿ que la TDBF no es parte ya de FiveWin ?
tdbf a 32 bits
tDatabase es parte de Fivewin, tDbf no.
tdbf a 32 bits
Master Rene Es que en una lib es mas facil ponerlos en diferentes sistemas, eso lo uso en casi todos los sistemas hechos a 16 bits. Al querer pasarlo a 32 bits como lib me salen muchos errores y no crea la lib, aun no domino lo de modificar las clases y fuentes... A proposito Master no habra por ahi un manual de ADS en castellano free... para ver las bondades de este maravilloso cliente/servidor. Yo he querido implementar mis sistemas con ads local y aun no he podido por falta de ejemplos. Salu2 Francis <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
tdbf a 32 bits
[quote="Francis":xddzk2te]Master Rene Es que en una lib es mas facil ponerlos en diferentes sistemas, eso lo uso en casi todos los sistemas hechos a 16 bits. Al querer pasarlo a 32 bits como lib me salen muchos errores y no crea la lib, aun no domino lo de modificar las clases y fuentes... A proposito Master no habra por ahi un manual de ADS en castellano free... para ver las bondades de este maravilloso cliente/servidor. Yo he querido implementar mis sistemas con ads local y aun no he podido por falta de ejemplos. Salu2 Francis <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->[/quote:xddzk2te] A ver si puedo y este fin de semana tarde te la bajo. La tengo funcionando en FiveWin 7.04 y además con la clase TINDEX renombrada para que no se 'pegue' con la que trae (traía?) fivewin en su .lib Yo estoy bastante enamorado de ella, no uso .lib sino como dice Rene compilo sus .prg y su .c bajo Harbour (supongo que para xHarbour será lo mismo). Saludos Carlos G.
tdbf a 32 bits
Gracias compañero Estare esperando ... mi correo es <!-- e --><a href="mailto:[email protected]">[email protected]</a><!-- e --> Salu2 Francis
tdbf a 32 bits
Hola compañeros Sigo esperando el tdbf a32 bits para fwh 7.04.... Salu2 Francis
tdbf a 32 bits
[quote="FiveWiDi":383ke1rl][quote="Francis":383ke1rl]Master Rene Es que en una lib es mas facil ponerlos en diferentes sistemas, eso lo uso en casi todos los sistemas hechos a 16 bits. Al querer pasarlo a 32 bits como lib me salen muchos errores y no crea la lib, aun no domino lo de modificar las clases y fuentes... A proposito Master no habra por ahi un manual de ADS en castellano free... para ver las bondades de este maravilloso cliente/servidor. Yo he querido implementar mis sistemas con ads local y aun no he podido por falta de ejemplos. Salu2 Francis <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->[/quote:383ke1rl] A ver si puedo y este fin de semana tarde te la bajo. La tengo funcionando en FiveWin 7.04 y además con la clase TINDEX renombrada para que no se 'pegue' con la que trae (traía?) fivewin en su .lib Yo estoy bastante enamorado de ella, no uso .lib sino como dice Rene compilo sus .prg y su .c bajo Harbour (supongo que para xHarbour será lo mismo). Saludos Carlos G.[/quote:383ke1rl] Amigo, Sería sumamente positivo que tu la pudieras subir y poner en un link en Utilidades, para que todos nos beneficiemos. Gracias desde ya por tu aporte
tdbf a 32 bits
Quiero compartir archivos. Alguien sabe donde puedo dejarlos que no deba registrarme? En hyperupload me subre 0 bytes. Saludos Carlos G.
tdbf a 32 bits
Carlos, <!-- w --><a class="postlink" href="http://www.hotshare.net">www.hotshare.net</a><!-- w --> Solo que si no se descargan tras 30 dias, borran el fichero
tdbf a 32 bits
Carlos, <!-- w --><a class="postlink" href="http://www.box.net">www.box.net</a><!-- w --> Funciona excelente y sin límite de tiempo hasta 10 Mb. <!-- w --><a class="postlink" href="http://www.mediafire.com">www.mediafire.com</a><!-- w --> Funciona excelente y sin límite de tiempo ni de uploads, hasta 100 Mb
tdbf a 32 bits
Saludos Aquí está el link: <!-- m --><a class="postlink" href="http://www.mediafire.com/?49m2tfy4fgx">http://www.mediafire.com/?49m2tfy4fgx</a><!-- m --> Carlos G.
tdolphin
Estoy tratando de hacer funcionar los ejemplos de tdolphin testfw2, los compila correctamente, genera el exe y el programa se queda corriendo en segundo plano pero no muestra nada. [code=fw:214dxqng]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"hbcompat.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"tdolphin.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;">"fivewin.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 />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oWnd <br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oMenu<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oServer<br />&nbsp; &nbsp;<span style="color: #0000ff;">MENU</span> oMenu <span style="color: #000000;">2007</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"testing"</span> <span style="color: #0000ff;">ACTION</span> DataBrowse<span style="color: #000000;">&#40;</span> oServer, oWnd <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">ENDMENU</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;SET CENTURY <span style="color: #0000ff;">ON</span><br />&nbsp; &nbsp;SET DATE FORMAT <span style="color: #ff0000;">"dd/mm/yyyy"</span> &nbsp; <br />&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp;<span style="color: #B900B9;">//Activated Case sensitive</span><br />&nbsp; &nbsp;D_SetCaseSensitive<span style="color: #000000;">&#40;</span> .T. <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Set_MyLang<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"esp"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<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 />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Testing Dolphin - Fivewin"</span> <span style="color: #0000ff;">MENU</span> oMenu<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <br />&nbsp; &nbsp;<br />&nbsp; &nbsp;oServer:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br />PROCEDURE DataBrowse<span style="color: #000000;">&#40;</span> oServer, oWnd <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oQry <br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oDlg<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oBrw<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oData, oCol<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;oQry = oServer:<span style="color: #000000;">Query</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"SELECT * FROM maeclie ORDER BY ncli ASC"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">700</span>,<span style="color: #000000;">300</span> <span style="color: #0000ff;">OF</span> oWnd<br /><br />&nbsp; &nbsp;@ <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> oDlg<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;SetDolphin<span style="color: #000000;">&#40;</span> oBrw, oQry <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp;oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; <br />&nbsp; &nbsp;oDlg:<span style="color: #000000;">oClient</span> = oBrw <br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> oDlg:<span style="color: #000000;">Resize</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;oQry:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</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></div>[/code:214dxqng] donde maeclie es una tabla de la base de datos Gracias
tdolphin
Hola tienes la dll de mysql accesible?
tdolphin
Sí en el mismo directorio. Estoy enlazando tambien setbrow.prg y connto. Luis
tdolphin
Luis que version de fivewin estas usando?
tdolphin
Lo he probado con 7.12 y en la 12.02, hoy voy a probar con el hbmake de fwh, estaba probando con xedit 3.0 que viene con la opción de harbour Luis
tdolphin
Compilando con el buildh modificado me da este error Application Internal Error - e:\fivdolph\testfw2.exe Terminated at: 2013.06.18 08:54:16 Unrecoverable error 6005: Exception error: Exception Code:C0000005 Exception Address:10009BFA EAX:101C6730 EBX:01F51E90 ECX:00FCC001 EDX:00FCC000 ESI:00FCC000 EDI:00FB5DE2 EBP:101C67A8 CS:EIP:001B:10009BFA SS:ESP:0023:0012F9F0 DS:0023 ES:0023 FS:003B GS:0000 Flags:00010293 CS:EIP: 88 06 8B F1 83 C7 01 3B FB 0F 82 47 FF FF FF EB SS:ESP: 00000CEA 0012FA50 00F8D64C 006B21C8 00FB20B4 10025198 101C67A8 00FB2000 00000000 00FA5BC4 02F0A64C 00519758 006B21C8 00FB20B4 00FA5BC4 00FAC2CC C stack: EIP: EBP: Frame: OldEBP, RetAddr, Params... Modules: 0x00400000 0x002AF000 e:\fivdolph\testfw2.exe 0x7C910000 0x000B8000 C:\WINDOWS\system32\ntdll.dll 0x7C800000 0x00103000 C:\WINDOWS\system32\kernel32.dll 0x10000000 0x00244000 e:\fivdolph\LIBMYSQL.DLL 0x77DA0000 0x000AC000 C:\WINDOWS\system32\ADVAPI32.dll 0x77E50000 0x00093000 C:\WINDOWS\system32\RPCRT4.dll 0x77FC0000 0x00011000 C:\WINDOWS\system32\Secur32.dll 0x71A50000 0x0000A000 C:\WINDOWS\system32\WSOCK32.dll 0x71A30000 0x00017000 C:\WINDOWS\system32\WS2_32.dll 0x77BE0000 0x00058000 C:\WINDOWS\system32\msvcrt.dll 0x71A20000 0x00008000 C:\WINDOWS\system32\WS2HELP.dll 0x77BD0000 0x00008000 C:\WINDOWS\system32\VERSION.DLL 0x72F80000 0x00026000 C:\WINDOWS\system32\WINSPOOL.DRV 0x77EF0000 0x00049000 C:\WINDOWS\system32\GDI32.dll 0x7E390000 0x00091000 C:\WINDOWS\system32\USER32.dll 0x58C30000 0x0009A000 C:\WINDOWS\system32\COMCTL32.DLL 0x76360000 0x0004A000 C:\WINDOWS\system32\COMDLG32.DLL 0x7E6A0000 0x00821000 C:\WINDOWS\system32\SHELL32.dll 0x77F40000 0x0007C000 C:\WINDOWS\system32\SHLWAPI.dll 0x76330000 0x00005000 C:\WINDOWS\system32\MSIMG32.DLL 0x774B0000 0x0013E000 C:\WINDOWS\system32\OLE32.DLL 0x770F0000 0x0008B000 C:\WINDOWS\system32\OLEAUT32.DLL 0x7E1E0000 0x00022000 C:\WINDOWS\system32\OLEDLG.DLL 0x76BB0000 0x0000B000 C:\WINDOWS\system32\PSAPI.DLL 0x76340000 0x0001D000 C:\WINDOWS\system32\IMM32.DLL 0x62E30000 0x00009000 C:\WINDOWS\system32\LPK.DLL 0x74D20000 0x0006B000 C:\WINDOWS\system32\USP10.dll 0x00BD0000 0x00227000 c:\docume~1\alluse~1\datosd~1\browse~1\251005~1.80\{c16c1~1\browse~1.dll 0x76C50000 0x00028000 C:\WINDOWS\system32\imagehlp.dll 0x773A0000 0x00103000 C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.6028_x-ww_61e65202\comctl32.dll 0x719D0000 0x00040000 C:\WINDOWS\System32\mswsock.dll 0x76EE0000 0x00027000 C:\WINDOWS\system32\DNSAPI.dll 0x76D20000 0x00019000 C:\WINDOWS\system32\iphlpapi.dll 0x76F70000 0x00008000 C:\WINDOWS\System32\winrnr.dll 0x76F20000 0x0002D000 C:\WINDOWS\system32\WLDAP32.dll 0x76F80000 0x00006000 C:\WINDOWS\system32\rasadhlp.dll Called from MYSQLCONNECT(0) Called from TDOLPHINSRV:CONNECT(870) in .\source\prg\tdolpsrv.prg Called from TDOLPHINSRV:NEW(338) in .\source\prg\tdolpsrv.prg Called from CONNECTTO(266) in testfw2.prg Called from MAIN(22) in testfw2.prg ------------------------------------------------------------------------ Application Internal Error - e:\fivdolph\testfw2.exe Terminated at: 2013.06.18 08:54:27 Unrecoverable error 6005: Exception error: Exception Code:C0000005 Exception Address:10009BB6 EAX:101C675C EBX:01F51D58 ECX:00000006 EDX:00FCC001 ESI:00FCC000 EDI:00FB5DC7 EBP:101C67A8 CS:EIP:001B:10009BB6 SS:ESP:0023:0012F9F0 DS:0023 ES:0023 FS:003B GS:0000 Flags:00010216 CS:EIP: 88 06 83 C6 01 EB 41 8A 07 0F BE C8 83 F9 5C 77 SS:ESP: 00000CEA 0012FA50 00F8D5E4 006B21C8 00FB1FF4 10025198 101C67A8 00FB1F00 00000000 00FA5B4C 02F0A40C 00519758 006B21C8 00FB1FF4 00FA5B4C 00FAC20C C stack: EIP: EBP: Frame: OldEBP, RetAddr, Params... Modules: 0x00400000 0x002AF000 e:\fivdolph\testfw2.exe 0x7C910000 0x000B8000 C:\WINDOWS\system32\ntdll.dll 0x7C800000 0x00103000 C:\WINDOWS\system32\kernel32.dll 0x10000000 0x00244000 e:\fivdolph\LIBMYSQL.DLL 0x77DA0000 0x000AC000 C:\WINDOWS\system32\ADVAPI32.dll 0x77E50000 0x00093000 C:\WINDOWS\system32\RPCRT4.dll 0x77FC0000 0x00011000 C:\WINDOWS\system32\Secur32.dll 0x71A50000 0x0000A000 C:\WINDOWS\system32\WSOCK32.dll 0x71A30000 0x00017000 C:\WINDOWS\system32\WS2_32.dll 0x77BE0000 0x00058000 C:\WINDOWS\system32\msvcrt.dll 0x71A20000 0x00008000 C:\WINDOWS\system32\WS2HELP.dll 0x77BD0000 0x00008000 C:\WINDOWS\system32\VERSION.DLL 0x72F80000 0x00026000 C:\WINDOWS\system32\WINSPOOL.DRV 0x77EF0000 0x00049000 C:\WINDOWS\system32\GDI32.dll 0x7E390000 0x00091000 C:\WINDOWS\system32\USER32.dll 0x58C30000 0x0009A000 C:\WINDOWS\system32\COMCTL32.DLL 0x76360000 0x0004A000 C:\WINDOWS\system32\COMDLG32.DLL 0x7E6A0000 0x00821000 C:\WINDOWS\system32\SHELL32.dll 0x77F40000 0x0007C000 C:\WINDOWS\system32\SHLWAPI.dll 0x76330000 0x00005000 C:\WINDOWS\system32\MSIMG32.DLL 0x774B0000 0x0013E000 C:\WINDOWS\system32\OLE32.DLL 0x770F0000 0x0008B000 C:\WINDOWS\system32\OLEAUT32.DLL 0x7E1E0000 0x00022000 C:\WINDOWS\system32\OLEDLG.DLL 0x76BB0000 0x0000B000 C:\WINDOWS\system32\PSAPI.DLL 0x76340000 0x0001D000 C:\WINDOWS\system32\IMM32.DLL 0x62E30000 0x00009000 C:\WINDOWS\system32\LPK.DLL 0x74D20000 0x0006B000 C:\WINDOWS\system32\USP10.dll 0x00BD0000 0x00227000 c:\docume~1\alluse~1\datosd~1\browse~1\251005~1.80\{c16c1~1\browse~1.dll 0x76C50000 0x00028000 C:\WINDOWS\system32\imagehlp.dll 0x773A0000 0x00103000 C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.6028_x-ww_61e65202\comctl32.dll 0x719D0000 0x00040000 C:\WINDOWS\System32\mswsock.dll 0x76EE0000 0x00027000 C:\WINDOWS\system32\DNSAPI.dll 0x76D20000 0x00019000 C:\WINDOWS\system32\iphlpapi.dll 0x76F70000 0x00008000 C:\WINDOWS\System32\winrnr.dll 0x76F20000 0x0002D000 C:\WINDOWS\system32\WLDAP32.dll 0x76F80000 0x00006000 C:\WINDOWS\system32\rasadhlp.dll Called from MYSQLCONNECT(0) Called from TDOLPHINSRV:CONNECT(870) in .\source\prg\tdolpsrv.prg Called from TDOLPHINSRV:NEW(338) in .\source\prg\tdolpsrv.prg Called from CONNECTTO(266) in testfw2.prg Called from MAIN(22) in testfw2.prg ------------------------------------------------------------------------ Luis
tdolphin
Hola el problema puede ser la version de harbour que estas usando... probe con la version 12.02 y la version de harbour que distribuye fivetech para ese release y funciona bien...
tdolphin
Perdón Daniel la versión es fw 13.02 y la versión de harbour es la 3.2.0 rev. 18881 los otros dos archivos que compilo son 1) connto.prg [code=fw:pt7z5jfh]<div class="fw" id="{CB}" style="font-family: monospace;"># include <span style="color: #ff0000;">"fivewin.ch"</span><br /># include <span style="color: #ff0000;">"tdolphin.ch"</span><br /><br /><span style="color: #00C800;">FUNCTION</span> ConnectTo<span style="color: #000000;">&#40;</span> n <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> c<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> hIni<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oServer<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> cServer, cUser, cPassword, nPort, cDBName,nFlags<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oErr<br /><br /><br />&nbsp; &nbsp;c = <span style="color: #ff0000;">"mysql"</span><br /><br />&nbsp; &nbsp;hIni &nbsp; &nbsp; &nbsp;:= HB_ReadIni<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"connect.ini"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oServer &nbsp; := <span style="color: #00C800;">NIL</span><br />&nbsp; &nbsp;cServer &nbsp; := hIni<span style="color: #000000;">&#91;</span> c <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #ff0000;">"host"</span><span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp;cUser &nbsp; &nbsp; := hIni<span style="color: #000000;">&#91;</span> c <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #ff0000;">"user"</span><span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp;cPassword := hIni<span style="color: #000000;">&#91;</span> c <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #ff0000;">"psw"</span><span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp;nPort &nbsp; &nbsp; := val<span style="color: #000000;">&#40;</span>hIni<span style="color: #000000;">&#91;</span> c <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #ff0000;">"port"</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;cDBName &nbsp; := hIni<span style="color: #000000;">&#91;</span> c <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #ff0000;">"dbname"</span><span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp;nFlags &nbsp; &nbsp;:= val<span style="color: #000000;">&#40;</span>hIni<span style="color: #000000;">&#91;</span> c <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #ff0000;">"flags"</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><br /><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">TRY</span><br />&nbsp; &nbsp; &nbsp; CONNECT oServer HOST cServer ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; USER cUser ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PASSWORD cPassword ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PORT nPort ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FLAGS nFlags;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DATABASE cDBName<br /><br /><br />&nbsp; &nbsp;CATCH oErr<br />&nbsp; &nbsp; &nbsp;? hb_dumpvar<span style="color: #000000;">&#40;</span> oErr <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br />&nbsp; &nbsp;END<br /><br /><span style="color: #00C800;">RETURN</span> oServer<br /><br />&nbsp;</div>[/code:pt7z5jfh] setbrowse [code=fw:pt7z5jfh]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"tdolphin.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;">"fivewin.ch"</span><br /><span style="color: #B900B9;">//--------------------------------------//</span><br /><br />PROCEDURE SetDolphin<span style="color: #000000;">&#40;</span> oBrw, oQry, lAddCols <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> xField &nbsp; &nbsp;:= <span style="color: #00C800;">NIL</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> cHeader &nbsp; := <span style="color: #ff0000;">""</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> cCol &nbsp; &nbsp; &nbsp;:= <span style="color: #ff0000;">""</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> aFldNames, oCol<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> lAddCols == <span style="color: #00C800;">NIL</span><br />&nbsp; &nbsp; &nbsp; lAddCols = .T.<br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp;WITH OBJECT oBrw<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">bGoTop</span> &nbsp; &nbsp;:= <span style="color: #000000;">&#123;</span>|| <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</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>, oQry:<span style="color: #000000;">GoTop</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, <span style="color: #00C800;">NIL</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">bGoBottom</span> := <span style="color: #000000;">&#123;</span>|| <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</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>, oQry:<span style="color: #000000;">GoBottom</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, <span style="color: #00C800;">nil</span> <span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> oQry:<span style="color: #000000;">lPagination</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">bSkip</span> &nbsp; &nbsp; := <span style="color: #000000;">&#123;</span>| n | <span style="color: #00C800;">If</span> <span style="color: #000000;">&#40;</span> n != <span style="color: #00C800;">NIL</span>, <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> n + oQry:<span style="color: #000000;">nRecNo</span> < <span style="color: #000000;">1</span> .AND. oQry:<span style="color: #000000;">nCurrentPage</span> > <span style="color: #000000;">1</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#40;</span> oQry:<span style="color: #000000;">PrevPage</span><span style="color: #000000;">&#40;</span>, .T. <span style="color: #000000;">&#41;</span>, oBrw:<span style="color: #000000;">GoBottom</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> n + oQry:<span style="color: #000000;">nRecNo</span> > oQry:<span style="color: #000000;">nRecCount</span> .AND. oQry:<span style="color: #000000;">nCurrentPage</span> < oQry:<span style="color: #000000;">nTotalRows</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#40;</span> oQry:<span style="color: #000000;">NextPage</span><span style="color: #000000;">&#40;</span> , .T. <span style="color: #000000;">&#41;</span>, oBrw:<span style="color: #000000;">GoTop</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>, oQry:<span style="color: #000000;">Skip</span><span style="color: #000000;">&#40;</span> n <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, oQry:<span style="color: #000000;">Skip</span><span style="color: #000000;">&#40;</span> n <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ELSE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">bSkip</span> &nbsp; &nbsp; := <span style="color: #000000;">&#123;</span>| n | oQry:<span style="color: #000000;">Skip</span><span style="color: #000000;">&#40;</span> n <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">bBof</span> &nbsp; &nbsp; &nbsp;:= <span style="color: #000000;">&#123;</span>|| oQry:<span style="color: #000000;">Bof</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">bEof</span> &nbsp; &nbsp; &nbsp;:= <span style="color: #000000;">&#123;</span>|| oQry:<span style="color: #000000;">Eof</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">bBookMark</span> := <span style="color: #000000;">&#123;</span>| n | <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> n == <span style="color: #00C800;">nil</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</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>, oQry:<span style="color: #000000;">RecNo</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</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>, oQry:<span style="color: #000000;">goto</span><span style="color: #000000;">&#40;</span> n <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">bKeyNo</span> &nbsp; &nbsp;:= <span style="color: #000000;">&#123;</span>| n | <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> n == <span style="color: #00C800;">nil</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</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>, oQry:<span style="color: #000000;">RecNo</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</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>, oQry:<span style="color: #000000;">Goto</span><span style="color: #000000;">&#40;</span> n <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">bKeyCount</span> := <span style="color: #000000;">&#123;</span>|| oQry:<span style="color: #000000;">LastRec</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;END<br /><br />&nbsp; &nbsp;oBrw:<span style="color: #000000;">nDataType</span> &nbsp; &nbsp; &nbsp; &nbsp; := DATATYPE_USER<br />&nbsp; &nbsp;oQry:<span style="color: #000000;">Cargo</span> = oQry:<span style="color: #000000;">aStructure</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span><br /><br /><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> lAddCols<br /><br />&nbsp; &nbsp; &nbsp; aFldNames := oQry:<span style="color: #000000;">aStructure</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">FOR</span> EACH xField IN aFldNames<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cCol &nbsp; &nbsp;:= xField<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cHeader := xField<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oCol = SetColFromMySQL<span style="color: #000000;">&#40;</span> cCol, cHeader, oQry, oBrw <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">//set order</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oCol:<span style="color: #000000;">bLClickHeader</span> = Build_CodeBlock_Order<span style="color: #000000;">&#40;</span> oQry <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">NEXT</span><br /><br />&nbsp; &nbsp; &nbsp; oBrw:<span style="color: #000000;">bSeek</span> &nbsp;:= <span style="color: #000000;">&#123;</span> | c | DolphinSeek<span style="color: #000000;">&#40;</span> c, oQry <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br /><br /><span style="color: #00C800;">RETURN</span><br /><br /><span style="color: #B900B9;">//--------------------------------------//</span><br /><br /><span style="color: #00C800;">FUNCTION</span> Build_CodeBlock_Order<span style="color: #000000;">&#40;</span> oQry <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">RETURN</span> <span style="color: #000000;">&#123;</span>| nMRow, nMCol, nFlags, oCol | SetOrderDolphin<span style="color: #000000;">&#40;</span> oCol, oQry <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//--------------------------------------//</span><br /><br /><span style="color: #00C800;">FUNCTION</span> DolphinSeek<span style="color: #000000;">&#40;</span> c, oQry <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> nStart<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> uData, nNum<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">STATIC</span> aLastRec := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> Len<span style="color: #000000;">&#40;</span> aLastRec <span style="color: #000000;">&#41;</span> < Len<span style="color: #000000;">&#40;</span> c <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> Len<span style="color: #000000;">&#40;</span> aLastRec <span style="color: #000000;">&#41;</span> == <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nStart = <span style="color: #000000;">1</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ELSE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nStart = oQry:<span style="color: #000000;">RecNo</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp; &nbsp; AAdd<span style="color: #000000;">&#40;</span> aLastRec, nStart <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ELSE</span><br />&nbsp; &nbsp; &nbsp; ADel<span style="color: #000000;">&#40;</span> aLastRec, Len<span style="color: #000000;">&#40;</span> aLastRec <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; ASize<span style="color: #000000;">&#40;</span> aLastRec, Len<span style="color: #000000;">&#40;</span> aLastRec <span style="color: #000000;">&#41;</span> - <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> Len<span style="color: #000000;">&#40;</span> aLastRec <span style="color: #000000;">&#41;</span> == <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nStart = <span style="color: #000000;">1</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ELSE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nStart = ATail<span style="color: #000000;">&#40;</span> aLastRec <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp;oQry:<span style="color: #000000;">Seek</span><span style="color: #000000;">&#40;</span> c, oQry:<span style="color: #000000;">Cargo</span>, nStart, oQry:<span style="color: #000000;">LastRec</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, .T., .T. <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span> .T.<br /><br /><br /><span style="color: #B900B9;">//--------------------------------------//</span><br /><br /><span style="color: #00C800;">FUNCTION</span> SetColFromMySQL<span style="color: #000000;">&#40;</span> cnCol, cHeader, oQry , oBrw <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> nType, cType, nLen, nDec, cName<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oCol, nCol<br /><br />&nbsp; &nbsp;nCol := cnCol<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> ValType<span style="color: #000000;">&#40;</span> cnCol <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">"C"</span><br />&nbsp; &nbsp; &nbsp; nCol &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; := oQry:<span style="color: #000000;">FieldPos</span><span style="color: #000000;">&#40;</span> cnCol <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp;cName &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; := oQry:<span style="color: #000000;">FieldName</span><span style="color: #000000;">&#40;</span> nCol <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;oCol &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:= oBrw:<span style="color: #000000;">AddCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oCol:<span style="color: #000000;">cHeader</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:= cHeader<br />&nbsp; &nbsp;cType &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; := oQry:<span style="color: #000000;">FieldType</span><span style="color: #000000;">&#40;</span> nCol <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;nLen &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:= <span style="color: #000000;">0</span><br />&nbsp; &nbsp;nDec &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:= <span style="color: #000000;">0</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">DO</span> <span style="color: #00C800;">CASE</span><br />&nbsp; &nbsp;<span style="color: #00C800;">CASE</span> cType &nbsp; &nbsp; &nbsp; == <span style="color: #ff0000;">'N'</span><br />&nbsp; &nbsp; &nbsp; nLen &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; := oQry:<span style="color: #000000;">FieldLen</span><span style="color: #000000;">&#40;</span> nCol <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; nDec &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; := oQry:<span style="color: #000000;">FieldDec</span><span style="color: #000000;">&#40;</span> nCol <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oCol:<span style="color: #000000;">cEditPicture</span> &nbsp;:= NumPict<span style="color: #000000;">&#40;</span> nLen, nDec, .F., .f. <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">CASE</span> cType &nbsp; &nbsp; &nbsp; == <span style="color: #ff0000;">'C'</span><br />&nbsp; &nbsp; &nbsp; nLen &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; := <span style="color: #0000ff;">MIN</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">100</span>, oQry:<span style="color: #000000;">FieldLen</span><span style="color: #000000;">&#40;</span> nCol <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">CASE</span> cType &nbsp; &nbsp; &nbsp; == <span style="color: #ff0000;">'M'</span><br />&nbsp; &nbsp; &nbsp; nLen &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; := <span style="color: #0000ff;">MIN</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">100</span>, Len<span style="color: #000000;">&#40;</span>AllTrim<span style="color: #000000;">&#40;</span>oQry:<span style="color: #000000;">FieldGet</span><span style="color: #000000;">&#40;</span> nCol <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; nLen &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; := <span style="color: #00C800;">IF</span><span style="color: #000000;">&#40;</span>nLen < <span style="color: #000000;">30</span>, <span style="color: #000000;">30</span>, nLen <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">CASE</span> cType &nbsp; &nbsp; &nbsp; == <span style="color: #ff0000;">'D'</span><br />&nbsp; &nbsp; &nbsp; oCol:<span style="color: #000000;">nHeadStrAlign</span> := <span style="color: #000000;">2</span><br />&nbsp; &nbsp; &nbsp; oCol:<span style="color: #000000;">nDataStrAlign</span> := <span style="color: #000000;">0</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">CASE</span> cType &nbsp; &nbsp; &nbsp; == <span style="color: #00C800;">NIL</span><br />&nbsp; &nbsp; &nbsp; oCol:<span style="color: #000000;">bEditValue</span> &nbsp; &nbsp;:= <span style="color: #000000;">&#123;</span> || <span style="color: #ff0000;">"..."</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">OTHERWISE</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// just in case. &nbsp;this will not be executed</span><br />&nbsp; &nbsp; &nbsp; oCol:<span style="color: #000000;">bEditValue</span> &nbsp; &nbsp;:= <span style="color: #000000;">&#123;</span> || <span style="color: #ff0000;">"..."</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDCASE</span><br /><br />&nbsp; &nbsp;oCol:<span style="color: #000000;">bEditValue</span> &nbsp; &nbsp; &nbsp; := <span style="color: #000000;">&#123;</span> || oQry:<span style="color: #000000;">FieldGet</span><span style="color: #000000;">&#40;</span> nCol <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;oCol:<span style="color: #000000;">cDataType</span> &nbsp; &nbsp; &nbsp; &nbsp;:= <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> cType == <span style="color: #00C800;">nil</span>, <span style="color: #ff0000;">'C'</span>, cType <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oCol:<span style="color: #000000;">bOnPostEdit</span> &nbsp; &nbsp; &nbsp;:= <span style="color: #000000;">&#123;</span> |o,x,n| <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> n == VK_RETURN, oBrw:<span style="color: #000000;">onedit</span><span style="color: #000000;">&#40;</span> o, x, n, cType, nCol <span style="color: #000000;">&#41;</span>, <span style="color: #00C800;">NIL</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br /><span style="color: #00C800;">RETURN</span> oCol<br /><br /><span style="color: #B900B9;">//--------------------------------------//</span><br /><br />PROCEDURE SetOrderDolphin<span style="color: #000000;">&#40;</span> oCol, oQry <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> aToken<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> cType, cOrder<br /><br />&nbsp; &nbsp;aToken := HB_ATokens<span style="color: #000000;">&#40;</span> oQry:<span style="color: #000000;">cOrder</span>, <span style="color: #ff0000;">" "</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> Len<span style="color: #000000;">&#40;</span> aToken <span style="color: #000000;">&#41;</span> == <span style="color: #000000;">1</span><br />&nbsp; &nbsp; &nbsp; AAdd<span style="color: #000000;">&#40;</span> aToken, <span style="color: #ff0000;">"ASC"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp;cOrder = AllTrim<span style="color: #000000;">&#40;</span> Lower<span style="color: #000000;">&#40;</span> aToken<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;cType = aToken<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span><br /><br />&nbsp; &nbsp;AEval<span style="color: #000000;">&#40;</span> oCol:<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">aCols</span>, <span style="color: #000000;">&#123;</span>| o | o:<span style="color: #000000;">cOrder</span> := <span style="color: #ff0000;">" "</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> oQry:<span style="color: #000000;">aStructure</span><span style="color: #000000;">&#91;</span> oCol:<span style="color: #000000;">nCreationOrder</span> <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> == cOrder<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> Upper<span style="color: #000000;">&#40;</span> cType <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">"ASC"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cType = <span style="color: #ff0000;">"DESC"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oCol:<span style="color: #000000;">cOrder</span> = <span style="color: #ff0000;">"D"</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ELSE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cType = <span style="color: #ff0000;">"ASC"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oCol:<span style="color: #000000;">cOrder</span> = <span style="color: #ff0000;">"A"</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ELSE</span><br />&nbsp; &nbsp; &nbsp; cOrder = oQry:<span style="color: #000000;">aStructure</span><span style="color: #000000;">&#91;</span> oCol:<span style="color: #000000;">nCreationOrder</span> <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; cType = <span style="color: #ff0000;">"ASC"</span><br />&nbsp; &nbsp; &nbsp; oCol:<span style="color: #000000;">cOrder</span> = <span style="color: #ff0000;">"A"</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp;oQry:<span style="color: #000000;">SetOrder</span><span style="color: #000000;">&#40;</span> cOrder + <span style="color: #ff0000;">" "</span> + cType <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oCol:<span style="color: #000000;">oBrw</span>:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span><br /><br />&nbsp;</div>[/code:pt7z5jfh] y el scrip de compilacion [code=fw:pt7z5jfh]<div class="fw" id="{CB}" style="font-family: monospace;"><?xml version=<span style="color: #ff0000;">"1.0"</span>?><br /><Project><br />&nbsp; &nbsp;<Type Value=<span style="color: #ff0000;">"exe"</span>/><br />&nbsp; &nbsp;<Description Value=<span style="color: #ff0000;">"fivedolph"</span>/><br />&nbsp; &nbsp;<Output Value=<span style="color: #ff0000;">"fivedolph.exe"</span>/><br />&nbsp; &nbsp;<Environment Value=<span style="color: #ff0000;">"fivehar"</span>/><br />&nbsp; &nbsp;<MainModule Value=<span style="color: #ff0000;">"testfw2.prg"</span>/><br />&nbsp; &nbsp;<MultipleInstances Value=<span style="color: #ff0000;">"Y"</span>/><br />&nbsp; &nbsp;<XPManifest Value=<span style="color: #ff0000;">"Y"</span>/><br />&nbsp; &nbsp;<Icon Value=<span style="color: #ff0000;">""</span>/><br />&nbsp; &nbsp;<Parameters Value=<span style="color: #ff0000;">""</span>/><br />&nbsp; &nbsp;<OEM Value=<span style="color: #ff0000;">"N"</span>/><br />&nbsp; &nbsp;<Version><br />&nbsp; &nbsp; &nbsp; <VersionInfo Value=<span style="color: #ff0000;">"N"</span>/><br />&nbsp; &nbsp; &nbsp; <Version Value=<span style="color: #ff0000;">"1.0"</span>/><br />&nbsp; &nbsp; &nbsp; <Release Value=<span style="color: #ff0000;">"0"</span>/><br />&nbsp; &nbsp; &nbsp; <Build Value=<span style="color: #ff0000;">"0"</span>/><br />&nbsp; &nbsp; &nbsp; <Company Value=<span style="color: #ff0000;">""</span>/><br />&nbsp; &nbsp; &nbsp; <CopyRight Value=<span style="color: #ff0000;">""</span>/><br />&nbsp; &nbsp; &nbsp; <TradeMarks Value=<span style="color: #ff0000;">""</span>/><br />&nbsp; &nbsp; &nbsp; <Comments Value=<span style="color: #ff0000;">""</span>/><br />&nbsp; &nbsp;</Version><br />&nbsp; &nbsp;<Directories><br />&nbsp; &nbsp; &nbsp; <SourceDir Value=<span style="color: #ff0000;">"Source"</span>/><br />&nbsp; &nbsp; &nbsp; <IncludeDir Value=<span style="color: #ff0000;">"Include"</span>/><br />&nbsp; &nbsp; &nbsp; <ResourceDir Value=<span style="color: #ff0000;">"Resource"</span>/><br />&nbsp; &nbsp; &nbsp; <ObjDir Value=<span style="color: #ff0000;">"Obj"</span>/><br />&nbsp; &nbsp;</Directories><br />&nbsp; &nbsp;<Options><br />&nbsp; &nbsp; &nbsp; <AutomaticMemvarDeclaration Value=<span style="color: #ff0000;">"Y"</span>/><br />&nbsp; &nbsp; &nbsp; <DebugInfo Value=<span style="color: #ff0000;">"N"</span>/><br />&nbsp; &nbsp; &nbsp; <SuppressLineNumberInformation Value=<span style="color: #ff0000;">"N"</span>/><br />&nbsp; &nbsp; &nbsp; <SuppressShortcutting Value=<span style="color: #ff0000;">"N"</span>/><br />&nbsp; &nbsp; &nbsp; <WarnningLevel Value=<span style="color: #ff0000;">"1"</span>/><br />&nbsp; &nbsp; &nbsp; <MoreOptions Value=<span style="color: #ff0000;">""</span>/><br />&nbsp; &nbsp; &nbsp; <MoreCOpt Value=<span style="color: #ff0000;">""</span>/><br />&nbsp; &nbsp; &nbsp; <MapFile Value=<span style="color: #ff0000;">"N"</span>/><br />&nbsp; &nbsp; &nbsp; <ConsoleMode Value=<span style="color: #ff0000;">"N"</span>/><br />&nbsp; &nbsp; &nbsp; <MoreLinkOpt Value=<span style="color: #ff0000;">""</span>/><br />&nbsp; &nbsp;</Options><br />&nbsp; &nbsp;<Export><br />&nbsp; &nbsp; &nbsp; <Dir Value=<span style="color: #ff0000;">""</span>/><br />&nbsp; &nbsp; &nbsp; <Source Value=<span style="color: #ff0000;">"Y"</span>/><br />&nbsp; &nbsp; &nbsp; <Exe Value=<span style="color: #ff0000;">"N"</span>/><br />&nbsp; &nbsp; &nbsp; <Bin Value=<span style="color: #ff0000;">"N"</span>/><br />&nbsp; &nbsp; &nbsp; <Resource Value=<span style="color: #ff0000;">"Y"</span>/><br />&nbsp; &nbsp; &nbsp; <ResourceAll Value=<span style="color: #ff0000;">"N"</span>/><br />&nbsp; &nbsp; &nbsp; <ErrorLog Value=<span style="color: #ff0000;">"N"</span>/><br />&nbsp; &nbsp; &nbsp; <Subprojects Value=<span style="color: #ff0000;">"Y"</span>/><br />&nbsp; &nbsp;</Export><br />&nbsp; &nbsp;<Clean><br />&nbsp; &nbsp; &nbsp; <All Value=<span style="color: #ff0000;">"Y"</span>/><br />&nbsp; &nbsp;</Clean><br />&nbsp; &nbsp;<FinalExe><br />&nbsp; &nbsp; &nbsp; <FullCompile Value=<span style="color: #ff0000;">"N"</span>/><br />&nbsp; &nbsp; &nbsp; <UpxCompress Value=<span style="color: #ff0000;">"N"</span>/><br />&nbsp; &nbsp; &nbsp; <CompressFlags Value=<span style="color: #ff0000;">""</span>/><br />&nbsp; &nbsp; &nbsp; <Installer Value=<span style="color: #ff0000;">"N"</span>/><br />&nbsp; &nbsp; &nbsp; <InstallerFlags Value=<span style="color: #ff0000;">""</span>/><br />&nbsp; &nbsp; &nbsp; <TlbInfo Value=<span style="color: #ff0000;">"N"</span>/><br />&nbsp; &nbsp;</FinalExe><br />&nbsp; &nbsp;<VCS><br />&nbsp; &nbsp; &nbsp; <Type Value=<span style="color: #ff0000;">"None"</span>/><br />&nbsp; &nbsp;</VCS><br />&nbsp; &nbsp;<Files><br />&nbsp; &nbsp; &nbsp; <File Filename=<span style="color: #ff0000;">"testfw2.prg"</span>/><br />&nbsp; &nbsp; &nbsp; <File Filename=<span style="color: #ff0000;">"connto.prg"</span>/><br />&nbsp; &nbsp; &nbsp; <File Filename=<span style="color: #ff0000;">"setbrw.prg"</span>/><br />&nbsp; &nbsp;</Files><br />&nbsp; &nbsp;<Libraries><br />&nbsp; &nbsp; &nbsp; <Library Filename=<span style="color: #ff0000;">"[user]FiveH.lib"</span>/><br />&nbsp; &nbsp; &nbsp; <Library Filename=<span style="color: #ff0000;">"[user]FiveHC.lib"</span>/><br />&nbsp; &nbsp; &nbsp; <Library Filename=<span style="color: #ff0000;">"[project]lib<span style="color: #000000;">\d</span>olphin.lib"</span>/><br />&nbsp; &nbsp; &nbsp; <Library Filename=<span style="color: #ff0000;">"[project]libmysql.lib"</span>/><br />&nbsp; &nbsp; &nbsp; <Library Filename=<span style="color: #ff0000;">"[Harbour]hbextern.lib"</span>/><br />&nbsp; &nbsp; &nbsp; <Library Filename=<span style="color: #ff0000;">"[Harbour]hbdebug.lib"</span>/><br />&nbsp; &nbsp; &nbsp; <Library Filename=<span style="color: #ff0000;">"[Harbour]hbvm.lib"</span>/><br />&nbsp; &nbsp; &nbsp; <Library Filename=<span style="color: #ff0000;">"[Harbour]hbrtl.lib"</span>/><br />&nbsp; &nbsp; &nbsp; <Library Filename=<span style="color: #ff0000;">"[harbour]hbct.lib"</span>/><br />&nbsp; &nbsp; &nbsp; <Library Filename=<span style="color: #ff0000;">"[Harbour]hblang.lib"</span>/><br />&nbsp; &nbsp; &nbsp; <Library Filename=<span style="color: #ff0000;">"[Harbour]hbcpage.lib"</span>/><br />&nbsp; &nbsp; &nbsp; <Library Link=<span style="color: #ff0000;">"N"</span> Filename=<span style="color: #ff0000;">"[Harbour]gtcgi.lib"</span>/><br />&nbsp; &nbsp; &nbsp; <Library Link=<span style="color: #ff0000;">"N"</span> Filename=<span style="color: #ff0000;">"[Harbour]gtpca.lib"</span>/><br />&nbsp; &nbsp; &nbsp; <Library Link=<span style="color: #ff0000;">"N"</span> Filename=<span style="color: #ff0000;">"[Harbour]gtstd.lib"</span>/><br />&nbsp; &nbsp; &nbsp; <Library Filename=<span style="color: #ff0000;">"[Harbour]gtwin.lib"</span>/><br />&nbsp; &nbsp; &nbsp; <Library Link=<span style="color: #ff0000;">"N"</span> Filename=<span style="color: #ff0000;">"[Harbour]gtwvt.lib"</span>/><br />&nbsp; &nbsp; &nbsp; <Library Filename=<span style="color: #ff0000;">"[Harbour]gtgui.lib"</span>/><br />&nbsp; &nbsp; &nbsp; <Library Filename=<span style="color: #ff0000;">"[harbour]xhb.lib"</span>/><br />&nbsp; &nbsp; &nbsp; <Library Filename=<span style="color: #ff0000;">"[Harbour]hbrdd.lib"</span>/><br />&nbsp; &nbsp; &nbsp; <Library Filename=<span style="color: #ff0000;">"[Harbour]hbuddall.lib"</span>/><br />&nbsp; &nbsp; &nbsp; <Library Filename=<span style="color: #ff0000;">"[Harbour]hbusrrdd.lib"</span>/><br />&nbsp; &nbsp; &nbsp; <Library Filename=<span style="color: #ff0000;">"[Harbour]rddntx.lib"</span>/><br />&nbsp; &nbsp; &nbsp; <Library Filename=<span style="color: #ff0000;">"[Harbour]rddcdx.lib"</span>/><br />&nbsp; &nbsp; &nbsp; <Library Filename=<span style="color: #ff0000;">"[Harbour]rddnsx.lib"</span>/><br />&nbsp; &nbsp; &nbsp; <Library Filename=<span style="color: #ff0000;">"[Harbour]rddfpt.lib"</span>/><br />&nbsp; &nbsp; &nbsp; <Library Link=<span style="color: #ff0000;">"N"</span> Filename=<span style="color: #ff0000;">"[Harbour]rddads.lib"</span>/><br />&nbsp; &nbsp; &nbsp; <Library Link=<span style="color: #ff0000;">"N"</span> Filename=<span style="color: #ff0000;">"[Harbour]ace32.lib"</span>/><br />&nbsp; &nbsp; &nbsp; <Library Filename=<span style="color: #ff0000;">"[Harbour]hbhsx.lib"</span>/><br />&nbsp; &nbsp; &nbsp; <Library Filename=<span style="color: #ff0000;">"[Harbour]hbsix.lib"</span>/><br />&nbsp; &nbsp; &nbsp; <Library Filename=<span style="color: #ff0000;">"[Harbour]hbmacro.lib"</span>/><br />&nbsp; &nbsp; &nbsp; <Library Filename=<span style="color: #ff0000;">"[Harbour]hbcplr.lib"</span>/><br />&nbsp; &nbsp; &nbsp; <Library Filename=<span style="color: #ff0000;">"[Harbour]hbpp.lib"</span>/><br />&nbsp; &nbsp; &nbsp; <Library Filename=<span style="color: #ff0000;">"[Harbour]hbcommon.lib"</span>/><br />&nbsp; &nbsp; &nbsp; <Library Filename=<span style="color: #ff0000;">"[Harbour]hbmainwin.lib"</span>/><br />&nbsp; &nbsp; &nbsp; <Library Filename=<span style="color: #ff0000;">"[Harbour]hbmxml.lib"</span>/><br />&nbsp; &nbsp; &nbsp; <Library Filename=<span style="color: #ff0000;">"[Harbour]mxml.lib"</span>/><br />&nbsp; &nbsp; &nbsp; <Library Filename=<span style="color: #ff0000;">"[Harbour]hbpcre.lib"</span>/><br />&nbsp; &nbsp; &nbsp; <Library Filename=<span style="color: #ff0000;">"[Harbour]hbwin.lib"</span>/><br />&nbsp; &nbsp; &nbsp; <Library Filename=<span style="color: #ff0000;">"[Harbour]hbmzip.lib"</span>/><br />&nbsp; &nbsp; &nbsp; <Library Filename=<span style="color: #ff0000;">"[Harbour]minizip.lib"</span>/><br />&nbsp; &nbsp; &nbsp; <Library Filename=<span style="color: #ff0000;">"[Harbour]hbzlib.lib"</span>/><br />&nbsp; &nbsp; &nbsp; <Library Filename=<span style="color: #ff0000;">"[bcc]c0w32.obj"</span>/><br />&nbsp; &nbsp; &nbsp; <Library Filename=<span style="color: #ff0000;">"[bcc]psdk<span style="color: #000000;">\o</span>dbc32.lib"</span>/><br />&nbsp; &nbsp; &nbsp; <Library Filename=<span style="color: #ff0000;">"[bcc]psdk<span style="color: #000000;">\m</span>simg32.lib"</span>/><br />&nbsp; &nbsp; &nbsp; <Library Filename=<span style="color: #ff0000;">"[bcc]cw32.lib"</span>/><br />&nbsp; &nbsp; &nbsp; <Library Filename=<span style="color: #ff0000;">"[bcc]import32.lib"</span>/><br />&nbsp; &nbsp; &nbsp; <Library Filename=<span style="color: #ff0000;">"[bcc]PSDK<span style="color: #000000;">\p</span>sapi.lib"</span>/><br />&nbsp; &nbsp; &nbsp; <Library Filename=<span style="color: #ff0000;">"[bcc]wininet.lib"</span>/><br />&nbsp; &nbsp;</Libraries><br /></Project><br /><br />&nbsp;</div>[/code:pt7z5jfh] Lo que agregue es los includes de fivewin Luis
tdolphin
Hola esa version de fivewin soporta nativamente a TDolphin puedes usarlo de esta via: [code=fw:19e6g62s]<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> oBrw <span style="color: #0000ff;">OF</span> oDlg OBJECT oQry</div>[/code:19e6g62s] o esta forma [code=fw:19e6g62s]<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> oBrw <span style="color: #0000ff;">OF</span> oDlg<br />oBrw:<span style="color: #000000;">SetDolphin</span><span style="color: #000000;">&#40;</span> oQry <span style="color: #000000;">&#41;</span></div>[/code:19e6g62s] no necesitas [code=fw:19e6g62s]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"setbrw.prg"</span></div>[/code:19e6g62s] te dejo el ejemplo como me funciona [code=fw:19e6g62s]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">//#include "hbcompat.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"tdolphin.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;">"fivewin.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> oWnd <br />   <span style="color: #00C800;">LOCAL</span> oMenu<br />   <span style="color: #00C800;">LOCAL</span> oServer<br />   <span style="color: #0000ff;">MENU</span> oMenu <span style="color: #000000;">2007</span><br />      <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"testing"</span> <span style="color: #0000ff;">ACTION</span> DataBrowse<span style="color: #000000;">&#40;</span> oServer, oWnd <span style="color: #000000;">&#41;</span><br />   <span style="color: #0000ff;">ENDMENU</span><br />   <br />   SET CENTURY <span style="color: #0000ff;">ON</span><br />   SET DATE FORMAT <span style="color: #ff0000;">"dd/mm/yyyy"</span>   <br />      <br />   <span style="color: #B900B9;">//Activated Case sensitive</span><br />   D_SetCaseSensitive<span style="color: #000000;">&#40;</span> .T. <span style="color: #000000;">&#41;</span><br />   Set_MyLang<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"esp"</span> <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 />      <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br />   <span style="color: #00C800;">ENDIF</span><br />   <br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Testing Dolphin - Fivewin"</span> <span style="color: #0000ff;">MENU</span> oMenu<br />   <br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <br />   <br />   oServer:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br />PROCEDURE DataBrowse<span style="color: #000000;">&#40;</span> oServer, oWnd <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">LOCAL</span> oQry <br />   <span style="color: #00C800;">LOCAL</span> oDlg<br />   <span style="color: #00C800;">LOCAL</span> oBrw<br />   <span style="color: #00C800;">LOCAL</span> oData, oCol<br />   <br />   <br />   oQry = oServer:<span style="color: #000000;">Query</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"SELECT * FROM president ORDER BY last_name ASC"</span> <span style="color: #000000;">&#41;</span><br />   <br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">700</span>,<span style="color: #000000;">300</span> <span style="color: #0000ff;">OF</span> oWnd<br /><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> oDlg OBJECT oQry<br />   <br />   <span style="color: #B900B9;">//oBrw:SetDolphin( 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 />   oDlg:<span style="color: #000000;">oClient</span> = oBrw <br />   <br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> oDlg:<span style="color: #000000;">Resize</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <br />   oQry:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</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: #B900B9;">//#include "setbrw.prg"</span><br /> </div>[/code:19e6g62s]
tdolphin
Daniel copié tu código tal cual y me sigue dando error, probé leyendo el ini y lo lee perfectamente, probé enlazando con xedit3 y con el buildh que viene en fwh modificado para este ejemplo. Te envío una imagen del error y el error. <!-- m --><a class="postlink" href="http://www.4shared.com/file/35aVyKxp/hb_out.html">http://www.4shared.com/file/35aVyKxp/hb_out.html</a><!-- m --> [img:wbzh0zib]http&#58;//img703&#46;imageshack&#46;us/img703/8262/h2wj&#46;jpg[/img:wbzh0zib] Lo probé en windows xp y windows 7. Con la clase tymsql tengo un programa funcionando bastante elemental, que es el que utilizó en mi actividad principal, donde llevo ctas ctes, clientes, proveedores y cheques. Mi intención es poder manejar dolphin ya que en tu blog y los samples de tdolphin tengo mas información para poder manejar sql. En tmysql lo defino así [code=fw:wbzh0zib]<div class="fw" id="{CB}" style="font-family: monospace;">oMySQL:= TMySQLServer<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;">"localhost"</span>, <span style="color: #ff0000;">"root"</span>, <span style="color: #ff0000;">""</span>, <span style="color: #000000;">3306</span> <span style="color: #000000;">&#41;</span><br /><br /><br /><span style="color: #00C800;">If</span> oMySQL:<span style="color: #000000;">NetErr</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   MsgMySQLError<span style="color: #000000;">&#40;</span> oMySQL, <span style="color: #ff0000;">"Error conectando con el servidor "</span> + <span style="color: #ff0000;">"localhost"</span> + <span style="color: #ff0000;">"!"</span> <span style="color: #000000;">&#41;</span><br />   oMySQL:<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> .F.<br /><span style="color: #00C800;">EndIf</span><br /><br />oDBase := oMySQL:<span style="color: #000000;">SelectDB</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"gomadb"</span> <span style="color: #000000;">&#41;</span></div>[/code:wbzh0zib] Luis
tdolphin
Luis lo que se me ocurre es que existe una disparidad entre la dll que usas y la libreria de exportacion (libmysql) te dejo un link para que descarges el ejemplo de manera que lo puedas construir tu mismo [url:285c4w9f]http&#58;//sitasoft&#46;net/fivewin/samples/testfw2&#46;zip[/url:285c4w9f] contenido del zip buildh.bat //batch que te permitira construir el ejemplo, editalo para modificar los path de fw, harbour y borland, buildh testfw2 libmysql.dll //dll de mysql connect.ini //archivo ini de conexiion dolphin.lib // libreria de dolphin construida para borland con harbour 3.2 libmysql.lib // libreria de exportacion de mysql connto.prg // funciones de conexion testfw2.prg // archivo ejemplo
tdolphin
Compilé tu ejemplo y funciona bien, mañana voy a probar con mi ejemplo a ver que pasa. Daniel muchas gracias por tu atención, te comentaré el resultado Luis
tdolphin
Daniel con las librerías que enviaste funcionó perfecto, las librerías que utilizaba de libmysql lib y dll, son las que utilizó para tmysql, y la lib de dolphin la construí bajando desde el cvs de dolphin, y la compilé con harbour 3.2. Nuevamente Gracias por tu inquietud de resolverme el problema Luis
tdolphin + INNER JOIN 2 BD
eh possivel FAZER um INNER JOIN ENTRE DOIS BANCOS DIFERENTES USANDO A TDOLPHIN EXEMPLO BD1 - TABELA1 BD2 - TABELA 2 [code=fw:2klrviaq]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #0000ff;">SELECT</span> T1.produto,T1.descricao,T2.ESTOQLO <span style="color: #0000ff;">from</span> dig_gr01.slbdprod as T1 INNER <span style="color: #0000ff;">JOIN</span> dig_lj01.slbdploj as t2 <span style="color: #0000ff;">on</span> t1.produto = t2.produto <br /> </div>[/code:2klrviaq]
tdolphin + INNER JOIN 2 BD
oServer:Query("SELECT T1.produto,T1.descricao,T2.ESTOQLO from dig_gr01.slbdprod as T1 INNER JOIN dig_lj01.slbdploj as t2 on t1.produto = t2.produto")
tdolphin + INNER JOIN 2 BD
Si lo puedes hacer, no hay problema con la cantidad de jions. Slds
tdolphin com FWH 11.12+BCC5.82+XHB1.2.1 9411
I'm trying to compile some examples of tdolphin and I can not simply downloaded by the link <!-- m --><a class="postlink" href="http://www.sitasoft.net/tdolphin">http://www.sitasoft.net/tdolphin</a><!-- m --> tortoise, compiling buildx.bat using the executable to function, so using 64-bit Windows 7, tested on windows xp just runs and you see nothing, it is not executed. already begotten implib lib with the LIBMYSQL.LIB compiled again and not run if they can give me a help, post the updated lib or links to download to work properly. I appreciate it. as already tried everything and can not compile. I could in previous versions of good, the gora or rotate with the executable version of the current five, and bcc xHarbour 5.82. sorry my bad inglish, i'am use google
tdolphin com FWH 11.12+BCC5.82+XHB1.2.1 9411
Hello all you need is inside svn <!-- m --><a class="postlink" href="http://www.sitasoft.net/tdolphin">http://www.sitasoft.net/tdolphin</a><!-- m -->, ( DLL, LIB and samples ) read this post in blog [url:3psndw09]http&#58;//tdolphin&#46;blogspot&#46;com/2010/11/construir-lib-ejemplos-build-lib&#46;html[/url:3psndw09] and this [url:3psndw09]http&#58;//forums&#46;fivetechsupport&#46;com/viewtopic&#46;php?p=125144#p125144[/url:3psndw09]
tdolphin com FWH 11.12+BCC5.82+XHB1.2.1 9411
I use mysql 5.5 windows 7 ultimate x64, I tried taking the dlls for the next 64 tdolphin, and application error failed to initialize properly. I use the omf libs folder, because if I generate the sources from svn down, not working. and previously tested in 32-bit is not going. xHarbour using five current and current.
tdolphin de fivewin
Saludos una consulta a los usuarios de tdolphin de fivewin. 1.- existe alguna diferencia entre el uso con la lib de Daniel Garcia las funciones son las mismas ? 2.- Se puede realizar un refresh de solo un registro en una consulta, la lib te uso solo tiene oQry:Refresh() que realiza una recarga de toda la consulta, se que se hiso un cambio para pero que solo esta disponible harbour. con la lib de fivewin existe la posibilidad de hacer un refresh de un solo registro ? un refreshrow muy agredecido por sus repuestas.
tdolphin de fivewin
Hola Carlos. 1) no mucha, lo que si encontramos un problema en el xbrowse, que grababa el query en cada movimiento que hace el browse, lo podes solucionar redefiniendo metodos del xbrowse, pero es medio engorroso. 2) nunca lo use de esa forma, creeria q levanta toda la consulta de nuevo. Saludos.
tdolphin de fivewin
Gracias por tu respuesta, Saludos
tdolphin de fivewin
If one field in one row is modified and saved, TDolphin. Saves the changes to one record and reads all records of the entire query. If the query has 10000 records. Dolphin reads all 10000 records again. Fivewin LIB and ADO. Saves changes to one record and reads and refreshes that one record only. Very fast.
tdolphin de fivewin
Muchas Gracias por el dato voy a buscar de hacer las prueba para la migración, algun ejemplo del uso o donde puedo consultar . Gracias
tdolphin de fivewin
fwh\samples\maria??.prg
tdolphin de fivewin
Ariel. [quote:1px6jfjw]1) no mucha, lo que si encontramos un problema en el xbrowse, que grababa el query en cada movimiento que hace el browse, lo podes solucionar redefiniendo metodos del xbrowse, pero es medio engorroso.[/quote:1px6jfjw] Por favor, puedes mostrar el codigo que hay que cambiar ?
tdolphin de fivewin
Not correct. XBrowse does not requery with each movement. It is dolphin that requeries the entire table whenever a change is made. Not xbrowse.
tdolphin embebido update e insert?
Hola. Si hago un update o insert desde un solo prg que no sea una clase, todo funciona, ahora cuando hago la conexion en una clase y trato de utilizar un update o insert desde otra clase no me funciona. antes de hacer el update y el insert miro si el objeto oConexion es del tipo TCONEXION y si lo es. que puede estar pasando? gracias.
tdolphin embebido update e insert?
HOLA Lo mejor es que expongas un ejemplo (que podamos construir) de lo que te sucede...
tdolphin tiene manual? quiero aprender a usarlo
Hola <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> Quiero empezar a pasar un programita que usa DBF a que use MYSQL pero no se nada del tema <!-- s:oops: --><img src="{SMILIES_PATH}/icon_redface.gif" alt=":oops:" title="Embarassed" /><!-- s:oops: --> donde puedo encontrar ejemplos y manuales de tdolphin para poder aplicarlo <!-- s:roll: --><img src="{SMILIES_PATH}/icon_rolleyes.gif" alt=":roll:" title="Rolling Eyes" /><!-- s:roll: --> Gracias <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> Saluditos <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: -->
tdolphin tiene manual? quiero aprender a usarlo
Esta es la pagina de Daniel, el autor de TDolphin, que es parte de estos foros. [url:3nle7s1b]http&#58;//tdolphin&#46;blogspot&#46;com&#46;ar/2010_06_01_archive&#46;html[/url:3nle7s1b] Ahí encontrarás muchisima información, y sobre todo el paso a paso para instalarlo. Espero te sirva.
tdolphin tiene manual? quiero aprender a usarlo
Aca esta sun samples completo....lo que debes es por empezar a saber un poco de mysql, luego tdolphin sera super facil, saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: --> <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=6&t=23218&start=0&hilit=ejemplo+tdolphin">viewtopic.php?f=6&t=23218&start=0&hilit=ejemplo+tdolphin</a><!-- l -->
tdolphin tiene manual? quiero aprender a usarlo
Gracias que lindos ya me puse hacer la tarea pero aun no entiendo prácticamente nada <!-- s:? --><img src="{SMILIES_PATH}/icon_confused.gif" alt=":?" title="Confused" /><!-- s:? --> es como iniciar de cero <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: --> Saluditos <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: -->
tdolphin ver estructura de una tala
Como están. Quiero ver la estructura de una tabla con la clase tdolphin. Como seria el código fuente en fivewin. Gracias
tdolphin ver estructura de una tala
Ernesto : aTabla:= oServer:TableStructure("NombredelaTabla") xbrowse( aTabla ) Espero te sirva. Salu2, Ariel.
tdolphin y el metodo loadquery()
Consulta: Tengo: [code=fw:thyz0ofw]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#define</span> DATOS;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"SELECT * FROM tbclientes where tbclientes.id = "</span> + clipvalue2sql<span style="color: #000000;">&#40;</span> nId <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #0000ff;">DEFINE</span> QUERY oQry &nbsp;DATOS<br /><br />...</div>[/code:thyz0ofw] y cuando cambio el valor de "nId" necesito recargar el oQry, y lo que hice fue : [code=fw:thyz0ofw]<div class="fw" id="{CB}" style="font-family: monospace;">oQry:<span style="color: #000000;">loadquery</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span></div>[/code:thyz0ofw] pero... al ver el valor que tiene oQry:cQuery el nID no cambió. Mi pregunta: tengo que volver a ejecutar: [code=fw:thyz0ofw]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #0000ff;">DEFINE</span> QUERY oQry &nbsp;DATOS</div>[/code:thyz0ofw] para que me tome el nuevo nId? gracias
tdolphin y el metodo loadquery()
hasta donde recuerdo #define se utiliza para declarar CONSTANTES (valores que no cambian). no creo que #define DATOS .... sea la opcion mas idonea para lo que intentas realizar. deberias utilizar variables de tipo privadas. salu2 carlos vargas
tdolphin y el metodo loadquery()
en mi caso los declaro en un .ch y funcionan de diez. excepto esto que me pasa ahora ocn la tdolphin y el xbrowse.
tdolphin y el metodo loadquery()
LoadQuery no te sirve para tu propósito, puesto que ejecuta la consulta con el string que se evaluó en la sentencia inicial y queda grabado en el data de la clase( ::cQuery), no tiene en cuenta los cambios futuros en tu variable. Puedes probar con el método SetWhere que permite mantener el select e indicarle una nueva clausula where. [code=fw:2irrviyj]<div class="fw" id="{CB}" style="font-family: monospace;"><br />nId:=<span style="color: #000000;">10</span><br />oQry:<span style="color: #000000;">SetWhere</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"tbclientes.id = "</span> + clipvalue2sql<span style="color: #000000;">&#40;</span> nId <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /> </div>[/code:2irrviyj]
tdolphin y el metodo loadquery()
[quote="Biel EA6DD":nx873lgv]LoadQuery no te sirve para tu propósito, puesto que ejecuta la consulta con el string que se evaluó en la sentencia inicial y queda grabado en el data de la clase( ::cQuery), no tiene en cuenta los cambios futuros en tu variable. Puedes probar con el método SetWhere que permite mantener el select e indicarle una nueva clausula where. [code=fw:nx873lgv]<div class="fw" id="{CB}" style="font-family: monospace;"><br />nId:=<span style="color: #000000;">10</span><br />oQry:<span style="color: #000000;">SetWhere</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"tbclientes.id = "</span> + clipvalue2sql<span style="color: #000000;">&#40;</span> nId <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /> </div>[/code:nx873lgv][/quote:nx873lgv] a Ok. y luego si ejecuto el LoadQuery?
tdolphin y el metodo loadquery()
[quote="goosfancito":2qufxid6] a Ok. y luego si ejecuto el LoadQuery?[/quote:2qufxid6] No debiera hacer falta, puesto que por defecto SetWhere refresca el Query.
tdolphin y ping...
Hola. He visto en el manual del mysql y php que haciendo [quote:3tdme27o]$oCnx->ping()[/quote:3tdme27o] se puede verificar si la conexion esta activa/funciona. Con tdolphin como lo hago? gracias.
tdolphin y ping...
goosfancito Contrario a lo recomendado, pero por comodidad a los desarrolladores, ya tdolphin hace el llamado a ping, con cada llamada a ejecucion de una consulta. (ex: oServer:Query( "SELECT * FROM MYTABLE" ) ) ya en el codigo c de la funcion que hace la consulta, se hace una llamada antes a la funcion ping, por lo que en teoria no es necesario que lo hagas. [code=fw:3k32j6z5]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> MYSQLPING <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">//Zero if the connection to the server is alive. Nonzero if an error occurred</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp;int iPing = <span style="color: #000000;">1</span>;<br />&nbsp; &nbsp;MYSQL * hMySQL = <span style="color: #000000;">&#40;</span>MYSQL *<span style="color: #000000;">&#41;</span> hb_MYSQL_par<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> hMySQL <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp; iPing = mysql_ping<span style="color: #000000;">&#40;</span> hMySQL <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;<span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp;<span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp; hb_errRT_BASE<span style="color: #000000;">&#40;</span> EG_ARG, <span style="color: #000000;">2020</span>, <span style="color: #00C800;">NULL</span>, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS <span style="color: #000000;">&#41;</span>; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;hb_retni<span style="color: #000000;">&#40;</span> iPing <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> MYSQLQUERY <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />   MYSQL * hMySQL = <span style="color: #000000;">&#40;</span>MYSQL *<span style="color: #000000;">&#41;</span> hb_MYSQL_par<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />   <br />   <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> hMySQL <span style="color: #000000;">&#41;</span><br />   <span style="color: #000000;">&#123;</span><br />      <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> mysql_ping<span style="color: #000000;">&#40;</span> hMySQL <span style="color: #000000;">&#41;</span> == <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />      <span style="color: #000000;">&#123;</span><br />         hb_retnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> long <span style="color: #000000;">&#41;</span> mysql_real_query<span style="color: #000000;">&#40;</span> hMySQL,<br />                   <span style="color: #000000;">&#40;</span> const char *  <span style="color: #000000;">&#41;</span> hb_parc<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>,<br />                   <span style="color: #000000;">&#40;</span> unsigned long <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> ;<br />      <span style="color: #000000;">&#125;</span><br />      <span style="color: #00C800;">else</span><br />      <span style="color: #000000;">&#123;</span><br />         hb_errRT_BASE<span style="color: #000000;">&#40;</span> EG_ARG, <span style="color: #000000;">2020</span>, <span style="color: #00C800;">NULL</span>, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS <span style="color: #000000;">&#41;</span>; <br />      <span style="color: #000000;">&#125;</span><br />   <span style="color: #000000;">&#125;</span><br />   <span style="color: #00C800;">else</span><br />   <span style="color: #000000;">&#123;</span><br />      hb_errRT_BASE<span style="color: #000000;">&#40;</span> EG_ARG, <span style="color: #000000;">2020</span>, <span style="color: #00C800;">NULL</span>, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS <span style="color: #000000;">&#41;</span>;<br />   <span style="color: #000000;">&#125;</span>     <br /><span style="color: #000000;">&#125;</span><br /> </div>[/code:3k32j6z5] ahora si tu lo desea hacer, pues con hacer oServer:Ping(), listo. [code=fw:3k32j6z5]<div class="fw" id="{CB}" style="font-family: monospace;"><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> Ping<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">INLINE</span> IIf<span style="color: #000000;">&#40;</span> MySqlPing<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hMySQL</span> <span style="color: #000000;">&#41;</span> > <span style="color: #000000;">0</span>, <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">CheckError</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, <span style="color: #00C800;">FALSE</span> <span style="color: #000000;">&#41;</span>, <span style="color: #00C800;">TRUE</span> <span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:3k32j6z5] debes tomar en cuenta que si la conexion no esta ok, el tiempo de espera de la llamada a ping esta basado en el timeout configurado, que para el caso de algunos hosting es unos 20 segundo. lo cual es desesperante. :-/
tdolphin y ping...
habia visto eso del oserver:ping y lo prove, pero en mi caso esa llamada hace que la aplicacion se quiebre, he leido en el foro que varios comentaron lo mismo, o sea que el ping no seria lo que yo estoy neecsitando. paso a comentar que me sucede, En el trabajo la conexion al mysql es pr medio de red interna, la aplicacion hace INSERT y UPDATE en una DB, pero hay veces que se corta la conexion y al momento de hacer la operacion de INSERT o UPDATE se produce un error del programa, mi idea era antes de hacer el INSERT o UPDATE chequear que la conexion este OK. de no estarlo no haria la operacion. pues puse [code=fw:rxjzhdsz]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">if</span> ::<span style="color: #000000;">oCnx</span>:<span style="color: #000000;">ping</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />,,,,,</div>[/code:rxjzhdsz] y ahi queda un buen rato y en menos de 10 segundos el windows dice APLICACION INESTABLE y la corta. o sea, que jamas vuelve del ping.
tdolphin y ping...
<!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=6&t=28737&p=161222&hilit=tdolphin+lost#p161222">viewtopic.php?f=6&t=28737&p=161222&hilit=tdolphin+lost#p161222</a><!-- l -->
tdolphin y ping...
haber, goosfancito, reemplaza esta funcion en function.c en tdolphin, y recompila la libreria. otro asunto, yo para que me funcionara el cambio en el tiemout en caso de perdida de conexion he tenido que usar otra libmysql.dll (la he sacado de mariadb), ya que la original nunca me reconocio el cambio a 10 segundo, pero ya con la dll de mariadb me ha funcionadp bien, por favor nos comentas como te fue para que asi sepamos si te funciono o no. a mi ya me realiza la reconexion, luego de perdidas de conexion. salu2 carlos vargas [code=fw:y6f1nxd8]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> MYSQLCONNECT <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// -> MYSQL*</span><br /><span style="color: #000000;">&#123;</span><br />   MYSQL * mysql;<br />   unsigned int port  = ISNUM<span style="color: #000000;">&#40;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span> ? <span style="color: #000000;">&#40;</span> unsigned int <span style="color: #000000;">&#41;</span> hb_parni<span style="color: #000000;">&#40;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span> :  MYSQL_PORT;<br />   unsigned int flags = ISNUM<span style="color: #000000;">&#40;</span> <span style="color: #000000;">5</span> <span style="color: #000000;">&#41;</span> ? <span style="color: #000000;">&#40;</span> unsigned int <span style="color: #000000;">&#41;</span> hb_parni<span style="color: #000000;">&#40;</span> <span style="color: #000000;">5</span> <span style="color: #000000;">&#41;</span> :  <span style="color: #000000;">0</span>;<br />   PHB_ITEM pcbDecrypt = hb_param<span style="color: #000000;">&#40;</span> <span style="color: #000000;">7</span>, HB_IT_BLOCK <span style="color: #000000;">&#41;</span>;  <br />   unsigned int * iTimeOut= <span style="color: #000000;">10</span>;<br />   BOOL bReconnect = <span style="color: #00C800;">TRUE</span>;<br />    <br />   mysql = mysql_init<span style="color: #000000;">&#40;</span> <span style="color: #00C800;">NULL</span> <span style="color: #000000;">&#41;</span>;<br />   <br />   <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> mysql != <span style="color: #00C800;">NULL</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #000000;">&#123;</span><br />      mysql_options<span style="color: #000000;">&#40;</span> mysql, MYSQL_OPT_RECONNECT      , &bReconnect <span style="color: #000000;">&#41;</span>;<br />      mysql_options<span style="color: #000000;">&#40;</span> mysql, MYSQL_OPT_CONNECT_TIMEOUT, &iTimeOut   <span style="color: #000000;">&#41;</span>;<br />      <br />      mysql_real_connect<span style="color: #000000;">&#40;</span> mysql, <br />                          hb_itemGetC<span style="color: #000000;">&#40;</span> hb_vmEvalBlockV<span style="color: #000000;">&#40;</span> pcbDecrypt, <span style="color: #000000;">1</span>, hb_param<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span>, HB_IT_ANY <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, <br />                          hb_itemGetC<span style="color: #000000;">&#40;</span> hb_vmEvalBlockV<span style="color: #000000;">&#40;</span> pcbDecrypt, <span style="color: #000000;">1</span>, hb_param<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span>, HB_IT_ANY <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, <br />                          hb_itemGetC<span style="color: #000000;">&#40;</span> hb_vmEvalBlockV<span style="color: #000000;">&#40;</span> pcbDecrypt, <span style="color: #000000;">1</span>, hb_param<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span>, HB_IT_ANY <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, <br />                          hb_itemGetC<span style="color: #000000;">&#40;</span> hb_vmEvalBlockV<span style="color: #000000;">&#40;</span> pcbDecrypt, <span style="color: #000000;">1</span>, hb_param<span style="color: #000000;">&#40;</span> <span style="color: #000000;">6</span>, HB_IT_ANY <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>,<br />                          port, <span style="color: #00C800;">NULL</span>, flags <span style="color: #000000;">&#41;</span>;<br />      hb_MYSQL_ret<span style="color: #000000;">&#40;</span> mysql <span style="color: #000000;">&#41;</span>;<br />   <span style="color: #000000;">&#125;</span><br />   <span style="color: #00C800;">else</span><br />   <span style="color: #000000;">&#123;</span><br />     hb_retptr<span style="color: #000000;">&#40;</span> <span style="color: #00C800;">NULL</span> <span style="color: #000000;">&#41;</span>;<br />   <span style="color: #000000;">&#125;</span><br /><span style="color: #000000;">&#125;</span>  <br /> </div>[/code:y6f1nxd8]
tdolphin y ping...
el problema qe tengo con la ultima version de la tdolphin es que cuando se conecta muestra la ip a donde se conecta, ya busque en los fuentes y la verdad que me perdi, no se donde ponen ni un ? ni un msginfo pero aparece en la pantalla el IP, por eso deje de usar los fuentes y volvi a una version vieja, que en esa version tengo problemas cuando paso un campo (por ejemplo) string y el campo destino es un INT, no hace la conversion. pero bueno. sos "parches" en mi misma app. gracias.
tdolphin y ping...
Carlos, Referente: libmysql.dll (la he sacado de mariadb) pode me enviar uma cópia da LIBMYSQL.DLL(mariadb)? obrigado
tdolphin y ping...
[url:1hi8ifwr]http&#58;//castillolawyers&#46;no-ip&#46;info/owncloud/index&#46;php/s/mTPRDXoP9d3Qt7w[/url:1hi8ifwr]
tdolphin y ping...
Carlos, como lo hace en PRG para probar la conexión a perder y realizar la reconexión? Gracias
tdolphin y ping...
eso lo hace solo, cuando tdolphin intenta ejecutar un query, y si la conexion esta caida, esta intenta reconectarse. ahi nosotros no hacemos nada. eso siempre y cuando reempalzemos la funcion c que expuse anteriormente en los funetes de tdolphin y recompilemos la libreria. salu2 carlos vargas
tdolphin y ping...
Carlos, gracias!
tdolphin y ping...
Estimados, solo preguntarles si implementaron el cambio, y si es asi, como les fue. vamos, un poco de feedback. <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> salu2 carlos vargas
tdolphin y ping...
Carlos, com a versão nova da TDOLPHIN, estou enfrentando problemas com CAMPOS NULL. Como você conseguiu resolver? gracias,
tdolphin y ssl
Colegas, estoy empezando con tdolphin porque necesitaría conectarme mediante ssl, Alguien tiene documentación de como hacerlo? Desde ya muchísimas gracias. Saludos
tdolphin y ssl
+1