topic
stringlengths 1
63
| text
stringlengths 1
577k
⌀ |
---|---|
problem with SQL INSERT [solved] | Hi,
With MSSQL i do this :
csql:="INSERT INTO "+(cTabla)+ " (PATID,LASTNAME) VALUES ("
cSql:=cSql+" 'C01', 'CONCEPTO PARA PRUEBAS'+" )"
TRY
oCon:Execute(cSql)
CATCH oErr
ShowAdoEr( oCon,csql )
END TRY
Hope it will help !
Philippe |
problem with SQL INSERT [solved] | Thank you.
The advantage of such command is that it handles the sintax for every Database. So the same code will work under MSSQL, MySQL, Oracle... |
problem with SQL INSERT [solved] | Maybe this could be:
[code=fw:2uks5p29]<div class="fw" id="{CB}" style="font-family: monospace;">#xtranslate ADO_SQL <span style="color: #0000ff;">UPDATE</span> <span style="color: #000000;">[</span>TABLE <tbl> <span style="color: #000000;">]</span> SET <span style="color: #000000;">[</span> <col1> = <val1> <span style="color: #000000;">[</span>,<colN> = <valN> <span style="color: #000000;">]</span> <span style="color: #000000;">]</span> <span style="color: #000000;">[</span> <span style="color: #0000ff;">WHERE</span> <*cwhere*> <span style="color: #000000;">]</span> => ;<br /> <span style="color: #ff0000;">"UPDATE "</span> + <tbl> + <span style="color: #ff0000;">" SET "</span> + ;<br /> FW_ArrayAsList<span style="color: #000000;">(</span> \<span style="color: #000000;">{</span> FW_QuotedColSQL<span style="color: #000000;">(</span> <<span style="color: #ff0000;">"col1"</span>> <span style="color: #000000;">)</span> + <span style="color: #ff0000;">" = "</span> + FW_ValToSQL<span style="color: #000000;">(</span> <val1> <span style="color: #000000;">)</span> ;<br /> <span style="color: #000000;">[</span>, FW_QuotedColSQL<span style="color: #000000;">(</span> <<span style="color: #ff0000;">"colN"</span>> <span style="color: #000000;">)</span> + <span style="color: #ff0000;">" = "</span> + FW_ValToSQL<span style="color: #000000;">(</span> <valN> <span style="color: #000000;">)</span> <span style="color: #000000;">]</span> \<span style="color: #000000;">}</span> <span style="color: #000000;">)</span> <span style="color: #000000;">[</span> + <span style="color: #ff0000;">" WHERE "</span> + CharRepl<span style="color: #000000;">(</span> <span style="color: #ff0000;">'"'</span>, <<span style="color: #ff0000;">"cwhere"</span>>, <span style="color: #ff0000;">"'"</span>, .t. <span style="color: #000000;">)</span> <span style="color: #000000;">]</span></div>[/code:2uks5p29] |
problem with SQL INSERT [solved] | [quote="MOISES":t7ydxwe3]Sorry, not working.[/quote:t7ydxwe3]
[code=fw:t7ydxwe3]<div class="fw" id="{CB}" style="font-family: monospace;"> <span style="color: #00C800;">local</span> cSql<br /> <span style="color: #00C800;">local</span> cName := <span style="color: #ff0000;">"John"</span><br /> <span style="color: #00C800;">local</span> cCity := <span style="color: #ff0000;">"New York"</span><br /> <span style="color: #00C800;">local</span> dHireDate:= Date<span style="color: #000000;">(</span><span style="color: #000000;">)</span> - <span style="color: #000000;">1200</span><br /> <span style="color: #00C800;">local</span> nSalary := <span style="color: #000000;">123023.75</span><br /><br /> <span style="color: #00C800;">PRIVATE</span> cTable := <span style="color: #ff0000;">"customer"</span><br /><br /> cSql := SQL INSERT INTO &cTable <span style="color: #000000;">(</span> FIRST, CITY, HIREDATE, SALARY <span style="color: #000000;">)</span> VALUES <span style="color: #000000;">(</span> cName, cCity, dHireDate, nSalary <span style="color: #000000;">)</span><br /> ? cSql<br /> </div>[/code:t7ydxwe3]
[url=https://imageshack.com/i/pmhBb3LIp:t7ydxwe3][img:t7ydxwe3]https://imagizer.imageshack.com/v2/xq90/922/hBb3LI.png[/img:t7ydxwe3][/url:t7ydxwe3]
INSERTING MULTIPLE ROWS:
[code=fw:t7ydxwe3]<div class="fw" id="{CB}" style="font-family: monospace;"> <span style="color: #00C800;">local</span> cSql<br /> <span style="color: #00C800;">local</span> aData := ;<br /> <span style="color: #000000;">{</span> <span style="color: #000000;">{</span> <span style="color: #ff0000;">"John"</span>, <span style="color: #ff0000;">"New York"</span>, Date<span style="color: #000000;">(</span><span style="color: #000000;">)</span> - <span style="color: #000000;">1200</span>, <span style="color: #000000;">23465.55</span> <span style="color: #000000;">}</span> ;<br /> , <span style="color: #000000;">{</span> <span style="color: #ff0000;">"Jimmy"</span>, <span style="color: #ff0000;">"Sydney"</span>, Date<span style="color: #000000;">(</span><span style="color: #000000;">)</span> - <span style="color: #000000;">2000</span>, <span style="color: #000000;">32000.00</span> <span style="color: #000000;">}</span> ;<br /> , <span style="color: #000000;">{</span> <span style="color: #ff0000;">"David"</span>, <span style="color: #ff0000;">"Manila"</span>, Date<span style="color: #000000;">(</span><span style="color: #000000;">)</span> - <span style="color: #000000;">4000</span>, <span style="color: #000000;">54234.76</span> <span style="color: #000000;">}</span> ;<br /> <span style="color: #000000;">}</span><br /><br /> <span style="color: #00C800;">PRIVATE</span> cTable := <span style="color: #ff0000;">"customer"</span><br /><br /> cSql := SQL INSERT INTO &cTable <span style="color: #000000;">(</span> FIRST, CITY, HIREDATE, SALARY <span style="color: #000000;">)</span> ARRAY aData<br /> ? cSql<br /> </div>[/code:t7ydxwe3]
[url=https://imageshack.com/i/poxi0H1Cp:t7ydxwe3][img:t7ydxwe3]https://imagizer.imageshack.com/v2/xq90/924/xi0H1C.png[/img:t7ydxwe3][/url:t7ydxwe3] |
problem with SQL INSERT [solved] | Hi,
Hope you are doing well.
There is a typo on calling TABLE. I fixed as follows:
#xtranslate SQL INSERT INTO [TABLE <tbl> ] ( <cols,...> ) ARRAY <a> => ;
"INSERT INTO " + <tbl> + " ( " + FW_QuotedColSQL( #<cols> ) + " ) " + " VALUES " + ;
StrTran( StrTran( FW_ValToSql( AClone( <a> ) ), '( (', '(' ), ') )', ')' )
It now works with local variables. |
problem with SQL INSERT [solved] | But we can not change because that breaks the existing code many users are already using. |
problem with SQL INSERT [solved] | Thank you.
I will create my own function with regular INSERT.
How can I transform all the data in an array into VALUES with FW_ValToSQL? |
problem with SQL INSERT [solved] | Please study the existing translates in the fwsqlcmd.ch |
problem with SQL INSERT [solved] | Thank you. I used FW_AdoApplyParams.
I would like to take this opportunity to thank you for the enormous usefulness of the ADO functions you have created, which make our work much easier. Congratulations once again. |
problem with Scrollbar style - Resolved - | When I move the mouse on scroll I have a strange effect different with xbrowse scroll bars see the video
[img:3h3h4475]https://i.postimg.cc/j5CKk3fD/scroll.gif[/img:3h3h4475]
I Try also with
[code=fw:3h3h4475]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">center</span> ;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">(</span> lAnd<span style="color: #000000;">(</span> GetWindowLong<span style="color: #000000;">(</span> oDlg:<span style="color: #000000;">hWnd</span>, GWL_STYLE <span style="color: #000000;">)</span>, WS_HSCROLL <span style="color: #000000;">)</span></div>[/code:3h3h4475]
as I saw on xbrowse class but it make the same
I think it happen with Resources and Windowxp theme |
problem with Scrollbar style - Resolved - | Dear Silvio,
Whats the problem with those scrollbars ?
They look fine |
problem with Scrollbar style - Resolved - | por que no usar un control trackbar?
[img:2gnwjzj6]https://i.imgur.com/wiXpiTI.png[/img:2gnwjzj6] |
problem with Scrollbar style - Resolved - | [quote="carlos vargas":1ioundv1]por que no usar un control trackbar?
[img:1ioundv1]https://i.imgur.com/wiXpiTI.png[/img:1ioundv1][/quote:1ioundv1]
can be an idea |
problem with Scrollbar style - Resolved - | [quote="Antonio Linares":270i8vve]Dear Silvio,
Whats the problem with those scrollbars ?
They look fine[/quote:270i8vve]
when i move the mouse into they blinking but only with xp look res |
problem with Scrollbar style - Resolved - | Perhaps I found the problem
sorry my mistake I used Windows10.Manifest
this evening I return back on windowsxp.manifest and it run ok
probable Windows10.Manifest not run ok with scrollbars |
problem with XBROWSE with SELECT clause | I should list a few record via XBROWSE.I saw the clause SELECT, but it doesn't work rightly and i don't understand why. This is my code:[code:11vj9pno]local oBRW,oDLG
use clienti
index on importo to custntx
DEFINE DIALOG oDLG RESOURCE "PROVA"
redefine XBROWSE oBRW ID 101 of oDLG FIELDS clienti->ragsoc,clienti->importo ;
SELECT IMPORTO FOR 1000 TO 1000 ;
FIELDSIZES 150,150 ;
HEADERS "RAGIONE SOCIALE","IMPORTO"
ACTIVATE DIALOG oDLG CENTERED [/code:11vj9pno]
In this way, the xbrowse works with all record without filtering the records with importo=1000 as i want.
I did not found examples in \fwh\samles: someone can help me?
Thank you.
FWH 8.04 - XHARBOUR 1.1.0[code:11vj9pno][/code:11vj9pno] |
problem with XBROWSE with SELECT clause | Why don't you just use scopes? If you don't know how, let me know.Regards,James |
problem with XBROWSE with SELECT clause | James,how can i use scopes?I don't know how.Can you write me an example?Thank you.Max |
problem with XBROWSE with SELECT clause | Using ScopesThe database must be indexed on the field to be scoped.Then to set the top scope:(cAlias)->( ordScope( 0, uTopScope) )To set the bottom scope:(cAlias)->( ordScope( 1, uBottomScope) )Then you should do a go top:(cAlias)->(dbgotop())You can use the same value for both the top and bottom scope.This works with both NTX and CDX indexes.James |
problem with XBROWSE with SELECT clause | Thank you James, all cleared!Max |
problem with a calculation | on my application the total is 58.29
but if I make the calc the total is 58.28
why it los a 0,01 ?
nTotDoc:= 63.65
nTotRitenute:= 5.37
nTotDovuto := nTotDoc-nTotRitenute
[b:2gf9qx3h]how I can make to have the same result ?[/b:2gf9qx3h]
[b:2gf9qx3h]my app[/b:2gf9qx3h]
[img:2gf9qx3h]https://s7.postimg.org/clctc1z17/mio.jpg[/img:2gf9qx3h]
[b:2gf9qx3h]another app ( not mine) [/b:2gf9qx3h]
[img:2gf9qx3h]https://s7.postimg.org/6kf4f0uff/nomine.jpg[/img:2gf9qx3h] |
problem with a calculation | When you calculate Rit. d'acconto, round of the result to 2 decimal places.
Eg Rit... := Round( <calculation>, 2 ) |
problem with a calculation | [code=fw:29xwfch8]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#Include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br />#xtranslate <span style="color: #0000ff;">round</span><span style="color: #000000;">(</span><nVal>,<nDec><span style="color: #000000;">)</span> => val<span style="color: #000000;">(</span>str<span style="color: #000000;">(</span><nVal>,<span style="color: #000000;">20</span>,<nDec><span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">FUNCTION</span> Test_Round<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <br /> <span style="color: #00C800;">LOCAL</span> nRound, nTotDoc, nTotDacc, nTotDov<br /> <br /> nRound := <span style="color: #000000;">0.00</span><br /><br /> nTotDoc := <span style="color: #000000;">63.65</span><br /><br /> nTotDacc := <span style="color: #000000;">5.37</span><br /><br /> nTotDov := <span style="color: #000000;">(</span> nTotDoc <span style="color: #000000;">)</span> - <span style="color: #000000;">(</span> nTotDacc <span style="color: #000000;">)</span><br /><br /> nRound := <span style="color: #0000ff;">Round</span><span style="color: #000000;">(</span> Val<span style="color: #000000;">(</span> StrZero<span style="color: #000000;">(</span> nTotDov, <span style="color: #000000;">12</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span>, <span style="color: #000000;">4</span> <span style="color: #000000;">)</span><br /> <br /> ? <span style="color: #0000ff;">ROUND</span><span style="color: #000000;">(</span> nRound, <span style="color: #000000;">2</span> <span style="color: #000000;">)</span> <span style="color: #B900B9;">// 58.28</span><br /> <br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /> </div>[/code:29xwfch8] |
problem with a calculation | [quote="karinha":386f2swt][code=fw:386f2swt]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#Include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br />#xtranslate <span style="color: #0000ff;">round</span><span style="color: #000000;">(</span><nVal>,<nDec><span style="color: #000000;">)</span> => val<span style="color: #000000;">(</span>str<span style="color: #000000;">(</span><nVal>,<span style="color: #000000;">20</span>,<nDec><span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">FUNCTION</span> Test_Round<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <br /> <span style="color: #00C800;">LOCAL</span> nRound, nTotDoc, nTotDacc, nTotDov<br /> <br /> nRound := <span style="color: #000000;">0.00</span><br /><br /> nTotDoc := <span style="color: #000000;">63.65</span><br /><br /> nTotDacc := <span style="color: #000000;">5.37</span><br /><br /> nTotDov := <span style="color: #000000;">(</span> nTotDoc <span style="color: #000000;">)</span> - <span style="color: #000000;">(</span> nTotDacc <span style="color: #000000;">)</span><br /><br /> nRound := <span style="color: #0000ff;">Round</span><span style="color: #000000;">(</span> Val<span style="color: #000000;">(</span> StrZero<span style="color: #000000;">(</span> nTotDov, <span style="color: #000000;">12</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span>, <span style="color: #000000;">4</span> <span style="color: #000000;">)</span><br /> <br /> ? <span style="color: #0000ff;">ROUND</span><span style="color: #000000;">(</span> nRound, <span style="color: #000000;">2</span> <span style="color: #000000;">)</span> <span style="color: #B900B9;">// 58.28</span><br /> <br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /> </div>[/code:386f2swt][/quote:386f2swt]
thanks but Nages send me a clear message before |
problem with a calculation | Hello Silvio,
have you seen this line:
#xtranslate round(<nVal>,<nDec>) => val(str(<nVal>,20,<nDec>)) ?
Best regards,
Otto |
problem with a calculation | No need for such translates.
Clipper, xHarbour and Harbour natively provide function ROUND( nvalue, nDecimals ) |
problem with a calculation | there is a bug on harbour
not run round function
but now I tried with
#xtranslate round(<nVal>,<nDec>) => val(str(<nVal>,20,<nDec>))
and run ok |
problem with a calculation | [quote:29ztupdc]there is a bug on harbour
not run round function
[/quote:29ztupdc]
Is it?
May I know what is the bug?
Can you give some examples? |
problem with a calculation | I wrong topic sorry |
problem with a file. RES | Hello, everyone, I'm having a problem with a file. RES, was working with Pella, and my computer slowed down, but now I can not open the file. Res of an error message.Error reading from file 'dlg.res'Invalid or unknown file format. |
problem with a file. RES | Hello Dorneles,Check, if you can open dlg.RC !!! with a normal Editor not RES !!!( RES is compiled ).RegardsUwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: --> |
problem with a file. RES | Hello ukoenig. I could not find the file dlg.RC |
problem with a file. RES | Hello Dorneles,is it possible, to open the RES - file with Resource-workshop ?If it is possible, save the file in RC-format and reload it withYour resource-editor.I allways work with RC-files. If anything is wrong,I can repair it with a normal texteditor.RegardsUwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: --> |
problem with circular bmp images in ribbonbar | I have some old programs with via-coral ribbonbar that i want to convert to fivewin ribbonbar.
i have a problem with circular bmp images: in via-coral ribbonbar appears:
[img:2veimgty]https://photos-3.dropbox.com/t/2/AADvoLBtotLI4zcn7h8fbByAQhIhcgR6Bs2nr-cuBrQV8g/12/170576012/jpeg/32x32/1/_/1/2/ribbon%20viacoral.jpg/EI_1goIBGA0gAigCKAQ/MjFLdxPENHl6jnbovVEHseaX1YxlaC07aIYRIbpT14I?size=2048x1536&size_mode=3[/img:2veimgty]
in fivewin ribbobar appears:
[img:2veimgty]https://photos-3.dropbox.com/t/2/AACkHQZE0dxG2QM9useEF2pXqBlQjShjhAnud-27y4eVkg/12/170576012/jpeg/32x32/1/_/1/2/ribbon%20fivewin.jpg/EI_1goIBGAwgAigCKAQ/t9O61JyPv18-Eq3DA-RAZaGEIvc6qtgoM5Igr3KnesE?size=2048x1536&size_mode=3[/img:2veimgty]
is there a way to correct the contour black pixels effect?
thanls in advance,
marzio |
problem with circular bmp images in ribbonbar | I have some old programs with via-coral ribbonbar that i want to convert to fivewin ribbonbar.
i have a problem with circular bmp images: in via-coral ribbonbar appears:
[img:fivftxwv]http://www.valli-italy.net/download/marzio/ribbon_viacoral.jpg[/img:fivftxwv]
in fivewin ribbobar appears:
[img:fivftxwv]http://www.valli-italy.net/download/marzio/ribbon_fivewin.jpg[/img:fivftxwv]
is there a way to correct the contour black pixels effect?
thanls in advance,
marzio |
problem with circular bmp images in ribbonbar | We will try.
May we ask how do you find the display of the same bitmaps on buttonbar? |
problem with circular bmp images in ribbonbar | thanks for your attention.
here are seven bmp icons: <!-- m --><a class="postlink" href="http://www.valli-italy.net/download/marzio/bmp.zip">http://www.valli-italy.net/download/marzio/bmp.zip</a><!-- m -->
marzio |
problem with circular bmp images in ribbonbar | in buttonabar appears:
[img:1145u7eh]http://www.valli-italy.net/download/marzio/buttonabr.jpg[/img:1145u7eh] |
problem with circular bmp images in ribbonbar | Thanks
We are checking please. |
problem with circular bmp images in ribbonbar | if this can help you to understand the problem, i have posted another button with alfabitmap image.
(i have inserted the alfabitmap image 'downadd.jpg' in the same zip file mentioned above).
in via-coral ribbonbar:
[img:19s4ltg0]http://www.valli-italy.net/download/marzio/agg_via.jpg[/img:19s4ltg0]
in fivewin ribbonbar:
[img:19s4ltg0]http://www.valli-italy.net/download/marzio/agg_fwh.jpg[/img:19s4ltg0]
thanks for your attention
marzio |
problem with circular bmp images in ribbonbar | please send these two bitmaps also |
problem with circular bmp images in ribbonbar | Using the images in the zip I notice the same thing. If I edit the .bmp with pixelformer and save them with Premultiplied alpha checked it looks ok.
Here is original Cancella.bmp and Plus.bmp
[img:uhw6q1an]http://www.wwrowland.com/image/original.png[/img:uhw6q1an]
Here is the option selected and then the new .bmp images
[img:uhw6q1an]http://www.wwrowland.com/image/Premiltiplied.png[/img:uhw6q1an]
[img:uhw6q1an]http://www.wwrowland.com/image/new.png[/img:uhw6q1an] |
problem with circular bmp images in ribbonbar | i have inserted the new alfabitmap in the same zip, download it again.
[url:37tsif74]http://www.valli-italy.net/download/marzio/bmp.zip[/url:37tsif74]
i will try your suggestion with photoshop.
thanks, marzio |
problem with circular bmp images in ribbonbar | i have download pixelformer, in photoshop i don't see the check premultiplied, (i see only 32bit A8 R8 G8 B8)
with pixelformer now all is ok.
thanks very much,
marzio |
problem with circular bmp images in ribbonbar | Photoshop is great but it is not always the easiest on bitmaps.
Here are a couple of options I read about doing this with Photoshop
[quote:1lkjm1pe]One is to apply the alpha as transparency to a layer and use the Layer > Matting > Remove Black Matte function. Unfortunately this doesn't work when using a layer mask, the mask needs to be applied.
My preferred method would be to apply the alpha to the layer as a layer mask. Copy the alpha and paste it into a new layer above this masked layer. Clip the RGB version of the alpha to the masked layer and set its blend mode to Divide.[/quote:1lkjm1pe]
Seems more complicated and more steps so I use Pixelformer for simple stuff. I also use IconWorks and PhotoImpact. |
problem with circular bmp images in ribbonbar | many thanks for your details!
i think that for alfabitmap i will use Pixelformer.
i will try also IconWorks and PhotoImpact.
marzio |
problem with communication (RS232) | I need to do my permanent communication with the device. If in a query (WriteComm) do not get the response, I have to know. Otherwise, communication stops!
[code=fw:3i1aysvy]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00C800;">static</span> hBmpKon:= <span style="color: #000000;">{</span> <span style="color: #ff0000;">"green"</span> , <span style="color: #ff0000;">"red"</span> <span style="color: #000000;">}</span><br /><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"Ulaz"</span> <br /> <br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BTNBMP</span> oBmpRam <span style="color: #0000ff;">ID</span> <span style="color: #000000;">32</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"sRed"</span> ;<br /> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span>nComRam:=InitRam<span style="color: #000000;">(</span><span style="color: #000000;">)</span>, WriteComm<span style="color: #000000;">(</span>nComRam, <span style="color: #ff0000;">"$01"</span>+<span style="color: #ff0000;">"6"</span>+chr<span style="color: #000000;">(</span><span style="color: #000000;">13</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #B900B9;">// Start</span><br /><br /> oDlg:<span style="color: #000000;">bCommNotify</span> = <span style="color: #000000;">{</span> | nComUlz, nStatus |oCont:<span style="color: #000000;">SetBmp</span><span style="color: #000000;">(</span> hBmpKon<span style="color: #000000;">[</span> <span style="color: #000000;">1</span> <span style="color: #000000;">]</span> <span style="color: #000000;">)</span>, BytesAtPort<span style="color: #000000;">(</span> nComRam, nStatus <span style="color: #000000;">)</span>,; <br /> EnableCommNotification<span style="color: #000000;">(</span> nComRam, oDlg:<span style="color: #000000;">hWnd</span>, <span style="color: #000000;">1</span>, <span style="color: #000000;">-1</span><span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> <br /> <span style="color: #0000ff;">REDEFINE</span> BITMAP oCont <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"Red"</span>;<br /> <span style="color: #0000ff;">ADJUST</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">1022</span>;<br /> <span style="color: #0000ff;">WINDOW</span> oDlg<br /><br /> .<br /> .<br /> .<br /> .<br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <br /><br /><br /> CloseComm<span style="color: #000000;">(</span> nComUlz <span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> BytesAtPort<span style="color: #000000;">(</span> nComRam, nStatus <span style="color: #000000;">)</span><br /> <br /> <span style="color: #00C800;">local</span> cBufRam := Replicate<span style="color: #000000;">(</span>Chr<span style="color: #000000;">(</span><span style="color: #000000;">255</span><span style="color: #000000;">)</span>,<span style="color: #000000;">1024</span><span style="color: #000000;">)</span><br /><br /> <br /> ReadComm<span style="color: #000000;">(</span> nComRam, @cBufRam <span style="color: #000000;">)</span> <br /> <br /> cBufRam:=StrTran<span style="color: #000000;">(</span>cBufRam,Chr<span style="color: #000000;">(</span><span style="color: #000000;">255</span><span style="color: #000000;">)</span>,<span style="color: #ff0000;">''</span><span style="color: #000000;">)</span><br /> <br /> .<br /> .<br /> .<br /> .<br /><br /><br /> FlushComm<span style="color: #000000;">(</span>nComRam,<span style="color: #000000;">1</span><span style="color: #000000;">)</span> <br /><br /> WriteComm<span style="color: #000000;">(</span>nComRam, <span style="color: #ff0000;">"$01"</span>+<span style="color: #ff0000;">"6"</span>+chr<span style="color: #000000;">(</span><span style="color: #000000;">13</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span> <br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:3i1aysvy]
If for any reason do not get a response to the command WriteComm (nComRam, "$ 01" + "6" + chr (13)) should execute oConto: SetBmp (hBmpKon [0]). How? |
problem with communication (RS232) | Try to call SysRefresh() between these two calls:
FlushComm(nComRam,1)
SysRefresh()
WriteComm(nComRam, "$01"+"6"+chr(13)) |
problem with communication (RS232) | Thanks, but does not work .. |
problem with communication (RS232) | WriteComm() returns the amount of written bytes, so you could check it:
MsgInfo( WriteComm(nComRam, "$01"+"6"+chr(13)) )
Could you post the code for InitRam() ? |
problem with communication (RS232) | [code=fw:ps6bq0q2]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> InitRam<span style="color: #000000;">(</span>mPortRam,oBmpRam,oComUlz,nBitUlz<span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> cDcb, nError, nBytes<br /> <span style="color: #00C800;">local</span> nCommUlz := OpenComm<span style="color: #000000;">(</span> <span style="color: #ff0000;">"COM"</span>+mPortRam, val<span style="color: #000000;">(</span>mBtUlz<span style="color: #000000;">)</span>, val<span style="color: #000000;">(</span>mBrUlz<span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /><br /><br /> <span style="color: #00C800;">if</span> nCommUlz < <span style="color: #000000;">0</span> <br /> MsgStop<span style="color: #000000;">(</span><span style="color: #ff0000;">"Error Open COM"</span>+mPortRam<span style="color: #000000;">)</span> <br /> oComUlz:<span style="color: #000000;">enable</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">return</span> .f.<br /> <span style="color: #00C800;">endif</span> <br /><br /> <span style="color: #00C800;">if</span> ! BuildCommDcb<span style="color: #000000;">(</span> <span style="color: #ff0000;">"COM"</span> + mPortRam + <span style="color: #ff0000;">":"</span>+rtrim<span style="color: #000000;">(</span>nBitUlz<span style="color: #000000;">)</span>+<span style="color: #ff0000;">",N,8,1"</span>, @cDcb <span style="color: #000000;">)</span><br /> MsgStop<span style="color: #000000;">(</span> <span style="color: #ff0000;">"Error BUILD!"</span> <span style="color: #000000;">)</span><br /> oComUlz:<span style="color: #000000;">enable</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">return</span> .f.<br /> <span style="color: #00C800;">endif</span><br /><br /><br /> <span style="color: #00C800;">if</span> ! SetCommState<span style="color: #000000;">(</span> cDcb <span style="color: #000000;">)</span><br /> MsgStop<span style="color: #000000;">(</span> <span style="color: #ff0000;">"Error SETCOMM!"</span> <span style="color: #000000;">)</span><br /> oComUlz:<span style="color: #000000;">enable</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">return</span> .f.<br /> <span style="color: #00C800;">endif</span><br /><br /><br /> <span style="color: #00C800;">if</span> !ENABLECOMMNOTIFICATION<span style="color: #000000;">(</span> nCommUlz, oDlgRam:<span style="color: #000000;">hWnd</span>, <span style="color: #000000;">1</span>, <span style="color: #000000;">-1</span> <span style="color: #000000;">)</span> <br /> MsgStop<span style="color: #000000;">(</span><span style="color: #ff0000;">"Error Open COM"</span>+mPortRam<span style="color: #000000;">)</span><br /> oComUlz:<span style="color: #000000;">enable</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">return</span> .f.<br /> <span style="color: #00C800;">endif</span> <br /><br /> <span style="color: #00C800;">if</span> FlushComm<span style="color: #000000;">(</span> nCommUlz, <span style="color: #000000;">1</span> <span style="color: #000000;">)</span> != <span style="color: #000000;">0</span><br /> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"FlushComm Error"</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /><br /> <span style="color: #00C800;">if</span> FlushComm<span style="color: #000000;">(</span> nCommUlz, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span> != <span style="color: #000000;">0</span><br /> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"FlushComm Error"</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /><br /> sBmpPet=<span style="color: #ff0000;">""</span><br /> sBmpBar=<span style="color: #ff0000;">""</span><br /><br />oBmpRam:<span style="color: #000000;">SetFile</span><span style="color: #000000;">(</span>cOsnDir+<span style="color: #ff0000;">"<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\s</span>green.bmp"</span><span style="color: #000000;">)</span><br />oBmpRam:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> LogFile<span style="color: #000000;">(</span> cF, <span style="color: #000000;">{</span> <span style="color: #ff0000;">"Ulaz - Otvoren COM"</span>+mPortRam <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">return</span> nCommUlz<br /><br /><br /> </div>[/code:ps6bq0q2] |
problem with communication (RS232) | Please notice that you have to do in 32 bits:
SetCommState( nComm, cDcb )
instead of:
SetCommState( cDcb )
Replace it in your app and try it again, thanks |
problem with communication (RS232) | Unfortunately I am using 16 bit (Fivewin 1.92) because the 32 bit version can not be simultaneously open 4 ports if it is appropriate. And that is a big problem. Do you know if you have the latest versions to the same limit?
The problem I have now solved by introducing timer that periodically checks nStatus but I'm not happy about it. I'm looking for a better solution!
Sorry for my English! |
problem with communication at midnight | do my port through which communication with the controller (ADAM 4000). several times per second the controller sends a request (WRITECOMM (nCommIzl, "$ 02" + "6" + chr (13))) I get a response from him
function BytesAtPort( nCommIzl )
local cBufIzl := Replicate(Chr(255),1024)
ReadComm( nCommIzl, @cBufIzl ) // <<<<---- program will lock here
cBufIzl:=StrTran(cBufIzl,Chr(255),'')
if mCont=.t.
LogFile( dF, {"Response controller: " + cBufIzl } )
endif
.
.
.
.
log file:
.
.
.
.
07/19/12 23:59:58: Response controller:! 001F00
07/19/12 23:59:58: Response controller:! 001F00
07/19/12 23:59:58: Response controller:! 001F00
07/19/12 23:59:58: Response controller:! 001F00
07/19/12 23:59:59: Response controller:! 001F00
07/19/12 23:59:59: Response controller:! 001F00
07/19/12 23:59:59: Response controller:! 001F00
07/19/12 23:59:59: Response controller:! 001F00
07/19/12 23:59:59: Response controller:! 001F00
The problem is that communication stops at 23:59:59. Why?
Note that the controller does not have its clock! |
problem with create application | when I create same application a got error
I USED xHARBOUR /XCC /compercial ver 83 ans FWH ver 200906
Type: C >>>xlink.exe -NOEXPOBJ -MAP -FORCE:MULTIPLE -NOIMPLIB -subsystem:windows -UNMANGLE -LIBPATH:"D:\fwh\lib" -LIBPATH:"D:\xHB.83\lib" -LIBPATH:"D:\xHB.83\c_lib" -LIBPATH:"D:\xHB.83\c_lib\win" "t.obj" "D:\FWH\xhb.obj" "FiveHCM.lib" "FiveHMX.lib" "OptG.lib" "xhb.lib" "dbf.lib" "nsx.lib" "ntx.lib" "cdx.lib" "rmdbfcdx.lib" "ct3comm.lib" crt.lib kernel32.lib user32.lib winspool.lib ole32.lib oleaut32.lib odbc32.lib odbccp32.lib uuid.lib wsock32.lib ws2_32.lib wininet.lib advapi32.lib shlwapi.lib msimg32.lib mpr.lib comctl32.lib comdlg32.lib gdi32.lib shell32.lib winmm.lib lz32.lib Netapi32.lib -out:"t.exe"<<<
Creating object: t.EXP
Creating library: t.LIB
xLINK: error: Unresolved external symbol '_HB_FUN_OLEINVOKE referenced from Fivehcm.lib(ACTX.obj)'.
xLINK: error: Unresolved external symbol '_HB_FUN_OLESETPROPERTY referenced from Fivehcm.lib(ACTX.obj)'.
xLINK: error: Unresolved external symbol '_HB_FUN_OLEGETPROPERTY referenced from Fivehcm.lib(ACTX.obj)'.
xLINK: error: Unresolved external symbol '_OleUIPasteSpecialA referenced from Fivehcm.lib(RICHEDIT.obj)'.
xLINK: error: Unresolved external symbol '_GetFileVersionInfoSizeA referenced from Fivehcm.lib(RICHEDIT.obj)'.
xLINK: error: Unresolved external symbol '_GetFileVersionInfoA referenced from Fivehcm.lib(RICHEDIT.obj)'.
xLINK: error: Unresolved external symbol '_VerQueryValueA referenced from Fivehcm.lib(RICHEDIT.obj)'.
xLINK: fatal error: 7 unresolved external(s).
Type: C >>>Couldn't build: t.exe<<<
Type: C >>>TMAKEPROJECT<<<
Type: C >>>TMAKEPROJECT:REFRESH<<<
Type: N >>> 1416<<< |
problem with create application | kajot,
Please review this thread:
<!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?p=83275#p83275">viewtopic.php?p=83275#p83275</a><!-- l --> |
problem with dbUseArea - resolved - | [b:37cf9syk] DbUseArea( .F. ,"DBFCDX", ::aIdx[ i, 1 ],, .F. ) // not work[/b:37cf9syk]
[b:37cf9syk]Error[/b:37cf9syk]
[code=fw:37cf9syk]<div class="fw" id="{CB}" style="font-family: monospace;"><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;">1</span> secs <br /> Error occurred <span style="color: #00C800;">at</span>: <span style="color: #000000;">04</span>/<span style="color: #000000;">13</span>/<span style="color: #000000;">23</span>, <span style="color: #000000;">11</span>:<span style="color: #000000;">21</span>:<span style="color: #000000;">28</span><br /> Error description: <span style="color: #000000;">Error</span> BASE/<span style="color: #000000;">1068</span> Argument error: <span style="color: #000000;">array</span> access<br /> Args:<br /> <span style="color: #000000;">[</span> <span style="color: #000000;">1</span><span style="color: #000000;">]</span> = U <br /> <span style="color: #000000;">[</span> <span style="color: #000000;">2</span><span style="color: #000000;">]</span> = N <span style="color: #000000;">1</span><br /><br />Stack Calls<br />===========<br /> Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">ut_reindex</span>.PRG => TINDICE:<span style="color: #000000;">ORDER</span><span style="color: #000000;">(</span> <span style="color: #000000;">108</span> <br /><br /> </div>[/code:37cf9syk]
[b:37cf9syk]Line 108 [/b:37cf9syk] DbUseArea( .F. ,"DBFCDX", ::aIdx[ i, 1 ],, .F. )
I'm using a small class to index dbf files on my app
on test I use customer.dbf
[code=fw:37cf9syk]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">'fivewin.ch'</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"constant.ch"</span><br /><span style="color: #00D7D7;">#INCLUDE</span> <span style="color: #ff0000;">"DIRECTRY.CH"</span><br /><br />REQUEST DBFCDX<br /><br />*MEMVAR oApp<br /><br /><span style="color: #00C800;">Function</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">local</span> cPathDbf:=<span style="color: #ff0000;">".<span style="color: #000000;">\d</span>ata<span style="color: #000000;">\"</span><br /> TIndice():New(cPathDbf):Activate()<br /> return nil<br /><br /><br />CLASS TIndice<br /> DATA aIdx<br /> DATA nIdx<br /> DATA oDlg<br /> DATA oFont<br /> DATA oMeter<br /> DATA cText<br /> DATA oSay<br /> DATA oAnimate<br /> DATA oBmp<br /> DATA oBtnok<br /> DATA oBtnExit<br /> DATA cPathDbf<br /><br /> METHOD New() CONSTRUCTOR<br /> METHOD Activate()<br /> METHOD Order()<br /> END CLASS<br /><br /><br />METHOD New(cPathDbf) CLASS TIndice<br /> <br /><br /> //test for demo<br /> ::aIdx := { ;<br /> { "</span>CUSTOMER<span style="color: #ff0000;">" , { { "</span>Upper<span style="color: #000000;">(</span>First<span style="color: #000000;">)</span><span style="color: #ff0000;">" , "</span>First<span style="color: #ff0000;">" , "</span>Customer<span style="color: #ff0000;">" } ,;<br /> { "</span>Upper<span style="color: #000000;">(</span>Last<span style="color: #000000;">)</span><span style="color: #ff0000;">" , "</span>Last<span style="color: #ff0000;">" , "</span>Customer<span style="color: #ff0000;">" } ,;<br /> { "</span>State<span style="color: #ff0000;">" , "</span>State<span style="color: #ff0000;">" , "</span>Customer<span style="color: #ff0000;">" } } } ,;<br /> }<br /><br /><br /> // ::cPathDbf := cPathDbf<br /><br />RETURN Self<br /><br /><br />METHOD Activate() CLASS TIndice<br /> LOCAL QSelf := Self<br /><br /> local nBottomDlg := 10<br /> local nRightDlg := 40<br /> local nWd := Max( nRightDlg * DLG_CHARPIX_W, 180 )<br /> local nHt := nBottomDlg * DLG_CHARPIX_H<br /><br /> ::oFont:= TFont():New( "</span>Tahoma<span style="color: #ff0000;">", 0, 12,, )<br /><br /> DEFINE DIALOG ::oDlg SIZE nWd, nHt PIXEL TRUEPIXEL ;<br /> STYLE nOR( DS_MODALFRAME, WS_POPUP, WS_CAPTION, WS_SYSMENU, ;<br /> WS_MINIMIZEBOX)<br /><br /> SET FONT TO ::oFont OF ::oDlg<br /><br /> @ 2,12 SAY ::oSay PROMPT ::cText SIZE 200,20 OF ::oDlg COLOR CLR_RED UPDATE<br /><br /> ::oMeter := TProgress():New( 4.8, 2, ::oDlg, , , , .f.,, 300, 15, "</span><span style="color: #ff0000;">", .f., .f. )<br /> ::oMeter:SetRange( 0, LEN( ::aIdx ) )<br /> ::oAnimate := TAnimate():New( 2.8, 2, ::oDlg, .t., , 200, 12)<br /><br /> @ 110,10 BUTTON ::oBtnOK Prompt "</span>Conferma<span style="color: #ff0000;">" SIZE 55,20 PIXEL OF ::oDlg ACTION ( ::Order() )<br /> @ 110,95 BUTTON ::oBtnExit Prompt "</span>Annulla<span style="color: #ff0000;">" SIZE 55,20 PIXEL OF ::oDlg ACTION ( ::oDlg:End() )<br /><br /> ACTIVATE DIALOG ::oDlg CENTERED;<br /> ON INIT ( QSelf:oAnimate:CopyFile(), QSelf:oAnimate:Play() )<br />RETURN NIL<br /><br /><br />METHOD Order() CLASS TIndice<br /> LOCAL i<br /> LOCAL k<br /> LOCAL bCode<br /><br /> local cfor := "</span>!Deleted<span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #ff0000;">"<br /> local bFor := "</span><span style="color: #000000;">{</span> || <span style="color: #ff0000;">" + cfor + "</span><span style="color: #000000;">}</span><span style="color: #ff0000;">"<br /><br /> ::oBtnOk:Disable()<br /> ::oBtnExit:Disable()<br /><br /><br /> *xbrowser ::aIdx<br /><br /> FOR i := 1 TO LEN( ::aIdx )<br /> //dbUseArea( .t., ::cDriver, ::cFile, ::cAlias, ::lShared, ::lReadOnly )<br /> DbUseArea( .F. ,"</span>DBFCDX<span style="color: #ff0000;">", ::aIdx[ i, 1 ],, .F. )<br /><br /> FOR k := 1 TO LEN( ::aIdx[ i, 2 ] )<br /><br /> bCode := "</span><span style="color: #000000;">{</span> || <span style="color: #ff0000;">" + ::aIdx[ i, 2, k, 1 ] + "</span><span style="color: #000000;">}</span><span style="color: #ff0000;">"<br /><br /> OrdCondSet(cFor,bFor,,,,, RECNO(),,,, )<br /> OrdCreate( ::aIdx[ i, 2, k, 3 ], ::aIdx[ i, 2, k, 2 ], ::aIdx[ i, 2, k, 1 ], &bCode )<br /><br /> NEXT<br /><br /> DbCloseArea()<br /><br /> ::oMeter:nPosition := ( ( i * 100 ) / Len( ::aIdx ) )<br /><br /> NEXT<br /><br /> ::oBtnExit:Enable()<br /><br /> MsgInfo( "</span>Azione terminata<span style="color: #ff0000;">", "</span><span style="color: #0000ff;">Index</span><span style="color: #ff0000;">" )<br /><br /> ::oDlg:End()<br /><br />RETURN NIL<br /><br /></span></div>[/code:37cf9syk]
make error , but the procedure create the index good ...
How I can resolve ? |
problem with dbUseArea - resolved - | any solution ? |
problem with dbUseArea - resolved - | Dear Silvio,
param i seems to be nil |
problem with dbUseArea - resolved - | [quote="Antonio Linares":1qr66h2s]Dear Silvio,
param i seems to be nil[/quote:1qr66h2s]
ok but How I can resolve ?
there is for i:= 1 to...
If i>LEN( ::aIdx )
exit
endif
I not understood before it run ok , now suddenly I went to recompile and it doesn't work how is it possible ? |
problem with dbUseArea - resolved - | hi Silvio,
have you try a Macro ?
[code=fw:1o4m0084]<div class="fw" id="{CB}" style="font-family: monospace;"> xName := ::<span style="color: #000000;">aIdx</span><span style="color: #000000;">[</span> i, <span style="color: #000000;">1</span> <span style="color: #000000;">]</span><br /> DbUseArea<span style="color: #000000;">(</span> .F. ,<span style="color: #ff0000;">"DBFCDX"</span>, &<span style="color: #000000;">(</span>xName<span style="color: #000000;">)</span>,, .F. <span style="color: #000000;">)</span></div>[/code:1o4m0084] |
problem with dbUseArea - resolved - | [quote="Jimmy":30dsxle0]hi Silvio,
have you try a Macro ?
[code=fw:30dsxle0]<div class="fw" id="{CB}" style="font-family: monospace;"> xName := ::<span style="color: #000000;">aIdx</span><span style="color: #000000;">[</span> i, <span style="color: #000000;">1</span> <span style="color: #000000;">]</span><br /> DbUseArea<span style="color: #000000;">(</span> .F. ,<span style="color: #ff0000;">"DBFCDX"</span>, &<span style="color: #000000;">(</span>xName<span style="color: #000000;">)</span>,, .F. <span style="color: #000000;">)</span></div>[/code:30dsxle0][/quote:30dsxle0]
error |
problem with dbUseArea - resolved - | Hi
The error comes from :: aIdx -> Len (::aIdx) result 2
This code works <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
[code=fw:352gmbuj]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">'fivewin.ch'</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"constant.ch"</span><br /><span style="color: #00D7D7;">#INCLUDE</span> <span style="color: #ff0000;">"DIRECTRY.CH"</span><br /><br />REQUEST DBFCDX<br /><br />*MEMVAR oApp<br /><br /><span style="color: #00C800;">Function</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">local</span> cPathDbf:=<span style="color: #ff0000;">".<span style="color: #000000;">\d</span>ata<span style="color: #000000;">\"</span><br /> TIndice():New(cPathDbf):Activate()<br /> return nil<br /><br /><br />CLASS TIndice<br /> DATA aIdx<br /> DATA nIdx<br /> DATA oDlg<br /> DATA oFont<br /> DATA oMeter<br /> DATA cText<br /> DATA oSay<br /> DATA oAnimate<br /> DATA oBmp<br /> DATA oBtnok<br /> DATA oBtnExit<br /> DATA cPathDbf<br /><br /> METHOD New() CONSTRUCTOR<br /> METHOD Activate()<br /> METHOD Order()<br /> END CLASS<br /><br /><br />METHOD New(cPathDbf) CLASS TIndice<br /> <br /><br /> //test for demo<br /><br /> ::aIdx := { ;<br /> { "</span>CUSTOMER<span style="color: #ff0000;">" , { { "</span>Upper<span style="color: #000000;">(</span>First<span style="color: #000000;">)</span><span style="color: #ff0000;">" , "</span>First<span style="color: #ff0000;">" , "</span>Customer<span style="color: #ff0000;">" } ,;<br /> { "</span>Upper<span style="color: #000000;">(</span>Last<span style="color: #000000;">)</span><span style="color: #ff0000;">" , "</span>Last<span style="color: #ff0000;">" , "</span>Customer<span style="color: #ff0000;">" } ,;<br /> { "</span>State<span style="color: #ff0000;">" , "</span>State<span style="color: #ff0000;">" , "</span>Customer<span style="color: #ff0000;">" } } } ,;<br /> }<br /><br /><br /> // ::cPathDbf := cPathDbf<br /><br />RETURN Self<br /><br /><br />METHOD Activate() CLASS TIndice<br /> LOCAL QSelf := Self<br /><br /> local nBottomDlg := 10<br /> local nRightDlg := 40<br /> local nWd := Max( nRightDlg * DLG_CHARPIX_W, 180 )<br /> local nHt := nBottomDlg * DLG_CHARPIX_H<br /><br /> ::oFont:= TFont():New( "</span>Tahoma<span style="color: #ff0000;">", 0, 12,, )<br /><br /> DEFINE DIALOG ::oDlg SIZE nWd, nHt PIXEL TRUEPIXEL ;<br /> STYLE nOR( DS_MODALFRAME, WS_POPUP, WS_CAPTION, WS_SYSMENU, ;<br /> WS_MINIMIZEBOX)<br /><br /> SET FONT TO ::oFont OF ::oDlg<br /><br /> @ 2,12 SAY ::oSay PROMPT ::cText SIZE 200,20 OF ::oDlg COLOR CLR_RED UPDATE<br /><br /> ::oMeter := TProgress():New( 4.8, 2, ::oDlg, , , , .f.,, 300, 15, "</span><span style="color: #ff0000;">", .f., .f. )<br /> ::oMeter:SetRange( 0, LEN( ::aIdx ) )<br /> ::oAnimate := TAnimate():New( 2.8, 2, ::oDlg, .t., , 200, 12)<br /><br /> @ 110,10 BUTTON ::oBtnOK Prompt "</span>Conferma<span style="color: #ff0000;">" SIZE 55,20 PIXEL OF ::oDlg ACTION ( ::Order() )<br /> @ 110,95 BUTTON ::oBtnExit Prompt "</span>Annulla<span style="color: #ff0000;">" SIZE 55,20 PIXEL OF ::oDlg ACTION ( ::oDlg:End() )<br /><br /> ACTIVATE DIALOG ::oDlg CENTERED;<br /> ON INIT ( QSelf:oAnimate:CopyFile(), QSelf:oAnimate:Play() )<br />RETURN NIL<br /><br /><br />METHOD Order() CLASS TIndice<br /> LOCAL i<br /> LOCAL k<br /> LOCAL bCode<br /><br /> local cfor := "</span>!Deleted<span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #ff0000;">"<br /> local bFor := "</span><span style="color: #000000;">{</span> || <span style="color: #ff0000;">" + cfor + "</span><span style="color: #000000;">}</span><span style="color: #ff0000;">"<br /><br /> ::oBtnOk:Disable()<br /> ::oBtnExit:Disable()<br /><br /><br /> *xbrowser ::aIdx<br /><br /> FOR i := 1 TO LEN( ::aIdx )-1 // NEW is -1<br /> //dbUseArea( .t., ::cDriver, ::cFile, ::cAlias, ::lShared, ::lReadOnly )<br /> DbUseArea( .F. ,"</span>DBFCDX<span style="color: #ff0000;">", ::aIdx[ i, 1 ],, .F. )<br /><br /> FOR k := 1 TO LEN( ::aIdx[ i, 2 ] )<br /><br /> bCode := "</span><span style="color: #000000;">{</span> || <span style="color: #ff0000;">" + ::aIdx[ i, 2, k, 1 ] + "</span><span style="color: #000000;">}</span><span style="color: #ff0000;">"<br /><br /> OrdCondSet(cFor,bFor,,,,, RECNO(),,,, )<br /> OrdCreate( ::aIdx[ i, 2, k, 3 ], ::aIdx[ i, 2, k, 2 ], ::aIdx[ i, 2, k, 1 ], &bCode )<br /><br /> NEXT<br /><br /> DbCloseArea()<br /><br /> ::oMeter:nPosition := ( ( i * 100 ) / Len( ::aIdx ) )<br /><br /> NEXT<br /><br /> ::oBtnExit:Enable()<br /><br /> MsgInfo( "</span>Azione terminata<span style="color: #ff0000;">", "</span><span style="color: #0000ff;">Index</span><span style="color: #ff0000;">" )<br /><br /> ::oDlg:End()<br /><br />RETURN NIL<br /></span></div>[/code:352gmbuj] |
problem with dbUseArea - resolved - | [code=fw:2y3x1bxg]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">'fivewin.ch'</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"constant.ch"</span><br /><span style="color: #00D7D7;">#INCLUDE</span> <span style="color: #ff0000;">"DIRECTRY.CH"</span><br /><br />REQUEST DBFCDX<br /><br />*MEMVAR oApp<br /><br /><span style="color: #00C800;">Function</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">local</span> cPathDbf:=<span style="color: #ff0000;">".<span style="color: #000000;">\d</span>ata<span style="color: #000000;">\"</span><br /> TIndice():New(cPathDbf):Activate()<br /> //TIndice():Activate()<br /> return nil<br /><br /><br />CLASS TIndice<br /> DATA aIdx<br /> DATA nIdx<br /> DATA oDlg<br /> DATA oFont<br /> DATA oMeter<br /> DATA cText<br /> DATA oSay<br /> DATA oAnimate<br /> DATA oBmp<br /> DATA oBtnok<br /> DATA oBtnExit<br /> DATA cPathDbf<br /><br /> METHOD New() CONSTRUCTOR<br /> METHOD Activate()<br /> METHOD Order()<br /> END CLASS<br /><br /><br />METHOD New(cPathDbf) CLASS TIndice<br /> <br /><br /> //test for demo<br />/*<br /> ::aIdx := { ;<br /> { "</span>CUSTOMER<span style="color: #ff0000;">" , { { "</span>Upper<span style="color: #000000;">(</span>First<span style="color: #000000;">)</span><span style="color: #ff0000;">" , "</span>First<span style="color: #ff0000;">" , "</span>Customer<span style="color: #ff0000;">" } ,;<br /> { "</span>Upper<span style="color: #000000;">(</span>Last<span style="color: #000000;">)</span><span style="color: #ff0000;">" , "</span>Last<span style="color: #ff0000;">" , "</span>Customer<span style="color: #ff0000;">" } ,;<br /> { "</span>State<span style="color: #ff0000;">" , "</span>State<span style="color: #ff0000;">" , "</span>Customer<span style="color: #ff0000;">" } } } ,;<br /> }<br />*/<br /> ::aIdx := { ;<br /> { "</span>CUSTOMER<span style="color: #ff0000;">" , { { "</span>Upper<span style="color: #000000;">(</span>First<span style="color: #000000;">)</span><span style="color: #ff0000;">" , "</span>First<span style="color: #ff0000;">" , "</span>Customer<span style="color: #ff0000;">" } ,;<br /> { "</span>Upper<span style="color: #000000;">(</span>Last<span style="color: #000000;">)</span><span style="color: #ff0000;">" , "</span>Last<span style="color: #ff0000;">" , "</span>Customer<span style="color: #ff0000;">" } ,;<br /> { "</span>State<span style="color: #ff0000;">" , "</span>State<span style="color: #ff0000;">" , "</span>Customer<span style="color: #ff0000;">" } } } ;<br /> }<br /><br />//xbrowser(::aIdx)<br /> <br /> // ::cPathDbf := cPathDbf<br /><br />RETURN Self<br /><br /><br />METHOD Activate() CLASS TIndice<br /> LOCAL QSelf := Self<br /><br /> local nBottomDlg := 10<br /> local nRightDlg := 40<br /> local nWd := Max( nRightDlg * DLG_CHARPIX_W, 180 )<br /> local nHt := nBottomDlg * DLG_CHARPIX_H<br /><br /> ::oFont:= TFont():New( "</span>Tahoma<span style="color: #ff0000;">", 0, 12,, )<br /><br /> DEFINE DIALOG ::oDlg SIZE nWd, nHt PIXEL TRUEPIXEL ;<br /> STYLE nOR( DS_MODALFRAME, WS_POPUP, WS_CAPTION, WS_SYSMENU, ;<br /> WS_MINIMIZEBOX)<br /><br /> SET FONT TO ::oFont OF ::oDlg<br /><br /> @ 2,12 SAY ::oSay PROMPT ::cText SIZE 200,20 OF ::oDlg COLOR CLR_RED UPDATE<br /><br /> ::oMeter := TProgress():New( 4.8, 2, ::oDlg, , , , .f.,, 300, 15, "</span><span style="color: #ff0000;">", .f., .f. )<br /> ::oMeter:SetRange( 0, LEN( ::aIdx ) )<br /> ::oAnimate := TAnimate():New( 2.8, 2, ::oDlg, .t., , 200, 12)<br /><br /> @ 110,10 BUTTON ::oBtnOK Prompt "</span>Conferma<span style="color: #ff0000;">" SIZE 55,20 PIXEL OF ::oDlg ACTION ( ::Order() )<br /> @ 110,95 BUTTON ::oBtnExit Prompt "</span>Annulla<span style="color: #ff0000;">" SIZE 55,20 PIXEL OF ::oDlg ACTION ( ::oDlg:End() )<br /><br /> ACTIVATE DIALOG ::oDlg CENTERED;<br /> ON INIT ( QSelf:oAnimate:CopyFile(), QSelf:oAnimate:Play() )<br />RETURN NIL<br /><br /><br />METHOD Order() CLASS TIndice<br /> LOCAL i<br /> LOCAL k<br /> LOCAL bCode<br /><br /> local cfor := "</span>!Deleted<span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #ff0000;">"<br /> local bFor := "</span><span style="color: #000000;">{</span> || <span style="color: #ff0000;">" + cfor + "</span><span style="color: #000000;">}</span><span style="color: #ff0000;">"<br /><br /> ::oBtnOk:Disable()<br /> ::oBtnExit:Disable()<br /><br /><br />// xbrowser ::aIdx<br /><br /> FOR i := 1 TO LEN( ::aIdx ) <br /> //dbUseArea( .t., ::cDriver, ::cFile, ::cAlias, ::lShared, ::lReadOnly )<br /> DbUseArea( .F. ,"</span>DBFCDX<span style="color: #ff0000;">", ::aIdx[ i, 1 ],, .F. )<br /><br /> FOR k := 1 TO LEN( ::aIdx[ i, 2 ] )<br /><br /> bCode := "</span><span style="color: #000000;">{</span> || <span style="color: #ff0000;">" + ::aIdx[ i, 2, k, 1 ] + "</span><span style="color: #000000;">}</span><span style="color: #ff0000;">"<br /><br /> OrdCondSet(cFor,bFor,,,,, RECNO(),,,, )<br /> OrdCreate( ::aIdx[ i, 2, k, 3 ], ::aIdx[ i, 2, k, 2 ], ::aIdx[ i, 2, k, 1 ], &bCode )<br /><br /> NEXT<br /><br /> DbCloseArea()<br /><br /> ::oMeter:nPosition := ( ( i * 100 ) / Len( ::aIdx ) )<br /> NEXT<br /><br /> ::oBtnExit:Enable()<br /><br /> MsgInfo( "</span>Azione terminata<span style="color: #ff0000;">", "</span><span style="color: #0000ff;">Index</span><span style="color: #ff0000;">" )<br /><br /> ::oDlg:End()<br /><br />RETURN NIL<br /></span></div>[/code:2y3x1bxg] |
problem with dbUseArea - resolved - | thanks , where was the error ? |
problem with dbUseArea - resolved - | Hi
Last comma makes an blank line to array, and than aIdx(i,1) is empty for dbusearea where i=2 -works correct for i=1 but len(aIdx)=2 and then crash!
::aIdx := { ;
{ "CUSTOMER" , { { "Upper(First)" , "First" , "Customer" } ,;
{ "Upper(Last)" , "Last" , "Customer" } ,;
{ "State" , "State" , "Customer" } } } ,;
} |
problem with dbUseArea - resolved - | [quote="alerchster":100xs54t]Hi
Last comma makes an blank line to array, and than aIdx(i,1) is empty for dbusearea where i=2 -works correct for i=1 but len(aIdx)=2 and then crash!
::aIdx := { ;
{ "CUSTOMER" , { { "Upper(First)" , "First" , "Customer" } ,;
{ "Upper(Last)" , "Last" , "Customer" } ,;
{ "State" , "State" , "Customer" } } } ,;
}[/quote:100xs54t]
I really didn't understand why I use that code elsewhere and for a long time so I hadn't changed it, I couldn't understand why it didn't work |
problem with dbsetfilter | I made
SELECT AS
AS->(DbSetOrder(1))
AS->(DbSetFilter( {|| AS->Giorno=date() }, ))
AS->(DbGoTop())
and I wish show only the record have as->giorno = date() it run ok
but sometimes it show also one record with another date
[img:2pgpuxrs]http://www.eoeo.it/wp-content/uploads/2015/10/nn.jpg[/img:2pgpuxrs]
the archive is index on
INDEX ON dtoc(giorno) TAG ASS1
any solution please ?
i tried also with
SELECT AS
AS->(DbSetOrder(1))
AS->( OrdScope(0, { || date() }))
AS->( OrdScope(1, { || date() }) )
AS->(DbGoTop())
but not run on |
problem with dbsetfilter | Maybe trying INDEX ON giorno TAG ASS1 or AS->( OrdScope(0, { || dtoc(date()) })) |
problem with dbsetfilter | DbSetFilter( <bFilter>, [<cFilter>] ) --> NIL
Arguments
<bFilter>
A code block containing the filter expression. The expression must yield a logical value.
<cFilter>
The filter expression in form of a character string. Return
The return value is always NIL.
Description
The DbFilter() function defines a filter condition for the current work area in form of the code block <bFilter>. All records in the work area where the filter condition yields .F. (false) are ignored during database navigation. As a result, these records become invisible and are filtered.
[b:3oaj5l2l]Although the second parameter <cFilter> is optional, it is recommended to specify the filter condition a second time as a character string. Otherwise, the DbFilter() function cannot obtain the filter condition and returns a null string (""), despite of a filter condition being active.[/b:3oaj5l2l] |
problem with dbsetfilter | I recommend you use dtos() in your index, not dtoc()
Then for scope you can use
AS->( OrdScope(0, { || dtos(date()) }))
AS->( OrdScope(1, { || dtos(date()) }) |
problem with dbsetfilter | Doesn t index sort correctly a date field ?
Must we convert it to dtos ?
The value type should match both index key and scope and should error if not. |
problem with dbsetfilter | His index was using dtoc() which is not very good to sort/index with. If you are going to index on date converted to character string then dtos() is the correct function. |
problem with dbsetfilter | [b:18h2g606]perhaps I found the problem[/b:18h2g606]
after I open the database and make the filter
I call the old record where the archive is stop
if nRecNo < AS->(LastRec()) .AND. nRecno != 0
AS->(DbGoTo(nRecno)) <------------------------------------the error
else
AS->(DbGoTop())
endif
on nRecNo I save on ( inifile) the record and it then make the error because if the user open today on 20.10.2015 and the user have close on 16.10.2015 the procedure show the records on 20.10.2015 (by filter) and the show the record save as old used.
If i ren these lines it run good with
SELECT AS
AS->(DbSetOrder(1))
AS->(DbSetFilter( {|| AS->Giorno=date() }, ))
AS->(DbGoTop())
probable I make a mistake on the oldest modification...
sorry... |
problem with dbsetfilter | but wich is the best ? ( between run ok)
SELECT AS
AS->(DbSetOrder(1))
AS->( OrdScope(0, { || dtos(date()) }))
AS->( OrdScope(1, { || dtos(date()) }) )
AS->(DbGoTop())
or
SELECT AS
AS->(DbSetOrder(1))
AS->(DbSetFilter( {|| AS->Giorno=date() }, ))
AS->(DbGoTop()) |
problem with dbsetfilter | Silvio,
DBSETFILETR is much slower in case there are many records,
because the filter ckecks from start- to the end of file.
A filter doesn't need a INDEX. That is the difference of the usage.
With just a few records there will be no difference.
best regards
Uwe |
problem with dbsetfilter | FOR EACH DAY PERHAPS 5/6 RECORDS
THINK AFTER A MONTH PERHAPS 150/160 RECORDS |
problem with focus in GET-class | Hello,
I notice a problem with the focus in the GET-class which didn't happen in FW16.
The code :
REDEFINE GET oGET1 VAR FIELD1 PICTURE "XXX"
....
REDEFINE GET oGET6 VAR FIELD6 PICTURE "999" VALID !EMPTY(FIELD7) .OR. ACTGEM()
REDEFINE GET oGET7 VAR FIELD7 PICTURE "XXX"
where :
ACTGEM() is a function which opens a new dialog box to select a value for FIELD7, but this function is only called when FIELD7 is empty (usually only when adding data). ACTGEM() always returns a .T.
In FW16, the focus is automatically on FIELD7 after having selected a value for FIELD7 through ACTGEM().
In FW32 however, the focus is on FIELD1 after having selected a value for FIELD7 through ACTGEM().
How can I maintain the focus on FIELD7 after having selected a value for FIELD7 through ACTGEM() ?
Thank you.
Michel |
problem with focus in GET-class | Michel
OGET7:OJUMP := OGET7
OGET7:SETFOCUS(.T.)
Hth
Richard |
problem with focus in GET-class | Richard,
Thank you.
I'll try it out.
Michel |
problem with focus in GET-class | [quote="Richard Chidiak":3bqk98t9]OGET7:SETFOCUS(.T.)[/quote:3bqk98t9]
As far as I know, SetFocus() method doesn't take any parameters.
EMG |
problem with focus in GET-class | Enico
You're right (as usual)
I wrote the sentence a bit quickly...
Best regards
Richard |
problem with fw_adoexporttodbf function | I think there is a bug in FW_AdoExportToDbf function. When it meets a SQL field type "varchar(MAX)", the output dbf is created with a character field (instead of "memo" field) length=0, and without content. To fix this problem, need to declare interactively the structure of dbf at runtime moving ".T." in the third parameter of the function. But in this way the program stops execution asking name and field attributes to the operator, and it is not always possible.
Detected with FWH version 1807 and exporting a table of a MSSQL database.
There is a way to solve? Thank you. |
problem with fw_adoexporttodbf function | This is taken care of in later versions of FWH.
Try making this modification in \fwh\source\function\adofuncs.prg
Locate the function function FWAdoFieldStruct( oRs, n )
Add these lines towards the end of the function just before "return"
[code=fw:1c4t52hs]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">if</span> cType == <span style="color: #ff0000;">"C"</span> .and. nLen <= <span style="color: #000000;">0</span><br /> cType := <span style="color: #ff0000;">"M"</span><br /> nLen := <span style="color: #000000;">10</span><br /><span style="color: #00C800;">endif</span><br /> </div>[/code:1c4t52hs]
Please let us know if this works. |
problem with fw_adoexporttodbf function | Afther this change i have to recompile adofuncs.prg, right? How? Thank you. |
problem with fw_adoexporttodbf function | After this change, you add the revise adofuncs.prg to your project as one of your prg files. |
problem with fw_adoexporttodbf function | Linking adofuncs.obj to my project now i receive these errors linking:
c:\myproject> if gtgui == gtgui c:\bcc7\bin\ilink32 -Gn -aa -Tpe -s -v @b32.bc
Turbo Incremental Link 6.70 Copyright (c) 1997-2014 Embarcadero Technologies, Inc.
Error: Unresolved external '___CPPdebugHook' referenced from C:\BCC7\LIB\CW32.LIB|xx
Error: Unresolved external '__hInstance' referenced from C:\BCC7\LIB\CW32.LIB|_fastmm
Error: Unresolved external '___System__GetTls' referenced from C:\BCC7\LIB\CW32.LIB|xxv
Error: Unable to perform link |
problem with fw_adoexporttodbf function | Max,
Have you recently modified your bcc7 files ?
Please check that you are using the right bcc7 libraries |
problem with fw_adoexporttodbf function | Max,
Please post here your make file or batch file that you use to build your app, thanks |
problem with fw_adoexporttodbf function | No Antonio, i have not modify my BCC7 files (far from me! <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> ) . And all other my projects without link to adofuncs.prg are ok with this batch for compile and linking. Perhaps I've been doing something wrong since I added adofuncs(!?). This is the batch i use:
[code=fw:2phwt1pp]<div class="fw" id="{CB}" style="font-family: monospace;"><br />@ECHO OFF<br />ECHO Compiling...<br />TSKILL MARGINI<br /><span style="color: #00C800;">if</span> <span style="color: #ff0000;">"%FWDIR%"</span> == <span style="color: #ff0000;">""</span> set FWDIR=c:\fwh<br /><span style="color: #00C800;">if</span> <span style="color: #ff0000;">"%XHDIR%"</span> == <span style="color: #ff0000;">""</span> set XHDIR=c:\xharbour<br />SET HARBOURCMD=/a /es2 /gc0 /m /n /q<br />set GT=gtgui<br /><br />set hdir=%XHDIR%<br />set hdirl=%hdir%\lib<br />set bcdir=c:\bcc7<br />set fwh=%FWDIR%<br /><br />%hdir%\bin\harbour main /i%fwh%\include;%hdir%\include > comp.log <span style="color: #000000;">2</span>> warnings.log<br />%hdir%\bin\harbour adofuncs /i%fwh%\include;%hdir%\include > comp.log <span style="color: #000000;">2</span>> warnings.log<br /><span style="color: #00C800;">IF</span> ERRORLEVEL <span style="color: #000000;">1</span> GOTO COMPILEERRORS<br />@type comp.log<br />@type warnings.log<br />echo -O2 -emain.exe -I%hdir%\include -I%bcdir%\include main.c adofuncs.c > b32.bc<br />%bcdir%\bin\bcc32 -M -c -v @b32.bc<br />:<span style="color: #000000;">ENDCOMPILE</span><br /><br /><span style="color: #00C800;">IF</span> EXIST main.rc %bcdir%\bin\brc32 -r -I%bcdir%\include main<br /><br />echo %bcdir%\lib\c0w32.obj + > b32.bc<br />echo adofuncs.obj + > b32.bc<br />echo main.obj, + >> b32.bc<br />echo MARGINI.exe, + >> b32.bc<br />echo MARGINI.map, + >> b32.bc<br />echo %fwh%\lib\Fivehx.lib %fwh%\lib\FiveHC.lib + >> b32.bc<br />echo %hdirl%\rtl.lib + >> b32.bc<br />echo %hdirl%\vm.lib + >> b32.bc<br />echo %hdirl%\%GT%.lib + >> b32.bc<br />echo %hdirl%\lang.lib + >> b32.bc<br />echo %hdirl%\macro.lib + >> b32.bc<br />echo %hdirl%\rdd.lib + >> b32.bc<br />echo %hdirl%\dbfntx.lib + >> b32.bc<br />echo %hdirl%\dbfcdx.lib + >> b32.bc<br />echo %hdirl%\dbffpt.lib + >> b32.bc<br />echo %hdirl%\hbsix.lib + >> b32.bc<br />echo %hdirl%\debug.lib + >> b32.bc<br />echo %hdirl%\common.lib + >> b32.bc<br />echo %hdirl%\pp.lib + >> b32.bc<br />echo %hdirl%\pcrepos.lib + >> b32.bc<br />echo %hdirl%\ct.lib + >> b32.bc<br />echo %hdirl%\zlib.lib + >> b32.bc<br />echo %hdirl%\hbzip.lib + >> b32.bc<br />echo %hdirl%\libmisc.lib + >> b32.bc<br />echo %hdirl%\tip.lib + >> b32.bc<br />echo %hdirl%\png.lib + >> b32.bc<br /><br />rem Uncomment these two lines <span style="color: #0000ff;">to</span> use Advantage RDD<br />rem echo %hdir%\lib\rddads.lib + >> b32.bc<br />rem echo %hdir%\lib\Ace32.lib + >> b32.bc<br /><br />echo %bcdir%\lib\cw32.lib + >> b32.bc<br />echo %bcdir%\lib\import32.lib + >> b32.bc<br />echo %bcdir%\lib\uuid.lib + >> b32.bc<br />echo %bcdir%\lib\ws2_32.lib + >> b32.bc<br />echo %bcdir%\lib\psdk\odbc32.lib + >> b32.bc<br />echo %bcdir%\lib\psdk\rasapi32.lib + >> b32.bc<br />echo %bcdir%\lib\psdk\nddeapi.lib + >> b32.bc<br />echo %bcdir%\lib\psdk\msimg32.lib + >> b32.bc<br />echo %bcdir%\lib\psdk\psapi.lib + >> b32.bc<br />echo %bcdir%\lib\psdk\gdiplus.lib + >> b32.bc<br />echo %bcdir%\lib\psdk\iphlpapi.lib + >> b32.bc<br />echo %bcdir%\lib\psdk\shell32.lib, >> b32.bc<br /><br /><span style="color: #00C800;">IF</span> EXIST main.res echo main.res >> b32.bc<br /><br />rem uncomment this line <span style="color: #0000ff;">to</span> use the debugger and comment the following one<br /><span style="color: #00C800;">if</span> %GT% == gtwin %bcdir%\bin\ilink32 -Gn -Tpe -s -v @b32.bc<br /><span style="color: #00C800;">IF</span> ERRORLEVEL <span style="color: #000000;">1</span> GOTO LINKERROR<br /><span style="color: #00C800;">if</span> %GT% == gtgui %bcdir%\bin\ilink32 -Gn -aa -Tpe -s -v @b32.bc<br /><span style="color: #00C800;">IF</span> ERRORLEVEL <span style="color: #000000;">1</span> GOTO LINKERROR<br />ECHO * Application successfully built *<br />CALL MARGINIS.BAT<br />GOTO EXIT<br />ECHO<br /><br />rem delete temporary files<br />@del main.c<br /><br />:<span style="color: #000000;">COMPILEERRORS</span><br />@type comp.log<br />ECHO * Compile errors *<br /><span style="color: #00C800;">pause</span><br />GOTO EXIT<br /><br />:<span style="color: #000000;">LINKERROR</span><br />ECHO * Linking errors *<br /><span style="color: #00C800;">pause</span><br />GOTO EXIT<br /><br />:<span style="color: #000000;">SINTAX</span><br />ECHO SYNTAX: <span style="color: #000000;">Build</span> <span style="color: #000000;">[</span>Program<span style="color: #000000;">]</span> <span style="color: #000000;">{</span>-- No especifiques la extensi¢n PRG<br />ECHO <span style="color: #000000;">{</span>-- Don<span style="color: #ff0000;">'t specify .PRG extension<br />GOTO EXIT<br /><br />:NOEXIST<br />ECHO The specified PRG main does not exist<br /><br />:EXIT<br /></span></div>[/code:2phwt1pp] |
problem with fw_adoexporttodbf function | And this is the content of my c:\BCC7\LIB folder:
[code=fw:22r5u76k]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> Directory di c:\BCC7\lib<br /><br /><span style="color: #000000;">15</span>/<span style="color: #000000;">05</span>/<span style="color: #000000;">2019</span> <span style="color: #000000;">07</span>:<span style="color: #000000;">39</span> <DIR> .<br /><span style="color: #000000;">15</span>/<span style="color: #000000;">05</span>/<span style="color: #000000;">2019</span> <span style="color: #000000;">07</span>:<span style="color: #000000;">39</span> <DIR> ..<br /><span style="color: #000000;">19</span>/<span style="color: #000000;">03</span>/<span style="color: #000000;">2015</span> <span style="color: #000000;">05</span>:<span style="color: #000000;">55</span> <span style="color: #000000;">2.761</span> c0d32.obj<br /><span style="color: #000000;">19</span>/<span style="color: #000000;">03</span>/<span style="color: #000000;">2015</span> <span style="color: #000000;">05</span>:<span style="color: #000000;">55</span> <span style="color: #000000;">2.764</span> c0d32w.obj<br /><span style="color: #000000;">19</span>/<span style="color: #000000;">03</span>/<span style="color: #000000;">2015</span> <span style="color: #000000;">05</span>:<span style="color: #000000;">55</span> <span style="color: #000000;">2.670</span> c0d32x.obj<br /><span style="color: #000000;">19</span>/<span style="color: #000000;">03</span>/<span style="color: #000000;">2015</span> <span style="color: #000000;">05</span>:<span style="color: #000000;">55</span> <span style="color: #000000;">2.334</span> c0fmx32.obj<br /><span style="color: #000000;">19</span>/<span style="color: #000000;">03</span>/<span style="color: #000000;">2015</span> <span style="color: #000000;">05</span>:<span style="color: #000000;">55</span> <span style="color: #000000;">2.339</span> c0fmx32w.obj<br /><span style="color: #000000;">19</span>/<span style="color: #000000;">03</span>/<span style="color: #000000;">2015</span> <span style="color: #000000;">05</span>:<span style="color: #000000;">55</span> <span style="color: #000000;">2.305</span> c0w32.obj<br /><span style="color: #000000;">19</span>/<span style="color: #000000;">03</span>/<span style="color: #000000;">2015</span> <span style="color: #000000;">05</span>:<span style="color: #000000;">55</span> <span style="color: #000000;">2.311</span> c0w32w.obj<br /><span style="color: #000000;">19</span>/<span style="color: #000000;">03</span>/<span style="color: #000000;">2015</span> <span style="color: #000000;">05</span>:<span style="color: #000000;">55</span> <span style="color: #000000;">2.282</span> c0x32.obj<br /><span style="color: #000000;">19</span>/<span style="color: #000000;">03</span>/<span style="color: #000000;">2015</span> <span style="color: #000000;">05</span>:<span style="color: #000000;">55</span> <span style="color: #000000;">2.307</span> c0x32w.obj<br /><span style="color: #000000;">19</span>/<span style="color: #000000;">03</span>/<span style="color: #000000;">2015</span> <span style="color: #000000;">05</span>:<span style="color: #000000;">55</span> <span style="color: #000000;">213.504</span> cg32.lib<br /><span style="color: #000000;">19</span>/<span style="color: #000000;">03</span>/<span style="color: #000000;">2015</span> <span style="color: #000000;">05</span>:<span style="color: #000000;">55</span> <span style="color: #000000;">2.560</span> cghelp.lib<br /><span style="color: #000000;">19</span>/<span style="color: #000000;">03</span>/<span style="color: #000000;">2015</span> <span style="color: #000000;">05</span>:<span style="color: #000000;">55</span> <span style="color: #000000;">2.030</span><span style="color: #000000;">.592</span> cp32mt.lib<br /><span style="color: #000000;">19</span>/<span style="color: #000000;">03</span>/<span style="color: #000000;">2015</span> <span style="color: #000000;">05</span>:<span style="color: #000000;">55</span> <span style="color: #000000;">572.928</span> cp32mti.lib<br /><span style="color: #000000;">19</span>/<span style="color: #000000;">03</span>/<span style="color: #000000;">2015</span> <span style="color: #000000;">05</span>:<span style="color: #000000;">55</span> <span style="color: #000000;">1.982</span><span style="color: #000000;">.464</span> cw32.lib<br /><span style="color: #000000;">19</span>/<span style="color: #000000;">03</span>/<span style="color: #000000;">2015</span> <span style="color: #000000;">05</span>:<span style="color: #000000;">55</span> <span style="color: #000000;">561.664</span> cw32i.lib<br /><span style="color: #000000;">19</span>/<span style="color: #000000;">03</span>/<span style="color: #000000;">2015</span> <span style="color: #000000;">05</span>:<span style="color: #000000;">55</span> <span style="color: #000000;">2.037</span><span style="color: #000000;">.760</span> cw32mt.lib<br /><span style="color: #000000;">19</span>/<span style="color: #000000;">03</span>/<span style="color: #000000;">2015</span> <span style="color: #000000;">05</span>:<span style="color: #000000;">55</span> <span style="color: #000000;">570.368</span> cw32mti.lib<br /><span style="color: #000000;">19</span>/<span style="color: #000000;">03</span>/<span style="color: #000000;">2015</span> <span style="color: #000000;">05</span>:<span style="color: #000000;">55</span> <span style="color: #000000;">1.384</span><span style="color: #000000;">.960</span> import32.lib<br /><span style="color: #000000;">19</span>/<span style="color: #000000;">04</span>/<span style="color: #000000;">2018</span> <span style="color: #000000;">12</span>:<span style="color: #000000;">26</span> <DIR> psdk<br /><span style="color: #000000;">19</span>/<span style="color: #000000;">03</span>/<span style="color: #000000;">2015</span> <span style="color: #000000;">05</span>:<span style="color: #000000;">55</span> <span style="color: #000000;">2.048</span> uuid.lib<br /><span style="color: #000000;">19</span>/<span style="color: #000000;">03</span>/<span style="color: #000000;">2015</span> <span style="color: #000000;">05</span>:<span style="color: #000000;">55</span> <span style="color: #000000;">21.504</span> wininet.lib<br /><span style="color: #000000;">19</span>/<span style="color: #000000;">03</span>/<span style="color: #000000;">2015</span> <span style="color: #000000;">05</span>:<span style="color: #000000;">55</span> <span style="color: #000000;">13.312</span> ws2_32.lib<br /> <span style="color: #000000;">22</span> File <span style="color: #000000;">9.415</span><span style="color: #000000;">.737</span> byte<br /> </div>[/code:22r5u76k] |
problem with fw_adoexporttodbf function | Please try to change this part
[code=fw:30memjrj]<div class="fw" id="{CB}" style="font-family: monospace;">echo %bcdir%\lib\c0w32.obj + > b32.bc<br />echo adofuncs.obj + > b32.bc<br />echo main.obj, + >> b32.bc<br /> </div>[/code:30memjrj]
as
[code=fw:30memjrj]<div class="fw" id="{CB}" style="font-family: monospace;">echo %bcdir%\lib\c0w32.obj + > b32.bc<br />echo main.obj + > b32.bc<br />echo adofuncs.obj, + >> b32.bc<br /> </div>[/code:30memjrj] |
problem with fw_adoexporttodbf function | modified and tried, but the same errors remain. Now my b32.bc file has this content:
[code=fw:265mdtiy]<div class="fw" id="{CB}" style="font-family: monospace;">main.obj + <br />adofuncs.obj, + <br />MARGINI.exe, + <br />MARGINI.map, + <br />c:\fwh\lib\Fivehx.lib c:\fwh\lib\FiveHC.lib + <br />c:\xharbour\lib\rtl.lib + <br />c:\xharbour\lib\vm.lib + <br />c:\xharbour\lib\gtgui.lib + <br />c:\xharbour\lib\lang.lib + <br />c:\xharbour\lib\macro.lib + <br />c:\xharbour\lib\rdd.lib + <br />c:\xharbour\lib\dbfntx.lib + <br />c:\xharbour\lib\dbfcdx.lib + <br />c:\xharbour\lib\dbffpt.lib + <br />c:\xharbour\lib\hbsix.lib + <br />c:\xharbour\lib\debug.lib + <br />c:\xharbour\lib\common.lib + <br />c:\xharbour\lib\pp.lib + <br />c:\xharbour\lib\pcrepos.lib + <br />c:\xharbour\lib\ct.lib + <br />c:\xharbour\lib\zlib.lib + <br />c:\xharbour\lib\hbzip.lib + <br />c:\xharbour\lib\libmisc.lib + <br />c:\xharbour\lib\tip.lib + <br />c:\xharbour\lib\png.lib + <br />c:\bcc7\lib\cw32.lib + <br />c:\bcc7\lib\import32.lib + <br />c:\bcc7\lib\uuid.lib + <br />c:\bcc7\lib\ws2_32.lib + <br />c:\bcc7\lib\psdk\odbc32.lib + <br />c:\bcc7\lib\psdk\rasapi32.lib + <br />c:\bcc7\lib\psdk\nddeapi.lib + <br />c:\bcc7\lib\psdk\msimg32.lib + <br />c:\bcc7\lib\psdk\psapi.lib + <br />c:\bcc7\lib\psdk\gdiplus.lib + <br />c:\bcc7\lib\psdk\iphlpapi.lib + <br />c:\bcc7\lib\psdk\shell32.lib, <br />main.res <br /> </div>[/code:265mdtiy] |
problem with fw_adoexporttodbf function | Hello
I'm facing the same issue when I'm trying to attach a .C file to my project
echo ..\..\bcc710\lib\psdk\iphlpapi.lib + >> b32.bc
echo ..\..\bcc710\lib\psdk\shell32.lib, >> b32.bc
IF EXIST demo.res echo demo.res >> b32.bc
..\..\bcc710\bin\ilink32 -Gn -aa -Tpe -s @b32.bc
Turbo Incremental Link 6.72 Copyright (c) 1997-2015 Embarcadero Technologies, Inc.
Error: Unresolved external '___CPPdebugHook' referenced from C:\BCC710\LIB\CW32.LIB|xx
Error: Unresolved external '__hInstance' referenced from C:\BCC710\LIB\CW32.LIB|_fastmm
Error: Unresolved external '___System__GetTls' referenced from C:\BCC710\LIB\CW32.LIB|xxv
Error: Unable to perform link
** error 2 ** deleting demo.exe
C:\demo>if exist demo.exe demo.exe |
problem with fw_adoexporttodbf function | I still have the same unresolved problem today |
problem with fw_adoexporttodbf function | In case you are using the next version immediately after this post, you need not recompile adofuncs.prg. You can use FWH libraries without any change. |
problem with fw_adoexporttodbf function | ok thanks Nages. In other words, I have to buy the updated version today to solve the problem reported here of FW_AdoExportToDbf with SQL field type varchar(max). Is it right? |
problem with fw_adoexporttodbf function | Let us propose another way.
What is the FWH version you are using now? |
problem with fw_adoexporttodbf function | I use FWH rev. 1807 (September 2018) |
problem with fw_adoexporttodbf function | Nages, any solution? Thank you. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.