messages
listlengths
1
1
topic
stringlengths
2
60
[ { "date": "2012-05-23", "forum": "FiveWin for Harbour/xHarbour", "text": "Rick,\n\nThanks for the tip.\n\n\nReinaldo,\n\nI use Danie´s xbrowse sample in tDolphin which goes to an ISP located in USA (sitasoft.net), while I am accessing it from Spain.\n\nIt is inmediate. Very impresive.\n\n\nBut accessing xBrowse with AIS in a server located in Spain but with latency over 40 ms is very very slow.", "time": "15:27", "topic": "Client Server options", "username": "lucasdebeltran" } ]
Client Server options
[ { "date": "2012-05-23", "forum": "FiveWin for Harbour/xHarbour", "text": "Reinaldo, I feel you are a little impolite in your answer to me.\nBest regards,\nOtto", "time": "15:30", "topic": "Client Server options", "username": "Otto" } ]
Client Server options
[ { "date": "2012-05-23", "forum": "FiveWin for Harbour/xHarbour", "text": "Otto;\n\nI think you are right. I'm sorry.\n\n\nReinaldo.", "time": "15:32", "topic": "Client Server options", "username": "reinaldocrespo" } ]
Client Server options
[ { "date": "2012-05-23", "forum": "FiveWin for Harbour/xHarbour", "text": "Lucas,\n\nI'd like to test accessing your .dbf tables in Spain from here. Please send me the connection string (ip, port, path and name of the dd), user and passw to access the DD over AIS. Thank you.\n\n\nReinaldo.", "time": "15:35", "topic": "Client Server options", "username": "reinaldocrespo" } ]
Client Server options
[ { "date": "2012-05-23", "forum": "FiveWin for Harbour/xHarbour", "text": "Reinaldo,\n\nNow I set off the server.\n\nBut you can try Renee Flores sample with their server.\n\nIt is also very very slow:\n<!-- m --><a class=\"postlink\" href=\"http://goo.gl/gsCE8\">http://goo.gl/gsCE8</a><!-- m -->", "time": "15:40", "topic": "Client Server options", "username": "lucasdebeltran" } ]
Client Server options
[ { "date": "2012-05-23", "forum": "FiveWin for Harbour/xHarbour", "text": "Reinaldo, thank you.\nBest regards,\nOtto", "time": "15:47", "topic": "Client Server options", "username": "Otto" } ]
Client Server options
[ { "date": "2012-05-23", "forum": "FiveWin for Harbour/xHarbour", "text": "Reinaldo,\n\nDid you try <!-- m --><a class=\"postlink\" href=\"http://goo.gl/gsCE8\">http://goo.gl/gsCE8</a><!-- m --> ?\n\nThanks.", "time": "16:23", "topic": "Client Server options", "username": "lucasdebeltran" } ]
Client Server options
[ { "date": "2012-05-23", "forum": "FiveWin for Harbour/xHarbour", "text": "Lucas;\n\nSort of. Using arc I created a new dd connection to \\\\ciber-tec.d2g.com:2000\\cursos\\adsdemo\\cibconwn\\stc\\internet.add I connect with username demo and password demo.\n\nOnce connected, the table branch on the connection repository tree will expand showing all available tables. I'm browsing table ABRPOL. It is a dbf/cdx table. It browses ok. Not too bad. However, I noticed that connection to that server (probably in Mexico) is not a fast one. Browsing a different Data Dictionary using ARC on a server in Texas is a lot faster.\n\nI don't know ADO. Rick or Adolfo are better sources on that subject. But since ADO is tailored to work with result sets, I would think it does relatively faster xbrowsing over slow connections.\n\nI can't see how AIS is much slower or faster. The difference between AIS and the remote server is that with AIS communication is encrypted-decrypted at both ends. What I think makes for slow xbrowsing over AIS is the connection speed itself and the fact that xbrowse is terrible with ADS RDDs, even with the Local and/or Remote servers and not just AIS. That's why I would try to test using ARC and the same connection to the same server as bench marks.\n\nI will spend more time trying later. I will reply as soon as I have a chance. Thank you.\n\n\nReinaldo.", "time": "16:51", "topic": "Client Server options", "username": "reinaldocrespo" } ]
Client Server options
[ { "date": "2012-05-23", "forum": "FiveWin for Harbour/xHarbour", "text": "Otto,\n\nWhen I first started working with Harbour/xHarbour (.com ), the options were RDDCDX, Apollo, and ADS. I received a lot of input and elected to use ADS. They publish an excellent White Paper that made a lot of sense to me. For small installs, we can use ADS local and its free. However, I have clients with poorly behaving equipment ( not well maintained, subjected often to malware by the users, etc ), and ADS seemed to be a good safety alternative. So all of my larger installs are told to consider ADS.\n\nMany of my clients exceed 5 workstations. I don't want to play with configuring their systems, and ADS is quick and easy to install. I tell people to start with the Peer to Peer ( LOCAL ), but when they don't like the performance, I give them a 30 day free trial of ADS. No one complains about the price after they see the performance improvement. For example, in an invoicing section, the program opens six .dbf files, with .fpt's and .cdx's, in a filtered mode. WIth peer to peer, this can be slow. With ADS its instantaneous. Since that is the area they spend the most time in each day, they see the performance boost. \n\nMy issue had to do with a resellers account. My account renews in June, and I was one sale short of a free status. Of course that may change before my anniversary date, but they were talking a stiff charge which I was unwilling to pay. That has since been resolved. Other then that issue, I have no problem with ADS.\n\nI do have clients with up to 18 workstations, networked across multiple worksites. \n\nThe cost is relative. My clients might not want to pay the expense, but they can afford it. They just would rather spend the money outside of their business needs ! Also, it can be a one time cost. I have people who spent $ 650 US 8 years ago, for a 5 user license, and they have never upgraded it. They still use it to this day. Thats pretty cheap for a business. \n\nYou have done some very nice work with your product, and have found a multi-user option that fits your clients. I appreciate that work. However, I just didn't see it as the right solution for my clients.\n\nTim", "time": "16:57", "topic": "Client Server options", "username": "TimStone" } ]
Client Server options
[ { "date": "2012-05-23", "forum": "FiveWin for Harbour/xHarbour", "text": "Reinaldo,\n\nPlease, try to use link provided.\n\nIt uses twbrowse.\n\nArc browser is different.\n\nYes, datas appear!!. But very slowly.\n\nI think it is a point that Sybase could improve.\n\nBest regards", "time": "17:00", "topic": "Client Server options", "username": "lucasdebeltran" } ]
Client Server options
[ { "date": "2012-05-23", "forum": "FiveWin for Harbour/xHarbour", "text": "[quote:2s0j9q8y] \"...the fact that xbrowse is terrible with ADS RDDs, even with the Local and/or Remote servers and not just AIS.\"[/quote:2s0j9q8y]\n\nReinaldo,\n\nCould you explain ? I have not been using AIS ( issues with my ISP for testing ) but I do use ADS server ( REMOTE ) mode and my xbrowse implementations are all working quite quickly ( I guess thats a \"real world\" analysis based on what users are actually doing ). I do have some filters in place ( scopes, actually ), and I do use indexed browses, but I have no problems with xbrowse performance in a networked environment.\n\nPerhaps you could clarify this statement.\n\nTim", "time": "17:07", "topic": "Client Server options", "username": "TimStone" } ]
Client Server options
[ { "date": "2012-05-23", "forum": "FiveWin for Harbour/xHarbour", "text": "Lucas;\n\nOk. I just did. Whaoo, it is more than 100 times slower than with ARC. Try with ARC32 you will see it is 100 times faster than the supplied app on the .zip file. \n\nThe question is; why? It is the same AIS (server side), same server (linux, windows, novell? -doesn't matter), same internet connection, same tables, same records. The only thing that's different is the fw component vs a Delphi grid component. \n\nWe need to compare browsing speeds using the same components over the same connections to the same server where the only variable changing is the SQL engine itself. Doing this homework requires time and effort as well as knowledge on both technologies.\n\nBefore bringing this issue to Sybase R+D, we should be prepared to demonstrate that the problem is not xharbour/fw or our components, otherwise we are going to look like fools and they may never take us seriously. Keep in mind they have millions of users using Delphi, .net, php, Java, Pyton, oData web services, and other. AIS speed is not an issue for these users or at least non of them is complaining.\n\nPerhaps we should start by stating a DB schema, then have the tables populated with the same data. Then start testing using the same server. Anyone says \"I\" ? \n\n\nReinaldo.", "time": "17:31", "topic": "Client Server options", "username": "reinaldocrespo" } ]
Client Server options
[ { "date": "2012-05-23", "forum": "FiveWin for Harbour/xHarbour", "text": "Tim;\n\nYes, good question. The problem is not always manifested as it takes a given set of circumstances such as alternate row painting (pijama effect), table size, etc...\n\nHere is a link to that subject as stated by Mr. Rao:\n\n<!-- l --><a class=\"postlink-local\" href=\"http://forums.fivetechsupport.com/viewtopic.php?f=3&t=9343&hilit=why+are+slow+ADS\">viewtopic.php?f=3&t=9343&hilit=why+are+slow+ADS</a><!-- l -->\n\nReinaldo.", "time": "17:33", "topic": "Client Server options", "username": "reinaldocrespo" } ]
Client Server options
[ { "date": "2012-05-23", "forum": "FiveWin for Harbour/xHarbour", "text": "Several years ago, I followed the suggestions and used scopes rather than filters for my xbrowses. Maybe that is why everything works well.\n\nTim", "time": "18:45", "topic": "Client Server options", "username": "TimStone" } ]
Client Server options
[ { "date": "2012-05-23", "forum": "FiveWin for Harbour/xHarbour", "text": "Reinaldo,\n\nThank you very much for your advice and comments.\n\nI will test, because if I solve the problem with xBrowse, ADS will be the right choice.\n\nIt is also strange as Rene´s sample is build with tbrowse, which is faster than xBrowse.\n\nMaybe Mr. Nages could help us.", "time": "20:09", "topic": "Client Server options", "username": "lucasdebeltran" } ]
Client Server options
[ { "date": "2012-05-23", "forum": "FiveWin for Harbour/xHarbour", "text": "Timm,\n\nDo you use xbrowses with AIS over Internet or just in LANS?.\n\nIn LANS they work fast, yes. And filters.", "time": "20:25", "topic": "Client Server options", "username": "lucasdebeltran" } ]
Client Server options
[ { "date": "2012-05-23", "forum": "FiveWin for Harbour/xHarbour", "text": "I want to use them on the internet, but right now I have a server issue ( IP ). I will be exploring this soon.\n\nTim", "time": "20:47", "topic": "Client Server options", "username": "TimStone" } ]
Client Server options
[ { "date": "2012-05-24", "forum": "FiveWin for Harbour/xHarbour", "text": "Hola a todos,\n\nlet me give some opinions about speed.\n\nWhen we use ADO we maintain a data set locally, then this is faster that traditional Harbour RDD approach.\n\nOther question about ARC vs. xBrowse, the problem is the xBrowse implementation, it refresh all the data many times for every event, it retrieve the same data showed in the page for every move event, maybe we can improve it adding caching capabilities \n\nsorry for may good english\n\nRegards\n\nMarcelo", "time": "04:54", "topic": "Client Server options", "username": "Marcelo Via Giglio" } ]
Client Server options
[ { "date": "2012-05-24", "forum": "FiveWin for Harbour/xHarbour", "text": "Reinaldo,\n\nThis is the code i am using:\n\n[code=fw:1svq9pou]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><span style=\"color: #00C800;\">function</span> Test_SQL<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">LOCAL</span> cSql &nbsp; := <span style=\"color: #ff0000;\">\"\"</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">LOCAL</span> aArray := <span style=\"color: #000000;\">&#123;</span><span style=\"color: #000000;\">&#125;</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">LOCAL</span> cAlias := <span style=\"color: #0000ff;\">Alias</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br /><br /><br /><br />&nbsp; &nbsp;<span style=\"color: #B900B9;\">/*al inicio de la instruccion sql se define un area vacia*/</span><br />&nbsp; &nbsp;DBSelectArea<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">0</span><span style=\"color: #000000;\">&#41;</span><br /><br /><br />&nbsp; &nbsp;<span style=\"color: #B900B9;\">/*se define instruccion sql en una cadena de texto*/</span><br />&nbsp; &nbsp;cSql := <span style=\"color: #ff0000;\">\"SELECT * FROM CUSTOMER\"</span><br />&nbsp; &nbsp;<span style=\"color: #0000ff;\">msgINFO</span><span style=\"color: #000000;\">&#40;</span>csql, <span style=\"color: #ff0000;\">\"cSql\"</span><span style=\"color: #000000;\">&#41;</span><br /><br /><br />&nbsp; &nbsp;<span style=\"color: #B900B9;\">/*crea instruccion sql y pasa los datos a tabla temporal*/</span><br />&nbsp; &nbsp;ADSCreateSQLStatement<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"REPTMP\"</span>, <span style=\"color: #000000;\">2</span> <span style=\"color: #000000;\">&#41;</span><br /><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">IF</span> ADSExecuteSQLDirect<span style=\"color: #000000;\">&#40;</span> cSql <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; DBSelectArea<span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"REPTMP\"</span><span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; REPTMP-><span style=\"color: #000000;\">&#40;</span> DBGoTop<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span><br /><br /><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">IF</span> LastRec<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> > <span style=\"color: #000000;\">0</span> &nbsp;<span style=\"color: #B900B9;\">// !REPTMP->( Eof() )</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #B900B9;\">/*lista resultado en tabla*/</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #0000ff;\">xbrowse</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #B900B9;\">//aArray := FW_DbfToArray()</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #B900B9;\">//XBROWSER aArray</span><br /><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">ELSE</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #B900B9;\">/*no se encontro datos que cumpla condicion sql*/</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #0000ff;\">MsgInfo</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"No se ha encontrado REGISTROS\"</span> <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">ENDIF</span><br /><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #B900B9;\">/*cierra tabla de datos temporal*/</span><br />&nbsp; &nbsp; &nbsp; REPTMP-><span style=\"color: #000000;\">&#40;</span> DBCloseArea<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span><br /><br /><br /><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">ELSE</span><br /><br />&nbsp; &nbsp; &nbsp; Alert<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"AdsExecuteSQLDirect() failed with error \"</span>+ Str<span style=\"color: #000000;\">&#40;</span> ADSGetLastError<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span><br /><br /><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">ENDIF</span><br /><br /><br /><br />&nbsp; &nbsp;<span style=\"color: #B900B9;\">/*se selecciona area de datos anterior*/</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">IF</span> !Empty<span style=\"color: #000000;\">&#40;</span>cAlias<span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; DBSelectArea<span style=\"color: #000000;\">&#40;</span>cAlias<span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">ENDIF</span><br /><br />&nbsp; &nbsp;<span style=\"color: #B900B9;\">/*da foco al browse*/</span><br /><br /><br /><span style=\"color: #00C800;\">RETURN</span> <span style=\"color: #00C800;\">NIL</span><br />&nbsp;</div>[/code:1svq9pou]\n\n\nThis is my fastest approach.\n\nPlease, any suggestions?.\n\n\nUsing FW_DbfToArray() take more time than above code.\n\n\nThank you very much. Best regards", "time": "20:53", "topic": "Client Server options", "username": "lucasdebeltran" } ]
Client Server options
[ { "date": "2012-05-24", "forum": "FiveWin for Harbour/xHarbour", "text": "Lucas;\n\nRead Marcelo's comment. He is right on the money. You have to start by re-writing xbrowse, or use a grid component from a 3rd party specially made to manage sql result sets, or try with ADO. I think that ADO should work with any sql engine including ADS.\n\nBest regards,\n\n\nReinaldo.", "time": "20:59", "topic": "Client Server options", "username": "reinaldocrespo" } ]
Client Server options
[ { "date": "2012-05-24", "forum": "FiveWin for Harbour/xHarbour", "text": "Reinaldo,\n\nYes, the problem is that xBrowse evaluates too many times all events.\n\nIn fact, in local mode sometimes is slow, the more using ADS.\n\nDo you know any 3rd grid that works with Fivewin?,", "time": "21:04", "topic": "Client Server options", "username": "lucasdebeltran" } ]
Client Server options
[ { "date": "2012-05-24", "forum": "FiveWin for Harbour/xHarbour", "text": "lucas\n\nYou can still use the original Listbox class with Sql or .dbf .. here is a sql example with ADO. You will need to write your own skipper() like the one below.\n\nRick\n\n[code=fw:2bcdgsln]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br />oRsDEP:= TOleAuto<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>:<span style=\"color: #00C800;\">New</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"ADODB.Recordset\"</span> <span style=\"color: #000000;\">&#41;</span><br />oRsDEP:<span style=\"color: #000000;\">CursorType</span> &nbsp; &nbsp; := <span style=\"color: #000000;\">1</span> &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #B900B9;\">// opendkeyset</span><br />oRsDEP:<span style=\"color: #000000;\">CursorLocation</span> := <span style=\"color: #000000;\">3</span> &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #B900B9;\">// local cache</span><br />oRsDEP:<span style=\"color: #000000;\">LockType</span> &nbsp; &nbsp; &nbsp; := <span style=\"color: #000000;\">3</span> &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #B900B9;\">// lockoportunistic</span><br /><br />cSQL := <span style=\"color: #ff0000;\">\"SELECT * FROM FREQUENCY order by FREQUENCY\"</span><br /><br /><span style=\"color: #00C800;\">TRY</span><br />&nbsp; &nbsp;oRsDEP:<span style=\"color: #000000;\">Open</span><span style=\"color: #000000;\">&#40;</span> cSQL,xCONNECT <span style=\"color: #000000;\">&#41;</span><br />CATCH oErr<br />&nbsp; &nbsp;<span style=\"color: #0000ff;\">MsgInfo</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"Error in Opening FREQUENCY table\"</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">RETURN</span><span style=\"color: #000000;\">&#40;</span>.F.<span style=\"color: #000000;\">&#41;</span><br />END <span style=\"color: #00C800;\">TRY</span><br /><br /><span style=\"color: #00C800;\">Do</span> <span style=\"color: #00C800;\">Case</span><br /><span style=\"color: #00C800;\">Case</span> nType = <span style=\"color: #000000;\">1</span><br />&nbsp; &nbsp; <span style=\"color: #00C800;\">IF</span> EMPTY<span style=\"color: #000000;\">&#40;</span> zFrequency <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;zFrequency := <span style=\"color: #ff0000;\">\"BOGUS\"</span><br />&nbsp; &nbsp; <span style=\"color: #00C800;\">ENDIF</span><br /><span style=\"color: #00C800;\">Case</span> nType = <span style=\"color: #000000;\">2</span><br />&nbsp; &nbsp; <span style=\"color: #00C800;\">IF</span> EMPTY<span style=\"color: #000000;\">&#40;</span> zT_Freq <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;zT_Freq := <span style=\"color: #ff0000;\">\"BOGUS\"</span><br />&nbsp; &nbsp; <span style=\"color: #00C800;\">ENDIF</span><br />End <span style=\"color: #00C800;\">Case</span><br /><br />*cNAME := UPPER<span style=\"color: #000000;\">&#40;</span>ALLTRIM<span style=\"color: #000000;\">&#40;</span>cNAME<span style=\"color: #000000;\">&#41;</span><span style=\"color: #000000;\">&#41;</span><br /><br /><span style=\"color: #00C800;\">IF</span> oRsDep:<span style=\"color: #000000;\">eof</span><br /><span style=\"color: #00C800;\">ELSE</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">IF</span> .not. oRsDEP:<span style=\"color: #000000;\">eof</span><br />&nbsp; &nbsp; &nbsp; oRsDEP:<span style=\"color: #000000;\">MoveFirst</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">ENDIF</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> nType = <span style=\"color: #000000;\">1</span><br />&nbsp; &nbsp; &nbsp; &nbsp; oRsDEP:<span style=\"color: #000000;\">Find</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"FREQUENCY LIKE '\"</span>+upper<span style=\"color: #000000;\">&#40;</span>alltrim<span style=\"color: #000000;\">&#40;</span>zFrequency<span style=\"color: #000000;\">&#41;</span><span style=\"color: #000000;\">&#41;</span>+<span style=\"color: #ff0000;\">\"%'\"</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">Case</span> nType = <span style=\"color: #000000;\">2</span><br />&nbsp; &nbsp; &nbsp; &nbsp; oRsDEP:<span style=\"color: #000000;\">Find</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"FREQUENCY LIKE '\"</span>+upper<span style=\"color: #000000;\">&#40;</span>alltrim<span style=\"color: #000000;\">&#40;</span>zT_Freq<span style=\"color: #000000;\">&#41;</span><span style=\"color: #000000;\">&#41;</span>+<span style=\"color: #ff0000;\">\"%'\"</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;End <span style=\"color: #00C800;\">Case</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">IF</span> oRsDEP:<span style=\"color: #000000;\">eof</span><br />&nbsp; &nbsp; &nbsp; oRsDEP:<span style=\"color: #000000;\">MoveFirst</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">ENDIF</span><br /><span style=\"color: #00C800;\">ENDIF</span><br /><br />lOK2 := .F.<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;\">\"FREQSLCT\"</span> &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #0000ff;\">COLOR</span> <span style=\"color: #ff0000;\">\"W+/W\"</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #0000ff;\">TITLE</span> <span style=\"color: #ff0000;\">\"Frequency Select\"</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;<br /><br />&nbsp; &nbsp;<span style=\"color: #0000ff;\">REDEFINE</span> <span style=\"color: #0000ff;\">LISTBOX</span> oLBX FIELDS &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp;<span style=\"color: #00C800;\">IF</span><span style=\"color: #000000;\">&#40;</span>oRsDep:<span style=\"color: #000000;\">eof</span>,<span style=\"color: #ff0000;\">\" &nbsp; \"</span>,oRsDep:<span style=\"color: #000000;\">Fields</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"FREQUENCY\"</span><span style=\"color: #000000;\">&#41;</span>:<span style=\"color: #000000;\">Value</span><span style=\"color: #000000;\">&#41;</span>;<br />&nbsp; &nbsp; &nbsp;HEADERS <span style=\"color: #ff0000;\">\"Frequency\"</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp;SIZES <span style=\"color: #000000;\">90</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp;<span style=\"color: #0000ff;\">ID</span> <span style=\"color: #000000;\">111</span> <span style=\"color: #0000ff;\">of</span> oDlg &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp;<span style=\"color: #0000ff;\">UPDATE</span><br /><br />&nbsp; &nbsp;<span style=\"color: #0000ff;\">REDEFINE</span> <span style=\"color: #0000ff;\">BUTTON</span> oBTN1 <span style=\"color: #0000ff;\">ID</span> <span style=\"color: #000000;\">113</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #0000ff;\">ACTION</span> <span style=\"color: #000000;\">&#40;</span> <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">&#40;</span>nTYPE = <span style=\"color: #000000;\">1</span>, zFREQUENCY := oRsDep:<span style=\"color: #000000;\">Fields</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"FREQUENCY\"</span><span style=\"color: #000000;\">&#41;</span>:<span style=\"color: #000000;\">Value</span>, <span style=\"color: #000000;\">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">&#40;</span>nTYPE = <span style=\"color: #000000;\">1</span>, zFREQUENCYEID := oRsDep:<span style=\"color: #000000;\">Fields</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"FREQUENCYEID\"</span><span style=\"color: #000000;\">&#41;</span>:<span style=\"color: #000000;\">Value</span>, <span style=\"color: #000000;\">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">&#40;</span>nTYPE = <span style=\"color: #000000;\">2</span>, zT_FREQ := oRsDep:<span style=\"color: #000000;\">Fields</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"FREQUENCY\"</span><span style=\"color: #000000;\">&#41;</span>:<span style=\"color: #000000;\">Value</span>, <span style=\"color: #000000;\">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">&#40;</span>nTYPE = <span style=\"color: #000000;\">2</span>, zT_FREQEID := oRsDep:<span style=\"color: #000000;\">Fields</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"FREQUENCYEID\"</span><span style=\"color: #000000;\">&#41;</span>:<span style=\"color: #000000;\">Value</span>, <span style=\"color: #000000;\">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lOK2 := .T.,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oOBJ:<span style=\"color: #0000ff;\">Refresh</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>, &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oLbx:<span style=\"color: #0000ff;\">ReFresh</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oDlg:<span style=\"color: #000000;\">END</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;<span style=\"color: #0000ff;\">REDEFINE</span> <span style=\"color: #0000ff;\">BUTTON</span> oBTN2 <span style=\"color: #0000ff;\">ID</span> <span style=\"color: #000000;\">112</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #0000ff;\">ACTION</span> <span style=\"color: #000000;\">&#40;</span> lOK2 := .F., oDlg:<span style=\"color: #000000;\">END</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;<span style=\"color: #0000ff;\">REDEFINE</span> <span style=\"color: #0000ff;\">BUTTON</span> oBTN3 <span style=\"color: #0000ff;\">ID</span> <span style=\"color: #000000;\">114</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #0000ff;\">ACTION</span> <span style=\"color: #000000;\">&#40;</span> _FreqView<span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"A\"</span>, oRsDep <span style=\"color: #000000;\">&#41;</span>, &nbsp; &nbsp; ; &nbsp; &nbsp; <span style=\"color: #B900B9;\">// depview.prg</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">&#40;</span>oRsDep:<span style=\"color: #000000;\">eof</span>, ,oLBX:<span style=\"color: #000000;\">bLogicLen</span> := <span style=\"color: #000000;\">&#123;</span> || oRsDep:<span style=\"color: #000000;\">RecordCount</span> <span style=\"color: #000000;\">&#125;</span><span style=\"color: #000000;\">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">&#40;</span>oRsDep:<span style=\"color: #000000;\">eof</span>, ,oLBX:<span style=\"color: #000000;\">bGoTop</span> &nbsp; &nbsp;:= <span style=\"color: #000000;\">&#123;</span> || oRsDep:<span style=\"color: #000000;\">MoveFirst</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#125;</span><span style=\"color: #000000;\">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">&#40;</span>oRsDep:<span style=\"color: #000000;\">eof</span>, ,oLBX:<span style=\"color: #000000;\">bGoBottom</span> := <span style=\"color: #000000;\">&#123;</span> || oRsDep:<span style=\"color: #000000;\">MoveLast</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#125;</span><span style=\"color: #000000;\">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">&#40;</span>oRsDep:<span style=\"color: #000000;\">eof</span>, ,oLBX:<span style=\"color: #000000;\">bSkip</span> &nbsp; &nbsp; := <span style=\"color: #000000;\">&#123;</span> | nSkip | Skipper<span style=\"color: #000000;\">&#40;</span> oRsDep, nSkip <span style=\"color: #000000;\">&#41;</span><span style=\"color: #000000;\">&#125;</span><span style=\"color: #000000;\">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">&#40;</span>oRsDep:<span style=\"color: #000000;\">eof</span>, ,oLBX:<span style=\"color: #000000;\">cAlias</span> &nbsp; &nbsp;:= <span style=\"color: #ff0000;\">\"ARRAY\"</span><span style=\"color: #000000;\">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oLBX:<span style=\"color: #0000ff;\">ReFresh</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oLBX:<span style=\"color: #000000;\">SetFocus</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SysReFresh<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp; <span style=\"color: #00C800;\">IF</span> .not. oRsDep:<span style=\"color: #000000;\">eof</span><br />&nbsp; &nbsp; &nbsp; &nbsp;oLbx:<span style=\"color: #000000;\">bLogicLen</span> := <span style=\"color: #000000;\">&#123;</span> || oRsDEP:<span style=\"color: #000000;\">RecordCount</span> <span style=\"color: #000000;\">&#125;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;oLbx:<span style=\"color: #000000;\">bGoTop</span> &nbsp; &nbsp;:= <span style=\"color: #000000;\">&#123;</span> || oRsDEP:<span style=\"color: #000000;\">MoveFirst</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#125;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;oLbx:<span style=\"color: #000000;\">bGoBottom</span> := <span style=\"color: #000000;\">&#123;</span> || oRsDEP:<span style=\"color: #000000;\">MoveLast</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#125;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;oLbx:<span style=\"color: #000000;\">bSkip</span> &nbsp; &nbsp; := <span style=\"color: #000000;\">&#123;</span> | nSkip | Skipper<span style=\"color: #000000;\">&#40;</span> oRsDEP, nSkip <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#125;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;oLbx:<span style=\"color: #000000;\">cAlias</span> &nbsp; &nbsp;:= <span style=\"color: #ff0000;\">\"ARRAY\"</span><br />&nbsp; &nbsp; <span style=\"color: #00C800;\">ENDIF</span><br /><br /><span style=\"color: #0000ff;\">ACTIVATE</span> <span style=\"color: #0000ff;\">DIALOG</span> oDlg ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #0000ff;\">ON</span> <span style=\"color: #0000ff;\">INIT</span> <span style=\"color: #000000;\">&#40;</span> <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">&#40;</span> xSUPER = <span style=\"color: #ff0000;\">'Y'</span>, ,oBtn3:<span style=\"color: #000000;\">Hide</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span><br /><br />oRsDEP:<span style=\"color: #000000;\">CLose</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br /><span style=\"color: #00C800;\">IF</span> lOK2 = .F.<br />&nbsp; &nbsp;<span style=\"color: #00C800;\">DO</span> <span style=\"color: #00C800;\">CASE</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">CASE</span> nTYPE = <span style=\"color: #000000;\">1</span><br />&nbsp; &nbsp; &nbsp; zFREQUENCY &nbsp; &nbsp;:= SPACE<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">10</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; zFREQUENCYEID := <span style=\"color: #ff0000;\">\"BOGUS\"</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">CASE</span> nTYPE = <span style=\"color: #000000;\">2</span><br />&nbsp; &nbsp; &nbsp; zT_FREQ &nbsp; &nbsp; &nbsp; := SPACE<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">10</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; zT_FREQEID &nbsp; &nbsp;:= <span style=\"color: #ff0000;\">\"BOGUS\"</span><br />&nbsp; &nbsp; <span style=\"color: #00C800;\">ENDCASE</span><br />&nbsp; &nbsp;oOBJ:<span style=\"color: #0000ff;\">ReFresh</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><span style=\"color: #00C800;\">ENDIF</span><br /><br />SysReFresh<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> .T. <span style=\"color: #000000;\">&#41;</span><br /><br /><span style=\"color: #B900B9;\">//-------------------------------</span><br /><span style=\"color: #00C800;\">STATIC</span> <span style=\"color: #00C800;\">FUNCTION</span> SKIPPER<span style=\"color: #000000;\">&#40;</span> oRsx, nSkip <span style=\"color: #000000;\">&#41;</span><br /><br /><span style=\"color: #00C800;\">LOCAL</span> nRec := oRsx:<span style=\"color: #000000;\">AbsolutePosition</span><br /><br />oRsx:<span style=\"color: #0000ff;\">Move</span><span style=\"color: #000000;\">&#40;</span> nSkip <span style=\"color: #000000;\">&#41;</span><br /><br /><span style=\"color: #00C800;\">IF</span> oRsx:<span style=\"color: #000000;\">EOF</span>; oRsx:<span style=\"color: #000000;\">MoveLast</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>; <span style=\"color: #00C800;\">ENDIF</span><br /><span style=\"color: #00C800;\">IF</span> oRsx:<span style=\"color: #000000;\">BOF</span>; oRsx:<span style=\"color: #000000;\">MoveFirst</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>; <span style=\"color: #00C800;\">ENDIF</span><br /><br /><span style=\"color: #00C800;\">RETURN</span><span style=\"color: #000000;\">&#40;</span> oRsx:<span style=\"color: #000000;\">AbsolutePosition</span> - nRec <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp;</div>[/code:2bcdgsln]", "time": "21:15", "topic": "Client Server options", "username": "Rick Lipkin" } ]
Client Server options
[ { "date": "2012-05-25", "forum": "FiveWin for Harbour/xHarbour", "text": "Hi Carles,\n\nThanks for reply.\n\n[quote:1j96hqjd]Can you use your ADS in xBrowse as an RDD more? Of course your can do it, but I do not think is the best way. I think the best is to create query, load and manage data in internal tables, and finally to work in some browse, no matter wich of them.[/quote:1j96hqjd]\n\nSo that´s that does my code but the performance is not as good as TDolphin.\n\nMaybe I miss something?.\n\nRick, thank you about ADO. I will check it.\n\n\nThanks.", "time": "10:31", "topic": "Client Server options", "username": "lucasdebeltran" } ]
Client Server options
[ { "date": "2012-05-25", "forum": "FiveWin for Harbour/xHarbour", "text": "Hi,\n\nCan you use your ADS in xBrowse as an RDD more? Of course your can do it, but I do not think is the best way. I think the best is to create query, load and manage data in internal tables, and finally to work in some browse, no matter wich of them. Then modify all records processed. It is a system change, but ultimately offset by the performance.\n\nThis is the philosophy SQL, and it's true that you can work also as a RDD, but I think it is the best solution.\n\nYou too can handle data with typical command of xBase (skip, goTop, ...) join with SQL commands and this does not alter the way we work, but maybe you need to change the way to do with the browser, no matter which of them.\n\nJust my humble opinion <!-- s:D --><img src=\"{SMILIES_PATH}/icon_biggrin.gif\" alt=\":D\" title=\"Very Happy\" /><!-- s:D -->", "time": "07:30", "topic": "Client Server options", "username": "Carles" } ]
Client Server options
[ { "date": "2012-05-25", "forum": "FiveWin for Harbour/xHarbour", "text": "Reinaldo,\n\nHere is a working sample:\n\n[code=fw:3gjfoa5h]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><span style=\"color: #B900B9;\">// Harbour Advantage RDD sample</span><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;\">\"ads.ch\"</span><br /><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">\"xbrowse.ch\"</span><br /><br />Request ADS,ADSKeyCount,ADSKeyNo,OrdKeyCount,OrdKeyNo, AdsGetRelKeyPos, AdsSetRelKeyPos<br /><br /><span style=\"color: #B900B9;\">//----------------------------------------------------------------------------//</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> aArray := <span style=\"color: #000000;\">&#123;</span><span style=\"color: #000000;\">&#125;</span>, cDbf, i<br /><br />     <span style=\"color: #00C800;\">local</span> nInicio, nFinal<br /><br />     <span style=\"color: #00C800;\">local</span> lCopy := .F.<br /><br /><br /><br />     <span style=\"color: #B900B9;\">// Driver CDX----------------------------------------------------------------</span><br />     REQUEST DBFCDX, DBFFPT<br /><br /><br />     RddRegister<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"ADS\"</span>, <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">&#41;</span><br />     RddSetDefault<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"ADS\"</span> <span style=\"color: #000000;\">&#41;</span><br /><br />     <span style=\"color: #B900B9;\">//setting up server type</span><br />     <span style=\"color: #B900B9;\">// 1 = Local Server (no client / server)</span><br />     <span style=\"color: #B900B9;\">// 2 = Remote Server</span><br />     <span style=\"color: #B900B9;\">// 3 = Local + Remot</span><br />     <span style=\"color: #B900B9;\">// 4 = Internet Server</span><br />     <span style=\"color: #B900B9;\">// 5 = Local + Internet</span><br />     <span style=\"color: #B900B9;\">// 6 = Remote+Internet</span><br />     <span style=\"color: #B900B9;\">// 7 = Local + Remote + Internet , best choice</span><br />     adsSetServerType<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">4</span> <span style=\"color: #000000;\">&#41;</span>  <span style=\"color: #B900B9;\">// ó  adsSetServerType( ADS_REMOTE_SERVER )</span><br /><br />     <span style=\"color: #B900B9;\">//setting up the file types</span><br />     <span style=\"color: #B900B9;\">// 1 = DBFNTX</span><br />     <span style=\"color: #B900B9;\">// 2 = DBFCDX</span><br />     <span style=\"color: #B900B9;\">// 3 = ADSADI</span><br />     adsSetFileType<span style=\"color: #000000;\">&#40;</span> ADS_CDX <span style=\"color: #000000;\">&#41;</span>  <span style=\"color: #B900B9;\">// o ADS_CDX</span><br /><br />     AdsRightsCheck<span style=\"color: #000000;\">&#40;</span>.F.<span style=\"color: #000000;\">&#41;</span><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />   <span style=\"color: #00C800;\">IF</span> AdsConnect60<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"<span style=\"color: #000000;\">\\\\</span>189.228.227.218:2000<span style=\"color: #000000;\">\\c</span>ursos<span style=\"color: #000000;\">\\a</span>dsdemo<span style=\"color: #000000;\">\\c</span>ibconwn<span style=\"color: #000000;\">\\s</span>tc<span style=\"color: #000000;\">\\i</span>nternet.add\"</span>, <span style=\"color: #000000;\">4</span>,<span style=\"color: #ff0000;\">\"demo\"</span>,<span style=\"color: #ff0000;\">\"demo\"</span><span style=\"color: #000000;\">&#41;</span><br /><br /><br />       <span style=\"color: #0000ff;\">MsgInfo</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"Esta ahora conectado al Sevidor AIS de Cibertec en Mexico \"</span>+CRLF+CRLF+;<br />        <span style=\"color: #ff0000;\">\"You are now connected to AIS Server\"</span>,<span style=\"color: #ff0000;\">\"Bienvenido / Welcome / Versión \"</span>+ADSVersion<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><span style=\"color: #000000;\">&#41;</span><br /><br /><br /><br />   <span style=\"color: #00C800;\">ELSE</span><br /><br />      MsgStop<span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"Se ha rechazado la conexión al servidor AIS, por favor intente mas tarde\"</span>+CRLF+CRLF+;<br />         <span style=\"color: #ff0000;\">\"Conection to AIS Server rejected, please, try again later\"</span>,<span style=\"color: #ff0000;\">\"AIS Error\"</span><span style=\"color: #000000;\">&#41;</span><br />      QUIT<br /><br />   <span style=\"color: #00C800;\">ENDIF</span><br /><br /><br /><br /><br />   USE CATCUE SHARED <span style=\"color: #00C800;\">NEW</span> <span style=\"color: #0000ff;\">ALIAS</span> <span style=\"color: #ff0000;\">\"DATOS\"</span><br />   DATOS-><span style=\"color: #000000;\">&#40;</span>AdsCacheRecords<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">50</span><span style=\"color: #000000;\">&#41;</span><span style=\"color: #000000;\">&#41;</span><br />   DATOS-><span style=\"color: #000000;\">&#40;</span>OrdSetFocus<span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"NUMCUENTA\"</span><span style=\"color: #000000;\">&#41;</span><span style=\"color: #000000;\">&#41;</span><br />   DATOS-><span style=\"color: #000000;\">&#40;</span>DBGOTOP<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><span style=\"color: #000000;\">&#41;</span><br /><br /><br />   sysrefresh<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br /><br /><br /><br /><br /><br />   nInicio := seconds<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br />   aArray := FW_DbfToArray<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br />   nfinal := seconds<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />   msgalert<span style=\"color: #000000;\">&#40;</span>nFinal-nInicio, <span style=\"color: #ff0000;\">\" DURACION de carga Array \"</span><span style=\"color: #000000;\">&#41;</span><br /><br /><br /><br /><br /><br /><br /><br />   nInicio := seconds<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br />   COPY <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #ff0000;\">\"RENE.DBF\"</span> VIA <span style=\"color: #ff0000;\">\"DBFCDX\"</span><br /><br />   nfinal := seconds<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />   msgalert<span style=\"color: #000000;\">&#40;</span>nFinal-nInicio, <span style=\"color: #ff0000;\">\" TIME CopyTable \"</span><span style=\"color: #000000;\">&#41;</span><br /><br /><br /><br /><br />   XBROWSER aArray<br /><br />   dbcloseall<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />   quit<br /><br /><span style=\"color: #00C800;\">return</span> <span style=\"color: #00C800;\">nil</span><br /><br /><span style=\"color: #B900B9;\">//----------------------------------------------------------------------------//</span></div>[/code:3gjfoa5h]\n\n\nIt takes up to 10 seconds to load into the Array or copy file.\n\nIt is not very good performance.\n\nAny clue?.\n\nThanks", "time": "22:43", "topic": "Client Server options", "username": "lucasdebeltran" } ]
Client Server options
[ { "date": "2012-05-25", "forum": "FiveWin for Harbour/xHarbour", "text": "So, you're bringing a whole .dbf across the wire and you are asking why is it slow? Don't bring a whole table across the wire. That's the easy answer. The question should be, why are you bringing a whole .dbf table across the wire? The speed at which a table comes across a wire, depends on the speed of the wire.\n\nI don't know what problem you are trying to solve. Maybe you need synchronized local copies of a remote table, if so then maybe you should read about ADS replication. \n\nAgain, so far everything I see from your code does not show a problem with AIS. It only shows a problem with what you are trying to do with it. I'm sorry I can't help you.\n\nBest regards,\n\n\nReinaldo.", "time": "23:00", "topic": "Client Server options", "username": "reinaldocrespo" } ]
Client Server options
[ { "date": "2012-05-26", "forum": "FiveWin for Harbour/xHarbour", "text": "Reinaldo,\n\nI need to browse the full table. That´s what my software does and my customer except. I can´t just eliminate the browse to solve the problem.\n\nI tested with ADS in two samples posted -last one using COPY TO LOCAL VIA \"DBFCDX\" and AdsCreateSQL...-. In both cases, the performance is very very bad. Maybe I am losing a third way.\n\nAlso, my settings in ADS.INI are (thanks to Francis advice):\n\n[Settings]\nCOMPRESSION = Always\nUSE_TCP_IP = 1\nPACKET_SIZE = 1024 //;or 1024 O 512\n\n\nWithout them, it takes 2 seconds more to accomplish the task.\n\n\nBut with Daniel´s TDolphin I can browse the full table almost [u:2nlyc370][b:2nlyc370]inmediate [/b:2nlyc370][/u:2nlyc370](yes, the full table over the wire!!!).\n\nSo the real point is that there is an important problem with performance with ADS and Harbour. This is the real point.", "time": "10:59", "topic": "Client Server options", "username": "lucasdebeltran" } ]
Client Server options
[ { "date": "2012-05-28", "forum": "FiveWin for Harbour/xHarbour", "text": "lucas si usa sql en ads intenta realizar la instruccion pidiendo un cursos estatico el cual te muestra los datos inmediato\nejemplo\n[code=fw:11d9i7ys]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /><span style=\"color: #0000ff;\">select</span> <span style=\"color: #000000;\">&#123;</span><span style=\"color: #00C800;\">static</span><span style=\"color: #000000;\">&#125;</span> codigo, nombre <span style=\"color: #0000ff;\">from</span> clientes<br />&nbsp;</div>[/code:11d9i7ys]\ncuando no se agrega {static} el cursor enviado por l servidor esta vivo y este toma mas tiempo mostrarse en un browse.\n\nsalu2\ncarlos vargas", "time": "03:29", "topic": "Client Server options", "username": "carlos vargas" } ]
Client Server options
[ { "date": "2012-05-28", "forum": "FiveWin for Harbour/xHarbour", "text": "Carlos,\n\nMany thanks.\n\nWith your great tip, I noticed an important increase of speed. Very very good.\n\nNow the performance is much better with xBrowse.\n\nBut it also takes up to 30 seconds to load the table into the array. If I load the table in local mode the process takes 0.5 segs.", "time": "12:51", "topic": "Client Server options", "username": "lucasdebeltran" } ]
Client Server options
[ { "date": "2012-05-28", "forum": "FiveWin for Harbour/xHarbour", "text": "Carlos,\n\nY en mi ejemplo, si necesito refrescar los datos del DBF temporal creado por ADS con el resultado de la consulta, ¿debo repetir la operación o hay algo parecido a un Refresh() del ADSExecuteSQLDirect( cSql )?.\n\nMuchas gracias.\n[code=fw:1xgx4ool]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><span style=\"color: #00C800;\">function</span> Test_SQL<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">LOCAL</span> cSql &nbsp; := <span style=\"color: #ff0000;\">\"\"</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">LOCAL</span> aArray := <span style=\"color: #000000;\">&#123;</span><span style=\"color: #000000;\">&#125;</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">LOCAL</span> cAlias := <span style=\"color: #0000ff;\">Alias</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br /><br /><br /><br />&nbsp; &nbsp;<span style=\"color: #B900B9;\">/*al inicio de la instruccion sql se define un area vacia*/</span><br />&nbsp; &nbsp;DBSelectArea<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">0</span><span style=\"color: #000000;\">&#41;</span><br /><br /><br />&nbsp; &nbsp;<span style=\"color: #B900B9;\">/*se define instruccion sql en una cadena de texto*/</span><br />&nbsp; &nbsp;cSql := <span style=\"color: #ff0000;\">\"SELECT {static} * FROM CUSTOMER\"</span><br />&nbsp; &nbsp;<span style=\"color: #0000ff;\">msgINFO</span><span style=\"color: #000000;\">&#40;</span>csql, <span style=\"color: #ff0000;\">\"cSql\"</span><span style=\"color: #000000;\">&#41;</span><br /><br /><br />&nbsp; &nbsp;<span style=\"color: #B900B9;\">/*crea instruccion sql y pasa los datos a tabla temporal*/</span><br />&nbsp; &nbsp;ADSCreateSQLStatement<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"REPTMP\"</span>, <span style=\"color: #000000;\">2</span> <span style=\"color: #000000;\">&#41;</span><br /><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">IF</span> ADSExecuteSQLDirect<span style=\"color: #000000;\">&#40;</span> cSql <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; DBSelectArea<span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"REPTMP\"</span><span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; REPTMP-><span style=\"color: #000000;\">&#40;</span> DBGoTop<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span><br /><br /><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">IF</span> LastRec<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> > <span style=\"color: #000000;\">0</span> &nbsp;<span style=\"color: #B900B9;\">// !REPTMP->( Eof() )</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #B900B9;\">/*lista resultado en tabla*/</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #0000ff;\">xbrowse</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #B900B9;\">//aArray := FW_DbfToArray()</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #B900B9;\">//XBROWSER aArray</span><br /><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">ELSE</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #B900B9;\">/*no se encontro datos que cumpla condicion sql*/</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #0000ff;\">MsgInfo</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"No se ha encontrado REGISTROS\"</span> <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">ENDIF</span><br /><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #B900B9;\">/*cierra tabla de datos temporal*/</span><br />&nbsp; &nbsp; &nbsp; REPTMP-><span style=\"color: #000000;\">&#40;</span> DBCloseArea<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span><br /><br /><br /><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">ELSE</span><br /><br />&nbsp; &nbsp; &nbsp; Alert<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"AdsExecuteSQLDirect() failed with error \"</span>+ Str<span style=\"color: #000000;\">&#40;</span> ADSGetLastError<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span><br /><br /><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">ENDIF</span><br /><br /><br /><br />&nbsp; &nbsp;<span style=\"color: #B900B9;\">/*se selecciona area de datos anterior*/</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">IF</span> !Empty<span style=\"color: #000000;\">&#40;</span>cAlias<span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; DBSelectArea<span style=\"color: #000000;\">&#40;</span>cAlias<span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">ENDIF</span><br /><br />&nbsp; &nbsp;<span style=\"color: #B900B9;\">/*da foco al browse*/</span><br /><br /><br /><span style=\"color: #00C800;\">RETURN</span> <span style=\"color: #00C800;\">NIL</span><br />&nbsp;</div>[/code:1xgx4ool]", "time": "20:10", "topic": "Client Server options", "username": "lucasdebeltran" } ]
Client Server options
[ { "date": "2012-05-28", "forum": "FiveWin for Harbour/xHarbour", "text": "Hola,\n\nen ese caso, no creo que un cursor se pueda actualizar, salvo que lo vuelvas a crear, entonces para tu fin podrías intentar crear una tabla temporal en lugar de un cursos, me imagino que el tiempo de creación debería ser similar al del cursor.\n\nPara actualizarla, no le veo complicado actualizar los registros modificados o los nuevos registros, esto lo puedes hacer bajo demanda, temporizado o utilizando las notificaciones de ADS ( habrá gente que sabrá como implementarlas en xHarbour, yo no lo hice), para estas cosas puedes utilizar MERGE, ahora para las eliminaciones puede que con triggers sea una opción.\n\nYo creo que este mismo problema tienes con tDolphin, salvo como tu dices las consultas con el son mucho mas rápidas por lo que no habría problema de reconsultar todo para refrescar la información\n\nSon solo ideas, haber si nos comentas que haces\n\nsaludos\n\nMarcelo", "time": "20:50", "topic": "Client Server options", "username": "Marcelo Via Giglio" } ]
Client Server options
[ { "date": "2012-05-28", "forum": "FiveWin for Harbour/xHarbour", "text": "I would think that to browse a remote table over an internet connection you would have to browse an SQL result sets with pagination (regardless of the sql engine). Lucas thinks he is bringing a whole table over the wire with Tdolphin, but I doubt so. That would be slow no matter the sql engine being used. I'm guessing that TDolphin is suppling result pages to xbrowse via the SetDolphin() method in xBrowse. This makes xBrowse smart enough to browse sql result sets from tdolphin.\n\nxBrowse does not have a special method to do the same with an ADS sql result set. It might be a good idea for the fw community to add a method to xBrowse to enable browsing an ADS SQL result set, **but** before SetAds() method can be added to xbrowse, we would need to have a tAdsQuery() class to take care of methods, Gotop(), GoBottom(), Bof(), Eof(), LastRec(), RecNo(), Goto(), FieldPos(), FieldName(), FieldLen(), FieldDec, PrevPage() and NexPage() with pagination from an ADS sql query.\n\nIf we can recruit someone (Mr. Rao?) to work with the xbrowse part, then I would help with the TAdsQuery class. Again, adding SetAds() method to the xbrowse class would only be useful when xbrowsing tables over an internet connection from a fw/harb app.\n\n\n\nReinaldo.", "time": "22:08", "topic": "Client Server options", "username": "reinaldocrespo" } ]
Client Server options
[ { "date": "2012-05-28", "forum": "FiveWin for Harbour/xHarbour", "text": "Hi friends,\n\nFirst of all, I want to thank you all your help and valuable tips. We have narrowed the problem and we are very close to solve it. Remember, all except browsing features work fine with AIS over internet, with very few changes in code. This is very important and very reliable solution, with much more advantages than using Terminal Server.\n\nAlso, I want to thank Antonio for mantaining this strong and very helpfull community.\n\nThis is the sample with Carlos tip. The performance is much better than before:\n[code=fw:2obm9be4]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><span style=\"color: #B900B9;\">// Harbour Advantage RDD sample</span><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;\">\"ads.ch\"</span><br /><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">\"xbrowse.ch\"</span><br /><br />Request ADS,ADSKeyCount,ADSKeyNo,OrdKeyCount,OrdKeyNo, AdsGetRelKeyPos, AdsSetRelKeyPos<br /><br /><span style=\"color: #B900B9;\">//----------------------------------------------------------------------------//</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> aArray := <span style=\"color: #000000;\">&#123;</span><span style=\"color: #000000;\">&#125;</span>, cDbf, i<br /><br />     <span style=\"color: #00C800;\">local</span> nInicio, nFinal<br /><br />     <span style=\"color: #00C800;\">local</span> lCopy := .F.<br /><br /><br /><br />     <span style=\"color: #B900B9;\">// Driver CDX----------------------------------------------------------------</span><br />     REQUEST DBFCDX, DBFFPT<br /><br /><br />     RddRegister<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"ADS\"</span>, <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">&#41;</span><br />     RddSetDefault<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"ADS\"</span> <span style=\"color: #000000;\">&#41;</span><br /><br />     <span style=\"color: #B900B9;\">//setting up server type</span><br />     <span style=\"color: #B900B9;\">// 1 = Local Server (no client / server)</span><br />     <span style=\"color: #B900B9;\">// 2 = Remote Server</span><br />     <span style=\"color: #B900B9;\">// 3 = Local + Remot</span><br />     <span style=\"color: #B900B9;\">// 4 = Internet Server</span><br />     <span style=\"color: #B900B9;\">// 5 = Local + Internet</span><br />     <span style=\"color: #B900B9;\">// 6 = Remote+Internet</span><br />     <span style=\"color: #B900B9;\">// 7 = Local + Remote + Internet , best choice</span><br />     adsSetServerType<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">4</span> <span style=\"color: #000000;\">&#41;</span>  <span style=\"color: #B900B9;\">// ó  adsSetServerType( ADS_REMOTE_SERVER )</span><br /><br />     <span style=\"color: #B900B9;\">//setting up the file types</span><br />     <span style=\"color: #B900B9;\">// 1 = DBFNTX</span><br />     <span style=\"color: #B900B9;\">// 2 = DBFCDX</span><br />     <span style=\"color: #B900B9;\">// 3 = ADSADI</span><br />     adsSetFileType<span style=\"color: #000000;\">&#40;</span> ADS_CDX <span style=\"color: #000000;\">&#41;</span>  <span style=\"color: #B900B9;\">// o ADS_CDX</span><br /><br />     AdsRightsCheck<span style=\"color: #000000;\">&#40;</span>.F.<span style=\"color: #000000;\">&#41;</span><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />&nbsp; <span style=\"color: #00C800;\">IF</span> AdsConnect60<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"<span style=\"color: #000000;\">\\\\</span>c i b er-tec.d2g.com:2000<span style=\"color: #000000;\">\\c</span>ursos<span style=\"color: #000000;\">\\a</span>dsdemo<span style=\"color: #000000;\">\\c</span>ibconwn<span style=\"color: #000000;\">\\s</span>tc<span style=\"color: #000000;\">\\i</span>nternet.add\"</span>, <span style=\"color: #000000;\">4</span>,<span style=\"color: #ff0000;\">\"demo\"</span>,<span style=\"color: #ff0000;\">\"demo\"</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;\">\"Esta ahora conectado al Sevidor AIS de Cibertec en Mexico \"</span>+CRLF+CRLF+;<br />        <span style=\"color: #ff0000;\">\"You are now connected to AIS Server\"</span>,<span style=\"color: #ff0000;\">\"Bienvenido / Welcome / Versión \"</span>+ADSVersion<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><span style=\"color: #000000;\">&#41;</span><br /><br /><br /><br />   <span style=\"color: #00C800;\">ELSE</span><br /><br />      MsgStop<span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"Se ha rechazado la conexión al servidor AIS, por favor intente mas tarde\"</span>+CRLF+CRLF+;<br />         <span style=\"color: #ff0000;\">\"Conection to AIS Server rejected, please, try again later\"</span>,<span style=\"color: #ff0000;\">\"AIS Error\"</span><span style=\"color: #000000;\">&#41;</span><br />      QUIT<br /><br />   <span style=\"color: #00C800;\">ENDIF</span><br /><br /><br /><br /><br /><br /><br />   USE CATCUE SHARED <span style=\"color: #00C800;\">NEW</span> <span style=\"color: #0000ff;\">ALIAS</span> <span style=\"color: #ff0000;\">\"DATOS\"</span><br />   DATOS-><span style=\"color: #000000;\">&#40;</span>AdsCacheRecords<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">50</span><span style=\"color: #000000;\">&#41;</span><span style=\"color: #000000;\">&#41;</span><br />   DATOS-><span style=\"color: #000000;\">&#40;</span>OrdSetFocus<span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"NUMCUENTA\"</span><span style=\"color: #000000;\">&#41;</span><span style=\"color: #000000;\">&#41;</span><br />   DATOS-><span style=\"color: #000000;\">&#40;</span>DBGOTOP<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><span style=\"color: #000000;\">&#41;</span><br /><br /><br />   sysrefresh<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br /><br />   Test_SQL<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />   DBCLOSEALL<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br />   QUIT<br /><br /><br /><br /><br /><span style=\"color: #00C800;\">return</span> <span style=\"color: #00C800;\">nil</span><br /><br /><span style=\"color: #B900B9;\">//----------------------------------------------------------------------------//</span><br /><br /><br /><br /><span style=\"color: #B900B9;\">//-----------------------------------------------------------------------------</span><br /><br /><br /><br /><span style=\"color: #B900B9;\">//-----------------------------------------------------------------------------</span><br /><span style=\"color: #00C800;\">function</span> Test_SQL<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br />   <span style=\"color: #00C800;\">LOCAL</span> cSql   := <span style=\"color: #ff0000;\">\"\"</span><br />   <span style=\"color: #00C800;\">LOCAL</span> aArray := <span style=\"color: #000000;\">&#123;</span><span style=\"color: #000000;\">&#125;</span><br /><br />   <span style=\"color: #00C800;\">LOCAL</span> cAlias := <span style=\"color: #0000ff;\">Alias</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br />   <span style=\"color: #00C800;\">local</span> nInicio, nFinal<br /><br /><br /><br /><br /><br />   <span style=\"color: #B900B9;\">/*al inicio de la instruccion sql se define un area vacia*/</span><br />   DBSelectArea<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">0</span><span style=\"color: #000000;\">&#41;</span><br /><br /><br />   <span style=\"color: #B900B9;\">/*se define instruccion sql en una cadena de texto*/</span><br />   <span style=\"color: #B900B9;\">//cSql := \"SELECT * FROM BIBLIO ORDER BY TITULO\"</span><br />   cSql := <span style=\"color: #ff0000;\">\"SELECT {static} *  FROM CATCUE ORDER BY DESCRIPCIO\"</span><br /><br />   <span style=\"color: #0000ff;\">msgINFO</span><span style=\"color: #000000;\">&#40;</span>csql, <span style=\"color: #ff0000;\">\"cSql\"</span><span style=\"color: #000000;\">&#41;</span><br /><br /><br /><br /><br />   <span style=\"color: #B900B9;\">/*crea instruccion sql y pasa los datos a tabla temporal*/</span><br />   ADSCreateSQLStatement<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"REPTMP\"</span>, <span style=\"color: #000000;\">2</span> <span style=\"color: #000000;\">&#41;</span><br /><br /><br />   <span style=\"color: #00C800;\">IF</span> ADSExecuteSQLDirect<span style=\"color: #000000;\">&#40;</span> cSql <span style=\"color: #000000;\">&#41;</span><br /><br />      DBSelectArea<span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"REPTMP\"</span><span style=\"color: #000000;\">&#41;</span><br /><br /><br />      <span style=\"color: #00C800;\">IF</span> LastRec<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> > <span style=\"color: #000000;\">0</span>  <span style=\"color: #B900B9;\">// !REPTMP->( Eof() )</span><br /><br />         <span style=\"color: #B900B9;\">/*lista resultado en tabla*/</span><br />         <br />         dbgotop<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />         <span style=\"color: #0000ff;\">xbrowse</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br /><br />      <span style=\"color: #00C800;\">ELSE</span><br /><br />         <span style=\"color: #B900B9;\">/*no se encontro datos que cumpla condicion sql*/</span><br />         <span style=\"color: #0000ff;\">MsgInfo</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"No se ha encontrado REGISTROS\"</span> <span style=\"color: #000000;\">&#41;</span><br /><br />      <span style=\"color: #00C800;\">ENDIF</span><br /><br />      <span style=\"color: #B900B9;\">/*cierra tabla de datos temporal*/</span><br />      REPTMP-><span style=\"color: #000000;\">&#40;</span> DBCloseArea<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span><br /><br /><br /><br /><br />   <span style=\"color: #00C800;\">ELSE</span><br /><br />      Alert<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"AdsExecuteSQLDirect() failed with error \"</span>+ Str<span style=\"color: #000000;\">&#40;</span> ADSGetLastError<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span><br /><br /><br /><br />   <span style=\"color: #00C800;\">ENDIF</span><br /><br /><br /><br />   <span style=\"color: #B900B9;\">/*se selecciona area de datos anterior*/</span><br />   <span style=\"color: #00C800;\">IF</span> !Empty<span style=\"color: #000000;\">&#40;</span>cAlias<span style=\"color: #000000;\">&#41;</span><br />      DBSelectArea<span style=\"color: #000000;\">&#40;</span>cAlias<span style=\"color: #000000;\">&#41;</span><br />   <span style=\"color: #00C800;\">ENDIF</span><br /><br />   <span style=\"color: #B900B9;\">/*da foco al browse*/</span><br /><br /><br /><span style=\"color: #00C800;\">RETURN</span> <span style=\"color: #00C800;\">NIL</span><br /> </div>[/code:2obm9be4]\n\n\nHope Mr. Nages and Daniel could help us with xBrowse. In this case, we will build a very easy way to enable cliente/server to our software with very very little changes.\n\n\nThanks again for this very instructive debate.", "time": "22:42", "topic": "Client Server options", "username": "lucasdebeltran" } ]
Client Server options
[ { "date": "2012-05-28", "forum": "FiveWin for Harbour/xHarbour", "text": "Lucas;\n\nIt is not going to change speed of the SQL cursor xbrowsing, but I think you can save these lines as they are not doing anything. You don't need to open the table when using SQL.\n\n[code=fw:1so9utd9]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /><span style=\"color: #B900B9;\">//the lines below are not doing anything.</span><br /><br />USE CATCUE SHARED <span style=\"color: #00C800;\">NEW</span> <span style=\"color: #0000ff;\">ALIAS</span> <span style=\"color: #ff0000;\">\"DATOS\"</span><br />   DATOS-><span style=\"color: #000000;\">&#40;</span>AdsCacheRecords<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">50</span><span style=\"color: #000000;\">&#41;</span><span style=\"color: #000000;\">&#41;</span><br />   DATOS-><span style=\"color: #000000;\">&#40;</span>OrdSetFocus<span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"NUMCUENTA\"</span><span style=\"color: #000000;\">&#41;</span><span style=\"color: #000000;\">&#41;</span><br />   DATOS-><span style=\"color: #000000;\">&#40;</span>DBGOTOP<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><span style=\"color: #000000;\">&#41;</span><br /><br /><br />   sysrefresh<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /> </div>[/code:1so9utd9]\n\nReinaldo.", "time": "22:49", "topic": "Client Server options", "username": "reinaldocrespo" } ]
Client Server options
[ { "date": "2012-05-28", "forum": "FiveWin for Harbour/xHarbour", "text": "Thank you.\n\nI have them as I did other tests, such as append blank, locate, etc which are working very well.\n\nDo you think any way to update/refresh the cursor?. It is not a handicap, as I can always repeat the query.\n\nThanks again.", "time": "22:51", "topic": "Client Server options", "username": "lucasdebeltran" } ]
Client Server options
[ { "date": "2012-05-28", "forum": "FiveWin for Harbour/xHarbour", "text": "A static cursor a new table based on the old table (or tables). It is not refreshed when the base table changes. What you want is a Dynamic cursor (remove the {static} clause). A Dynamic cursor is actually faster than a static cursor. The problem is that xBrowse requests the full result set every time you move. If xbrowse was fixed to be used with ADS, then a dynamic (live) cursor would be much faster to xbrowse.\n\nHere is the difference between a live (also called dynamic) cursor vs a static cursor from the help file:\n\n[quote:2g8h8kmj]\n\nA live cursor is constructed by essentially putting a filter on the base table so that only the requested rows are visible. Conversely, a static cursor is actually a new table dynamically built with the requested rows of the original table or tables. Because the live cursor does not move any records around, it is faster to retrieve as a rowset. However, a static cursor is not completely populated when it is created.\n\nA form of \"caching\" is used to add a certain number of rows at a time to the static cursor, so that control is returned to client in a reasonable time. The static cursor is populated as the rowset is traversed. This results in a more immediate response to the query, and processing is not wasted if only the first portion of the rowset is traversed. Note that the following operations will cause the static cursor rowset to be fully populated: Last (or Go Bottom), RecCount, Create Index.\n\nFor either live or static cursors, a cursor handle is utilized in a manner analogous to a table handle. This cursor handle can be used to navigate the resulting cursor in a fully scrollable manner. For all intents and purposes, the cursor can be treated like a table. Static cursors cannot be modified, but modifications on live cursors are reflected in the source table.\n\nA live cursor can be much faster than a static cursor. However, this performance difference has a trade-off against features that can only be used on a static cursor. A live cursor is used if the SELECT statement does not contain any of the following:\n\n· • DISTINCT in the SELECT clause \n\n· • Joins (inner, outer, self, or UNION) \n\n· • Any aggregate function \n\n· • GROUP BY or HAVING clauses \n\n· • Subqueries \n\n· • Certain scalar functions (see Scalar Functions in a WHERE Clause) \n\n· • If a memo field is used in a WHERE clause (e.g., WHERE memo is null) \n\n· • LIKE operator is used in a WHERE clause (e.g.,. WHERE lastname LIKE 'Smith%) \n\n· • Expressions or scalar functions in the select list (e.g., select UCASE(lastname) … ) \n\n· • TOP in the SELECT clause \n\n· • WHERE clause contains a large expression that is not supported by the expression engine \n\nIt is possible to force Advantage to produce a static cursor on a SELECT statement that would normally result in a live cursor. To do this, use the {static} escape sequence after the SELECT keyword. For example:\n\n \n\nSELECT {static} * FROM emp WHERE hire_date < '1990-01-14' \n\n \n\nWithout the escape sequence, Advantage would create a live cursor for that query. With {static} specified, though, Advantage will create a static cursor. From a performance standpoint, it is probably better in most circumstances to allow Advantage to create live cursors when possible.\n\nIf, though, the WHERE clause is very restrictive (thus producing a small rowset) and the base table is very large, it may be faster to force a static cursor. This is because the live cursor would be implemented with a filter on the server. If the client application were to traverse the rowset multiple times, the server would have to filter the rowset each time. If the client forced the cursor to be static, however, the server may be able to quickly seek directly to the data for the rowset with minimal cost. And once the cursor is created, the server would not be required to do any filtering when the client traversed the rowset.\n\nSee Also\n\nCursor Types\n[/quote:2g8h8kmj]\n\nReinaldo.", "time": "23:06", "topic": "Client Server options", "username": "reinaldocrespo" } ]
Client Server options
[ { "date": "2012-05-28", "forum": "FiveWin for Harbour/xHarbour", "text": "Here is a good explanation of the difference between a live cursor and a static cursor from the help file:\n[quote:3ml0rkwq]\n\nCursors are produced by executing SQL SELECT statements. Technically, a cursor is considered to be the mechanism by which the results of a query are manipulated and traversed. More generally, however, a cursor is often equated with the rowset itself. Cursors produced by Advantage are either live or static.\n\nAn Advantage live cursor represents a dynamic, server-side, scrollable cursor. With live (dynamic) cursors, updates to the base table are reflected in the cursor. For example, consider \"select * from employee where lastname = ‘Smith’\". If a record is appended to the employee table and the new record’s lastname field is set to ‘Smith’, that new record will be inserted into the cursor. Likewise, an update will remove a record from the cursor if the lastname field is changed.\n\nAdvantage static cursors cannot be updated, nor are updates to the base tables of a static cursor reflected in the cursor itself. An example of a query that results in a static cursor is \"select * from orders, customers where order.custid = customers.custid.\" Once the rowset produced by that query is fully populated, updates to the orders and customers tables will have no effect on the cursor.\n\nIt is important to note that there are two specific cases where table updates made by one user are not reflected in another user's dynamic cursor. Advantage Local Server does not automatically detect changes in tables that are made by other clients. This means that updates made by applications using Advantage Local Server are propagated only to cursors owned by that same application. Similarly, another situation where updates are not reflected in live cursors is with Advantage Database Server when it uses the compatibility locking mode in order to share DBF tables with third-party applications. If a third-party application updates a table, the Advantage Database Server does not automatically detect that update and, therefore, it will not update cursors based on that table.\n[/quote:3ml0rkwq]\n\nReinaldo.", "time": "23:08", "topic": "Client Server options", "username": "reinaldocrespo" } ]
Client Server options
[ { "date": "2012-05-28", "forum": "FiveWin for Harbour/xHarbour", "text": "el culpable de la lentitud en los browse es la funcion ordkeycount, la cual para obtener su valor de retorno tiene que recorrer todo el cursor.\ny para remate el bloque de codigo bkeyCount en xbrowse que es el responsable de obtener el valor de cuantos registros tiene el browse, se ejecuta cada tanto.\nhaciendo la presentacion de un browse extremadamente lenta.\n\nes por ello que en los grid de delphi, de forma estandar el scrollbar vertical no es funcional completamente, solo funciona el movimiento hacia el inicio y hacia el final.\n(TOP y BOTTOM) y el thumbnail esta siempre al centro, no funciona desplazar el thumbnal hacia arriba o abajo. (SKIP 1 o SKIP -1) esto para no estar calculando la posicion relativa del cursor y posicionar el thumbnail en la posicion correcta, ya que para hacer esto necesitaria estar costantemente calculando cuantos registros hay (llamando a adskeycount por supuesto) y cualcular la pos relativa, esto es por lo cual los grid en delphi dan la apariencia de ser rapidos con ads, la verdad es que para ambientes cliente servidor la funcion adskeycount se debe evitar como a la peste bubonica.\n\nlo que habria que hacer es modificar los browse de fwh para que tengan el comportamiento similar al de delphi.\n\nesto lo he deducido viendo arc, y un poco con el poco ingles que entiendo leyendo el help de ads.\nasi que no es una ley que aparecio en la biblia. <!-- s:-) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":-)\" title=\"Smile\" /><!-- s:-) -->, puedo estar muy equivocado.\n\nsalu2\ncarlos vargas", "time": "23:11", "topic": "Client Server options", "username": "carlos vargas" } ]
Client Server options
[ { "date": "2012-05-28", "forum": "FiveWin for Harbour/xHarbour", "text": "Carlos;\n\nExcellent remarks. I couldn't agree more.\n\n\nReinaldo.", "time": "23:17", "topic": "Client Server options", "username": "reinaldocrespo" } ]
Client Server options
[ { "date": "2012-05-29", "forum": "FiveWin for Harbour/xHarbour", "text": "Carlos,\n\n[quote:3jk3v8zz]el culpable de la lentitud en los browse es la funcion ordkeycount...[/quote:3jk3v8zz]\n\nEsto entre otras cosas, por eso recomiendo carga en tabla y despues tratarlo. Lo que has exlicado, tan facil de entender imaginate en una conexion Inet... Los browsers actuales constantemente hacen peticiones al server, para conocer posiciones, num reg., ... y como no hay un sistema de paginacion local, o un mejor acceso a los datos por eso penaliza con lentitud.", "time": "06:52", "topic": "Client Server options", "username": "Carles" } ]
Client Server options
[ { "date": "2012-05-29", "forum": "FiveWin for Harbour/xHarbour", "text": "Hello,\n\nWhat does the Fivetech team think about this changes?.\n\nThank you.", "time": "20:19", "topic": "Client Server options", "username": "lucasdebeltran" } ]
Client Server options
[ { "date": "2012-06-05", "forum": "FiveWin for Harbour/xHarbour", "text": "Up.\n\nThanks. I think it is very importat for the future!!.", "time": "09:18", "topic": "Client Server options", "username": "lucasdebeltran" } ]
Client Server options
[ { "date": "2008-04-08", "forum": "FiveWin for Harbour/xHarbour", "text": "We often find this kind of correction to the coordinates returned by ClientToScreen and SceenToClient functions\n[code:26abxwfj]\n aPoint = ClientToScreen&#40; &#58;&#58;hWnd, aPoint &#41;\n if aPoint&#91; 1 &#93; > 32768\n aPoint&#91; 1 &#93; -= 65535\n endif\n if aPoint&#91; 2 &#93; > 32768\n aPoint&#91; 2 &#93; -= 65535\n endif\n[/code:26abxwfj]\nIt is also advised in these forums to use the correction after call to these functions. Why can't the correction be built into the FWH functions ClientToScreen and SceenToClient, so that we do not have to write the extra repetitive code ? Incorporating these corrections in the main code does not break any existing code.", "time": "10:39", "topic": "Client to Screen", "username": "nageswaragunupudi" } ]
Client to Screen
[ { "date": "2008-04-08", "forum": "FiveWin for Harbour/xHarbour", "text": "NageswaraRao,\n\nIn those circunstances we need a \"short\" (16 bits) signed value from PRG level.\n\nMaybe we could try to change:\n[code:1ughci7h]\n hb_reta&#40; 2 &#41;;\n hb_stornl&#40; pt&#46;x, -1, 2 &#41;;\n hb_stornl&#40; pt&#46;y, -1, 1 &#41;\n[/code:1ughci7h]\ninto:\n[code:1ughci7h]\n hb_reta&#40; 2 &#41;;\n hb_storni&#40; &#40; short int &#41; pt&#46;x, -1, 2 &#41;;\n hb_storni&#40; &#40; short int &#41; pt&#46;y, -1, 1 &#41;\n[/code:1ughci7h]", "time": "14:29", "topic": "Client to Screen", "username": "Antonio Linares" } ]
Client to Screen
[ { "date": "2006-07-24", "forum": "FiveWin para Harbour/xHarbour", "text": "Hola Foro:\n\n Necesito iniciarme en esta estructura. ¿Sabeis de un sitio donde me propongan ejemplos, herramientas a utilizar, etc. . . ? Me han comentado Mysql, advantage, pero no se por donde empezar. Tambien he intentado configurar el advantage en una pequeña red de area local, pero que va, tengo algunas lagunas que me hacen NO poder avanzar. Como siempre agradecería un ejemplo por muy pequeño que fuera, que luego ya me encargo yo. UN SALUDO y muchas gracias.", "time": "11:42", "topic": "Cliente / Servidor", "username": "Mike Serra" } ]
Cliente / Servidor
[ { "date": "2006-07-24", "forum": "FiveWin para Harbour/xHarbour", "text": "Antes de hacer el ejemplo con el cliente, tienes que tener instalado el servidor, asi que si nos puedes plantear tus dudas con los servidores, con gusto te ayudamos.\n\nLo del cliente viene despues, primero tenemos que instalar el servidor.", "time": "18:51", "topic": "Cliente / Servidor", "username": "R.F." } ]
Cliente / Servidor
[ { "date": "2006-07-24", "forum": "FiveWin para Harbour/xHarbour", "text": "Gracias Rene por tu respuesta:\n\n Quiero empezar de cero, y habiendo leido post tuyos e incluso enlaces que has puesto sobre el servidor que montaste en Mexico junto con los resultados de conexiones etc. . . , creo que la solución de advantage es muy buena, pero primero necesitaria saber qué es lo que tengo que instalar en el servidor. Se que a lo mejor es tedioso lo que te estoy planteando, pero ¿algun manual, alguna web donde descargar versiónes demo para 1 usuario?\n\n MUCHAS GRACIAS!!", "time": "21:24", "topic": "Cliente / Servidor", "username": "Mike Serra" } ]
Cliente / Servidor
[ { "date": "2006-07-25", "forum": "FiveWin para Harbour/xHarbour", "text": "pues mira en mi poca experiencia con advantage te puedo decir que es una excelente solucion ademas la migracion de tus aplicaciones FW16, CLIPPER y FW32 para trabajar bajo el cliente/servidor realmente es de risa (claro que con el apoyo de gente como Rene todo es facil <!-- s:D --><img src=\"{SMILIES_PATH}/icon_biggrin.gif\" alt=\":D\" title=\"Very Happy\" /><!-- s:D --> ) , que necesitas en tu servidor pues de hardware realmente no mucho un pentium v normalito es suficiente, y pues depende del sistema operativo tienes varias versiones de advantage, la instalacion del servidor advantage es realmente sencilla sin rollos solo windows 2003 da un que otro problemilla para levantar el servicio pero solucionable... lo de las versiones de prueba pues talvez rene te pueda ayudar...\nsaludos", "time": "00:55", "topic": "Cliente / Servidor", "username": "alex_cyr" } ]
Cliente / Servidor
[ { "date": "2006-07-25", "forum": "FiveWin para Harbour/xHarbour", "text": "Hola....\n\nYo te aconsejo MySQL, es facil de aprender no es del todo gratis, pero puedes empezar sin gastar casi ni un centavo.\n\nAdemas puedes enlazar varios puntos de trabajo por medio de internet sin costo solo tu linea de internet, si necesitas algo referente a MySQL por aqui estamos.\n\nSaludos\n\nMarco A. Delgado.", "time": "16:38", "topic": "Cliente / Servidor", "username": "Marco A. Delgado" } ]
Cliente / Servidor
[ { "date": "2006-07-25", "forum": "FiveWin para Harbour/xHarbour", "text": "[quote=\"Marco A. Delgado\":ejnmo8lj]Hola....\n\nYo te aconsejo MySQL, es facil de aprender no es del todo gratis, pero puedes empezar sin gastar casi ni un centavo.\n\nAdemas puedes enlazar varios puntos de trabajo por medio de internet sin costo solo tu linea de internet, si necesitas algo referente a MySQL por aqui estamos.\n[/quote:ejnmo8lj]\n\nMejor, te pones un PostGre, muchisimo mas potente, y encima libre.\nTotal, la sintaxis viene a ser mas o menos la misma.\n\nSobre ADS, demasiado CARO, eso si, para seguir tu forma de trabajar\ncon tus RDDs, es lo mas rapido.\n\nPero entre todos, PostGre sin dudas, posiblemente, el mejor de estas\n3 opciones.\n\n( ...Pues a mi no me gusta.... - Bueno, dije posiblemente <!-- s;-) --><img src=\"{SMILIES_PATH}/icon_wink.gif\" alt=\";-)\" title=\"Wink\" /><!-- s;-) --> )\n\n\nSaludos\nRafa Carmona", "time": "18:01", "topic": "Cliente / Servidor", "username": "thefull" } ]
Cliente / Servidor
[ { "date": "2006-07-27", "forum": "FiveWin para Harbour/xHarbour", "text": "Rafa, algunas veces tienes razón <!-- s;-) --><img src=\"{SMILIES_PATH}/icon_wink.gif\" alt=\";-)\" title=\"Wink\" /><!-- s;-) -->\n\nVoto tambien por Postgresql, es muy potente, y es totalmente gratuito, es muy estable y seguro. \n\nSaludos", "time": "11:20", "topic": "Cliente / Servidor", "username": "pymsoft" } ]
Cliente / Servidor
[ { "date": "2006-08-31", "forum": "FiveWin para Harbour/xHarbour", "text": "[quote=\"thefull\":3jglxb92][quote=\"Marco A. Delgado\":3jglxb92]Hola....\n\nYo te aconsejo MySQL, es facil de aprender no es del todo gratis, pero puedes empezar sin gastar casi ni un centavo.\n\nAdemas puedes enlazar varios puntos de trabajo por medio de internet sin costo solo tu linea de internet, si necesitas algo referente a MySQL por aqui estamos.\n[/quote:3jglxb92]\n\nMejor, te pones un PostGre, muchisimo mas potente, y encima libre.\nTotal, la sintaxis viene a ser mas o menos la misma.\n\nSobre ADS, demasiado CARO, eso si, para seguir tu forma de trabajar\ncon tus RDDs, es lo mas rapido.\n\nPero entre todos, PostGre sin dudas, posiblemente, el mejor de estas\n3 opciones.\n\n( ...Pues a mi no me gusta.... - Bueno, dije posiblemente <!-- s;-) --><img src=\"{SMILIES_PATH}/icon_wink.gif\" alt=\";-)\" title=\"Wink\" /><!-- s;-) --> )\n\n\nSaludos\nRafa Carmona[/quote:3jglxb92]\n\nPodrías postear algun ejemplo amigo?\n\nGracias.", "time": "10:21", "topic": "Cliente / Servidor", "username": "goosfancito" } ]
Cliente / Servidor
[ { "date": "2006-09-02", "forum": "FiveWin para Harbour/xHarbour", "text": "Rafa,\n\ny EnterpriseDB <!-- m --><a class=\"postlink\" href=\"http://www.enterprisedb.com/\">http://www.enterprisedb.com/</a><!-- m --> ?\n\nSaludos,\n\nFélix", "time": "11:40", "topic": "Cliente / Servidor", "username": "Baxajaun" } ]
Cliente / Servidor
[ { "date": "2006-09-02", "forum": "FiveWin para Harbour/xHarbour", "text": "Rafa,\n\ny EnterpriseDB <!-- m --><a class=\"postlink\" href=\"http://www.enterprisedb.com/\">http://www.enterprisedb.com/</a><!-- m --> ?\n\nSaludos,\n\nFélix", "time": "12:01", "topic": "Cliente / Servidor", "username": "Baxajaun" } ]
Cliente / Servidor
[ { "date": "2006-09-04", "forum": "FiveWin para Harbour/xHarbour", "text": "[quote=\"Baxajaun\":3bour6k7]Rafa,\n\ny EnterpriseDB <!-- m --><a class=\"postlink\" href=\"http://www.enterprisedb.com/\">http://www.enterprisedb.com/</a><!-- m --> ?\n\nSaludos,\n\nFélix[/quote:3bour6k7]\n\nFelix, viendolo, creo que se basa en PostGre, por lo tanto, aceptamos\ntambien a Enterprisedb como unos de los mejores <!-- s;-) --><img src=\"{SMILIES_PATH}/icon_wink.gif\" alt=\";-)\" title=\"Wink\" /><!-- s;-) -->\n\nPersonalmente, para APRENDER , contra MySql, es lo mas sencillo, porque no tiene ni la mitad de cosas que tiene el postgre , y eso que \nte ahorras en aprender.\n\nAhora si, si tienes que meter alguna aplicacion buscando 'robustez',\nhay que mirar hacia PostGre antes que MySql.", "time": "17:00", "topic": "Cliente / Servidor", "username": "thefull" } ]
Cliente / Servidor
[ { "date": "2006-09-04", "forum": "FiveWin para Harbour/xHarbour", "text": "[quote=\"goosfancito\":2s7mobsg][quote=\"thefull\":2s7mobsg][quote=\"Marco A. Delgado\":2s7mobsg]Hola....\n\nYo te aconsejo MySQL, es facil de aprender no es del todo gratis, pero puedes empezar sin gastar casi ni un centavo.\n\nAdemas puedes enlazar varios puntos de trabajo por medio de internet sin costo solo tu linea de internet, si necesitas algo referente a MySQL por aqui estamos.\n[/quote:2s7mobsg]\n\nMejor, te pones un PostGre, muchisimo mas potente, y encima libre.\nTotal, la sintaxis viene a ser mas o menos la misma.\n\nSobre ADS, demasiado CARO, eso si, para seguir tu forma de trabajar\ncon tus RDDs, es lo mas rapido.\n\nPero entre todos, PostGre sin dudas, posiblemente, el mejor de estas\n3 opciones.\n\n( ...Pues a mi no me gusta.... - Bueno, dije posiblemente <!-- s;-) --><img src=\"{SMILIES_PATH}/icon_wink.gif\" alt=\";-)\" title=\"Wink\" /><!-- s;-) --> )\n\n\nSaludos\nRafa Carmona[/quote:2s7mobsg]\n\nPodrías postear algun ejemplo amigo?\n\nGracias.[/quote:2s7mobsg]\n\nLos ejemplos estan en /contrib/pgsql/tests.\nDe todas maneras, precisamente este fin de semana he estado jugando\ny tiene varios bugs, que ya le he notificado a Rodrigo, autor del codigo.", "time": "17:03", "topic": "Cliente / Servidor", "username": "thefull" } ]
Cliente / Servidor
[ { "date": "2006-09-05", "forum": "FiveWin para Harbour/xHarbour", "text": "Hola...\n\nTambien podeis probar SqlServer con MSDE que es graito para 5 conexiones simultanes o Sql Server 2005 Express, tambien gratuito.\n\nSaludos,\nJosé Luis Capel", "time": "07:31", "topic": "Cliente / Servidor", "username": "jlcapel" } ]
Cliente / Servidor
[ { "date": "2007-04-19", "forum": "FiveWin para Harbour/xHarbour", "text": ".\n.", "time": "02:13", "topic": "Cliente / Servidor", "username": "syda" } ]
Cliente / Servidor
[ { "date": "2007-04-19", "forum": "FiveWin para Harbour/xHarbour", "text": "[quote=\"thefull\"][quote=\"Baxajaun\"]Rafa,\n\ny EnterpriseDB <!-- m --><a class=\"postlink\" href=\"http://www.enterprisedb.com/\">http://www.enterprisedb.com/</a><!-- m --> ?\n\nSaludos,\n\nFélix[/quote]\n\nFelix, viendolo, creo que se basa en PostGre, por lo tanto, aceptamos\ntambien a Enterprisedb como unos de los mejores <!-- s;-) --><img src=\"{SMILIES_PATH}/icon_wink.gif\" alt=\";-)\" title=\"Wink\" /><!-- s;-) -->\n\nPersonalmente, para APRENDER , contra MySql, es lo mas sencillo, porque no tiene ni la mitad de cosas que tiene el postgre , y eso que \nte ahorras en aprender.\n\nAhora si, si tienes que meter alguna aplicacion buscando 'robustez',\nhay que mirar hacia PostGre antes que MySql.[/quote]\n\nRafa,\n\nMySQL es muy estable, no tengo mucha experiencia con Postgres pero para que sea MÁs estable tiene que serlo pero mucho. \nQue por ahí la licencia tan particular de MySQL te hace dejarlo de lado.. eso lo entiendo, pero hay cosas que no se le pueden discutir, y una es que es una de las más estables que hay.\nUna cosa que siempre me gustó de MySQL erspecto del resto es la sencillez de la replicación, que en Postgres es bastante más compleja.\nOtra cosa en la que me gusta más el MySQL es que los autoincrementales de Postgres necesitan que exista el sequencer para poder usarlos y no como MySQL que implementa el sequencer en la misma estructura de la BBDD.\nPunto a favor de Postgres: la orientacion a objetos.\n\nUn saludo,\n\nCarlos", "time": "16:08", "topic": "Cliente / Servidor", "username": "Carlos Mora" } ]
Cliente / Servidor
[ { "date": "2012-01-24", "forum": "FiveWin para Harbour/xHarbour", "text": "Hola Gente... Buen Día a tod@s!!!\nFeliz y Prospero 2012!!!\n\nTenia mucho tiempo si entrar al foro y veo muchos nombres nuevos, lo cual me dice mucho de la aceptación de FW por la comunidad de programadores...\n\nSe me esta presentando una necesidad, nueva para mi, en la que necesito subir y bajar archivos de datos en un servidor FTP desde FW... Mirando los los fuentes veo que estan clases tFTP, tFTPCli, tFTPFile, tFTPServ, y tFTPSess; y en los ejemplos estan FTPDir y FTPServ...\nPor lo pronto la cosa se me ha trancado porque me sale un dialogo que me dice \"Cannot load WinINet.dll!\"... buscando encontre que esa DLL es parte de Windows, se encuentra en la carpeta System32 de Windows... la copie a la carpeta donde estoy tratando de que el ejemplo corra, y aun asi no hay forma...\n\nMe gustaria una orientación de parte de quienes hayan tenido alguna experiencia accediendo a un servidor FTP desde FW...\n\nAgradezco de antemano cualquier tip/orientación/comentario al respecto...\n\nGiancarlo J. Sabattino\nValencia, Venezuela", "time": "12:07", "topic": "Cliente FTP con FW+xH", "username": "gsabattino" } ]
Cliente FTP con FW+xH
[ { "date": "2012-01-24", "forum": "FiveWin para Harbour/xHarbour", "text": "Así hago yo para subir archivos a un ftp\n\n//----------------------------------------------------------------------------//\nFunction FTPSendFiles( cFTPSite, aSource, aTarget, cUserFtp, cPassFtp )\n\nLocal lEnd := .f.\nLocal nBufSize := 2000\nLocal oInternet, oFTP\n\nMsgRun( \"Conectando al Sitio FTP...\", \"Espere...\",;\n { || oInternet := TInternet():New(),;\n If( Empty( oInternet:hSession ),;\n MsgAlert( \"Sin Conexión a Internet!\" ),),;\n oFTP := TFTP():New( cFTPSite, oInternet, Alltrim(cUserFtp),Alltrim(cPassFtp) ) } )\n\nif Empty( oFTP:hFTP )\n MsgStop( \"Imposible Conectarse al Sito FTP!\" )\n return nil\nendif\n\nSendFiles( aSource, aTarget, nBufSize, lEnd, oFTP )\n\noInternet:End()\n\nreturn nil\n//----------------------------------------------------------------------------//\nStatic Function SendFiles( aSource, aTarget, nBufSize, lEnd, oFTP )\n\nLocal n\nLocal hSource\nLocal cBuffer := Space( nBufSize )\nLocal nBytes, nFile := 0, nTotal := 0\nLocal nTotSize := 0\nLocal oFile\n\nfor n = 1 to Len( aSource )\n if ! File( aSource[ n ] )\n MsgStop( \"Archivo No Encontrado: \" + aSource[ n ] )\n exit\n endif\n hSource = FOpen( aSource[ n ] )\n nTotSize += FSeek( hSource, 0, 2 )\n FClose( hSource )\nnext\n\nfor n = 1 to Len( aSource )\n hSource = FOpen( aSource[ n ] )\n\n oFile = TFtpFile():New( aTarget[ n ], oFTP )\n oFile:OpenWrite()\n FSeek( hSource, 0, 0 )\n nFile := 0\n while ( nBytes := FRead( hSource, @cBuffer, nBufSize ) ) > 0 .and. ! lEnd\n oFile:Write( SubStr( cBuffer, 1, nBytes ) )\n end\n FClose( hSource )\n oFile:End()\n if lEnd\n exit\n endif\n next\nReturn nil\n//----------------------------------------------------------------------------//", "time": "13:18", "topic": "Cliente FTP con FW+xH", "username": "postinelli" } ]
Cliente FTP con FW+xH
[ { "date": "2012-01-24", "forum": "FiveWin para Harbour/xHarbour", "text": "Gracias por el ejemplo...\nLo copie tal cual, pero aun me sigue saliendo el dialogo con el mensaje \"Cannot load WinINet.dll!\"...\npero... dos maquinas tengan el mismo problema??\n\nSeguire buscando, pero aun asi acepto mas tips/ejemplos/sugerencias/comentarios...", "time": "19:15", "topic": "Cliente FTP con FW+xH", "username": "gsabattino" } ]
Cliente FTP con FW+xH
[ { "date": "2012-01-24", "forum": "FiveWin para Harbour/xHarbour", "text": "Giancarlo,\n\n¿Qué versión de FWH y de Harbour usas?.\n\nTiene pinta de que tienes una versión antigua...", "time": "21:40", "topic": "Cliente FTP con FW+xH", "username": "lucasdebeltran" } ]
Cliente FTP con FW+xH
[ { "date": "2012-01-29", "forum": "FiveWin para Harbour/xHarbour", "text": "Esta solución me funciona perfecto..\nviewtopic.php?f=6&t=20501&p=108900&hilit=JOHNSON+RUSSI#p108900\n\nJohnson Russi \nColombia", "time": "10:34", "topic": "Cliente FTP con FW+xH", "username": "russimicro" } ]
Cliente FTP con FW+xH
[ { "date": "2012-01-29", "forum": "FiveWin para Harbour/xHarbour", "text": "1) Tienes que comenzar añadiendo en la cabecera los siguientes includes:\n\n#include \"Fivewin.ch\"\n#include \"wininet.ch\"\n\n2) Escribe la siguiente funcion:\n\nFUNCTION SubirFtp( cFtpAddress, cUser, cPass, cOrigen, cDestino, nPort, nService )\nlocal hWinInet, hInternet, hConnect, lOk\n\n// cargamos la DLL si no estaba cargada\nhWinINet := WinINet()\n\n if hWinINet < 0 .or. hWinINet >= 32\n hInternet := InternetOpen( \"Valdenebro\", INTERNET_OPEN_TYPE_DIRECT, 0, 0, 0 )\n endif\n\n hConnect := INTERNETCONNECT( hInternet, cFtpAddress, nPort, cUser, cPass, nService, 0, 0 )\n\n IF hconnect == 0\n ALERT (\"ERROR EN CONEXION.\",,\"Descarga\",\"X\",,.t.)\n ELSE\n TRY\n lOk := FTPPUTFILE( hConnect, cOrigen, cDestino, 0, 0 )\n alert (lOk)\n CATCH\n ALERT (\"Error FTP.\",,\"Descarga\",\"X\",,.t.)\n END\n\nENDIF\n\nINTERNETCLOSEHANDLE( hConnect )\n\nINTERNETCLOSEHANDLE( hInternet )\n\nRETURN nil\n\n\n3) Llama a esa funcion desde cualquier parte de tu programa, sustituyendo las variables por las tuyas:\nSubirFtp(\"ftp.xxxx.com\",;\n \"nombreUsuarioFTP\",;\n \"claveUsuarioFTP\",;\n \"csv/pepe1.txt\", ; // donde tienes el fichero origen\n \"/html/csv/pepe2.txt\",; // donde quieres colocar en el servidor el fichero\n 21, 1 ) // 21 es el puerto FTP y 1 es el servicio\n\n\n4) Si no te funciona, tómate un Redbull y prueba de nuevo.", "time": "13:26", "topic": "Cliente FTP con FW+xH", "username": "Manuel Valdenebro" } ]
Cliente FTP con FW+xH
[ { "date": "2012-01-29", "forum": "FiveWin para Harbour/xHarbour", "text": "usando script&#058;\n[code=fw:2z4wy576]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /><br />UploadFtp<span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"c:<span style=\"color: #000000;\">\\t</span>emp<span style=\"color: #000000;\">\\c</span>lientes.txt\"</span><span style=\"color: #000000;\">&#41;</span><br />DownloadFtp<span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"clientes.txt\"</span><span style=\"color: #000000;\">&#41;</span><br />DeleteFtp<span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"clientes.txt\"</span><span style=\"color: #000000;\">&#41;</span><br /><br />*-----------------------------------------------------<br /><span style=\"color: #00C800;\">Function</span> DownloadFtp<span style=\"color: #000000;\">&#40;</span>cFile<span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;oText=TTxtFile<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;\">\"c:<span style=\"color: #000000;\">\\s</span>cript.txt\"</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;oText:<span style=\"color: #000000;\">Open</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;oText:<span style=\"color: #000000;\">Add</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"SeuLogin\"</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;oText:<span style=\"color: #000000;\">Add</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"SuaSenha\"</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;oText:<span style=\"color: #000000;\">Add</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"binary\"</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;oText:<span style=\"color: #000000;\">Add</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"get /www/test/\"</span>+cFile+<span style=\"color: #ff0000;\">\" c:<span style=\"color: #000000;\">\\c</span>lientes1.txt\"</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #B900B9;\">// pega o arquivo do ftp(pasta /www/test/) e grava no C: com o nome clientes1.txt </span><br />&nbsp; &nbsp;oText:<span style=\"color: #000000;\">Add</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"bye\"</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;oText:<span style=\"color: #000000;\">Add</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"quit\"</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;oText:<span style=\"color: #000000;\">Close</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;MyRun<span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"ftp -s:c:<span style=\"color: #000000;\">\\s</span>cript.txt ftp.teste.net.br\"</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #B900B9;\">// seu servidor de ftp nessa linha</span><br /><br />&nbsp; &nbsp;FERASE<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"c:<span style=\"color: #000000;\">\\s</span>cript.txt\"</span> <span style=\"color: #000000;\">&#41;</span><br /><span style=\"color: #00C800;\">Return</span> <span style=\"color: #00C800;\">nil</span><br />*-----------------------------------------------------<br /><span style=\"color: #00C800;\">Function</span> UploadFtp<span style=\"color: #000000;\">&#40;</span>cFile<span style=\"color: #000000;\">&#41;</span><br />&nbsp;FERASE<span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"c:<span style=\"color: #000000;\">\\s</span>cript.txt\"</span> <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;oText=TTxtFile<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;\">\"c:<span style=\"color: #000000;\">\\s</span>cript.txt\"</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;oText:<span style=\"color: #000000;\">Open</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;oText:<span style=\"color: #000000;\">Add</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"SeuLogin\"</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;oText:<span style=\"color: #000000;\">Add</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"SuaSenha\"</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;oText:<span style=\"color: #000000;\">Add</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"binary\"</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;oText:<span style=\"color: #000000;\">Add</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"cd /www/test\"</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #B900B9;\">//abri pasta para upload</span><br />&nbsp; &nbsp;oText:<span style=\"color: #000000;\">Add</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"put \"</span>+cFile<span style=\"color: #000000;\">&#41;</span> &nbsp; <span style=\"color: #B900B9;\">// envia o arquivo para para pasta aberta do ftp</span><br />&nbsp; &nbsp;oText:<span style=\"color: #000000;\">Add</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"bye\"</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;oText:<span style=\"color: #000000;\">Add</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"quit\"</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;oText:<span style=\"color: #000000;\">Close</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;MyRun<span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"ftp -s:c:<span style=\"color: #000000;\">\\s</span>cript.txt ftp.teste.net.br\"</span><span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp;FERASE<span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"c:<span style=\"color: #000000;\">\\s</span>cript.txt\"</span> <span style=\"color: #000000;\">&#41;</span><br /><br /><span style=\"color: #00C800;\">Return</span> <span style=\"color: #00C800;\">nil</span><br />*-----------------------------------------------------<br /><span style=\"color: #00C800;\">Function</span> DeleteFtp<span style=\"color: #000000;\">&#40;</span>cFile<span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;oText=TTxtFile<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;\">\"c:<span style=\"color: #000000;\">\\s</span>cript.txt\"</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;oText:<span style=\"color: #000000;\">Open</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;oText:<span style=\"color: #000000;\">Add</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"SeuLogin\"</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;oText:<span style=\"color: #000000;\">Add</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"SuaSenha\"</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;oText:<span style=\"color: #000000;\">Add</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"binary\"</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;oText:<span style=\"color: #000000;\">Add</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"delete /www/test/\"</span>+cFile<span style=\"color: #000000;\">&#41;</span> deleta o arquivo da pasta /www/test <span style=\"color: #00C800;\">do</span> seu ftp<br />&nbsp; &nbsp;oText:<span style=\"color: #000000;\">Add</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"bye\"</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;oText:<span style=\"color: #000000;\">Add</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"quit\"</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;oText:<span style=\"color: #000000;\">Close</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;MyRun<span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"ftp -s:c:<span style=\"color: #000000;\">\\s</span>cript.txt ftp.teste.com.br\"</span><span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;FERASE<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"c:<span style=\"color: #000000;\">\\s</span>cript.txt\"</span> <span style=\"color: #000000;\">&#41;</span><br /><span style=\"color: #00C800;\">Return</span> <span style=\"color: #00C800;\">nil</span><br /><br /><span style=\"color: #B900B9;\">//----------------------------------------------------------*--------------------------------</span><br /><span style=\"color: #00C800;\">Function</span> MYRUN<span style=\"color: #000000;\">&#40;</span> cComando <span style=\"color: #000000;\">&#41;</span><br /><span style=\"color: #00C800;\">Local</span> oShell, RET<br /><br />&nbsp; oShell := CreateObject<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"WScript.Shell\"</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; RET := oShell:<span style=\"color: #000000;\">Run</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"%comspec% /c \"</span> + cComando, <span style=\"color: #000000;\">0</span>, .T. <span style=\"color: #000000;\">&#41;</span><br />&nbsp; oShell := <span style=\"color: #00C800;\">NIL</span><br /><br /><span style=\"color: #00C800;\">Return</span> iif<span style=\"color: #000000;\">&#40;</span> RET = <span style=\"color: #000000;\">0</span>, .T., .F. <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp;</div>[/code:2z4wy576]", "time": "20:14", "topic": "Cliente FTP con FW+xH", "username": "roberio" } ]
Cliente FTP con FW+xH
[ { "date": "2012-01-30", "forum": "FiveWin para Harbour/xHarbour", "text": "Estimados, he encontrado que en las versiones recientes de fwh y xharbour, con harour no he probado \nla funcion file esta fallando en ubicar archivos ubicados en la misma carpeta de la applicacion \nesto luego de ocupar la instrucion set defa to\n\npor ejemplo\n[code=fw:31bdq0y5]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br />?file<span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"miapp.exe\"</span><span style=\"color: #000000;\">&#41;</span> &nbsp; <span style=\"color: #B900B9;\">//aca retorna .t.</span><br />set defa <span style=\"color: #0000ff;\">to</span> d:\\miapp\\datos<br />?file<span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"miapp.exe\"</span><span style=\"color: #000000;\">&#41;</span> &nbsp; <span style=\"color: #B900B9;\">//aca retorna .f.</span><br />set path <span style=\"color: #0000ff;\">to</span> <span style=\"color: #ff0000;\">\".<span style=\"color: #000000;\">\\\"</span><br />?file(\"</span>miapp.exe<span style=\"color: #ff0000;\">\") &nbsp; //aca retorna .t.<br /></span></div>[/code:31bdq0y5]", "time": "02:10", "topic": "Cliente FTP con FW+xH", "username": "carlos vargas" } ]
Cliente FTP con FW+xH
[ { "date": "2012-05-02", "forum": "FiveWin para Harbour/xHarbour", "text": "Gracias a todos por sus aportes...\n\nCiertamente mis versiones de xHarbour y de FW estaban algo desactualizadas, por lo que antes de intentar otras alternativas (incluidas algunas de las que me han sugerido en este hilo) decidi actualizar mis versiones de xH, FWH, y los sistemas que he desarrollado con esas herramientas.\n\nSin embargo, una vez estando actualizado me encontre que los ejemplos igual muestran el mensaje de error \"Cannot load WinINet.dll!\" lo cual aparentemente, y segun lo que he leido en otros hilos, se debe a algun problema de compatibilidad entre xH, FW y Windows, ya que aun teniendo la ultima version de WinINet.dll, y teniendo todos los paths bien direccionados se mantiene el problema de que no se carga la fulana DLL.\n\nVeo que yo no he sido el unico al que se le ha presentado el problema, y las soluciones siguen siendo problematicas porque en la mayoría de los casos no funcionan, sin embargo di con un post de Enrico Maria Giordano donde plantea una solución que me funcionó perfecto y de hecho creo que es lo que a la final implementaré... <!-- m --><a class=\"postlink\" href=\"http://fivetechsupport.com/forums/viewtopic.php?f=3&t=23075&p=123966&hilit=tftp#p123966\">http://fivetechsupport.com/forums/viewt ... tp#p123966</a><!-- m -->\n\nEl tema de los scripts me parece interesante... no lo he probado, pero seguro que lo haré en lo que tenga algun rato libre...\n\nGracias a Todos por su apoyo y su granito de arena...\nUn Abrazo y seguro los estaré molestando en alguna otra oportunidad.\n\nGiancarlo J. Sabattino S.\nValencia, Venezuela", "time": "02:52", "topic": "Cliente FTP con FW+xH", "username": "gsabattino" } ]
Cliente FTP con FW+xH
[ { "date": "2009-04-21", "forum": "Off Topic / Otros temas", "text": "Hola a todos,\n\nA ver como se lo explico a ustedes.\nYa les anticipo que aun no gogleado sobre el tema, y que soy autodidacta, no diplomado.\n\nSe me presenta la ocasión de crear una aplicación del lado Servidor. (El cliente pedirá mediante un WebService [que ya veré como lo toreo]).\n\nLa aplicación recibirá peticiones de hacer algo, contestar la respuesta y dar por acabada la pecitión; es decir lo que se haría sería del tipo \"oye servidor, aquí tienes esta cadena, grábala en un fichero y dime el nombre del fichero que has grabado\". No hay un diálogo de varios mensajes entre el cliente y el servidor.\n\nAhora les comento lo que me han explicado (no lo abré oído bien).\n\nVan y me cuentan (una persona que en principio sabe mucho más que yo):\n-cuando recibas la petición del cliente, vas y lanzas tu exe, que haga lo que deba, conteste al cliente y se cierre.\nY esto debe hacerlo para cada petición del cliente.\n\nY yo pienso, entonces si se da el caso de tener unas 10 peticiones concurrentes (para el caso concreto sería posible), habrán 10 exe ejecutándose.\n\nY yo les pregunto a ustedes del foro, esto es así? un Servidor se comporta de esta manera? No se utilizan multihilos? O algo parecido? El Servidor, no está escuchando y gestionando mensajes del tipo \"ya te he oído, estoy saturado, espera un momento, ahora te atiendo, etc.\"?\n\nPor favor láncenme algún comentario, o si puedo encontrar algo para ignorantes que me guie.\n\nPara acabar, lo harían ustedes con Harbour? y con FiveWin y Harbour?\n\nSaludos y gracias\nCarlos G.", "time": "18:10", "topic": "Cliente Servidor. Como empezar.", "username": "FiveWiDi" } ]
Cliente Servidor. Como empezar.
[ { "date": "2009-04-27", "forum": "Off Topic / Otros temas", "text": "Carlos,\n\nA cuantos clientes tendria que atender, aproximadamente ?", "time": "10:50", "topic": "Cliente Servidor. Como empezar.", "username": "Antonio Linares" } ]
Cliente Servidor. Como empezar.
[ { "date": "2009-04-27", "forum": "Off Topic / Otros temas", "text": "[quote=\"Antonio Linares\":1y9pbg3f]Carlos,\n\nA cuantos clientes tendria que atender, aproximadamente ?[/quote:1y9pbg3f]\n\nGracias Antonio,\n\nPodrían llegar a ser unas 10 ó 15 en el mismo instante (concurrentes), y el trabajo que debería realizar el ejecutable podría tardar de 3 a 5 segundos; por tanto estamos hablando en el peor de los casos de un máximo de unas 60 peticiones ejecutándose en el mismo segundo.\nEsta punta de trabajo no es constante, sino que se trataría del momento del día con más solicitud, teniéndose que ejecutar unas 2500 solicitudes de clientes diferentes en 20 minutos.\n\nLo conocido són las 2500 solicitudes i los 20 minutos, el resto es aproximado y buscando el límite.\nY estoy pensando en utilizar un control Activex para crear un documento en RTF (documento dinámico y bastante complicado por cierto).\n\nGracias de nuevo.\nCarlos G.", "time": "13:58", "topic": "Cliente Servidor. Como empezar.", "username": "FiveWiDi" } ]
Cliente Servidor. Como empezar.
[ { "date": "2009-04-29", "forum": "Off Topic / Otros temas", "text": "Carlos,\n\nDoug ha desarrollado una aplicación cliente servidor por sockets bastante interesante:\n<!-- l --><a class=\"postlink-local\" href=\"http://forums.fivetechsupport.com/viewtopic.php?f=3&t=12269&start=0\">viewtopic.php?f=3&t=12269&start=0</a><!-- l -->\n\nPosiblemente puedas usar su trabajo como referencia y punto de partida de lo que quieres hacer <!-- s:-) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":-)\" title=\"Smile\" /><!-- s:-) -->\n\nContacta con él, que seguro te ayudará con la implementación <!-- s:-) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":-)\" title=\"Smile\" /><!-- s:-) -->", "time": "02:41", "topic": "Cliente Servidor. Como empezar.", "username": "Antonio Linares" } ]
Cliente Servidor. Como empezar.
[ { "date": "2009-04-29", "forum": "Off Topic / Otros temas", "text": "[quote=\"Antonio Linares\":1dphrrfj]Carlos,\n\nDoug ha desarrollado una aplicación cliente servidor por sockets bastante interesante:\n<!-- l --><a class=\"postlink-local\" href=\"http://forums.fivetechsupport.com/viewtopic.php?f=3&t=12269&start=0\">viewtopic.php?f=3&t=12269&start=0</a><!-- l -->\n\nPosiblemente puedas usar su trabajo como referencia y punto de partida de lo que quieres hacer <!-- s:-) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":-)\" title=\"Smile\" /><!-- s:-) -->\n\nContacta con él, que seguro te ayudará con la implementación <!-- s:-) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":-)\" title=\"Smile\" /><!-- s:-) -->[/quote:1dphrrfj]\nGracias Antonio,\n\nYa lo he leído, parece ser una especie de cliente-servidor personalizado y adaptable según necesidades.\nLa solución que plantea me gusta e intuyo que puede llegar a desencadenar 'loquesea' del lado servidor.\n\nPor otro lado, no entiendo porque en sus primeros mensajes dice no quiere usar LeToDB si lo que persigue es trabajar sobre DBF (en otros posteriores dice que no entiende/le es dificil el 'C'); mi nivel de ingles es bajo.\n\nUn saludo\nCarlos G.", "time": "17:32", "topic": "Cliente Servidor. Como empezar.", "username": "FiveWiDi" } ]
Cliente Servidor. Como empezar.
[ { "date": "2009-04-30", "forum": "Off Topic / Otros temas", "text": "Carlos,\n\nDoug ha optado por construirse una solucion 100% suya, lo cual es muy interesante, pues podrias adaptarla a tus necesidades <!-- s:-) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":-)\" title=\"Smile\" /><!-- s:-) -->", "time": "09:37", "topic": "Cliente Servidor. Como empezar.", "username": "Antonio Linares" } ]
Cliente Servidor. Como empezar.
[ { "date": "2009-05-01", "forum": "Off Topic / Otros temas", "text": "[quote=\"Antonio Linares\":z0chq2lo]Carlos,\n\nDoug ha optado por construirse una solucion 100% suya, lo cual es muy interesante, pues podrias adaptarla a tus necesidades <!-- s:-) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":-)\" title=\"Smile\" /><!-- s:-) -->[/quote:z0chq2lo]\n\nGracias, la tendré en cuenta.\n\nUn saludo\nCarlos G.", "time": "22:03", "topic": "Cliente Servidor. Como empezar.", "username": "FiveWiDi" } ]
Cliente Servidor. Como empezar.
[ { "date": "2007-02-17", "forum": "FiveWin para Harbour/xHarbour", "text": "Alguien tiene desarrollado algo con sockets para usar como cliente telnet.", "time": "20:47", "topic": "Cliente Telnet", "username": "Biel EA6DD" } ]
Cliente Telnet
[ { "date": "2007-02-18", "forum": "FiveWin para Harbour/xHarbour", "text": "Biel\n\nYou can try modify a FTP Class inputing de Telnet commands.\n\nSee this page with telnet commands explanation:\n\n<!-- m --><a class=\"postlink\" href=\"http://www.math.utah.edu/computing/unix/unix-commands.html\">http://www.math.utah.edu/computing/unix ... mands.html</a><!-- m -->", "time": "20:26", "topic": "Cliente Telnet", "username": "Rochinha" } ]
Cliente Telnet
[ { "date": "2007-02-19", "forum": "FiveWin para Harbour/xHarbour", "text": "Rochinha, thanks for your answer. I will take a look to the FTP class and the link you have sended.", "time": "15:21", "topic": "Cliente Telnet", "username": "Biel EA6DD" } ]
Cliente Telnet
[ { "date": "2007-02-19", "forum": "FiveWin para Harbour/xHarbour", "text": "Biel,\n\nThe class below is more complete:\n\n[code:3tc5y7wu]\n// Original work from Alex Shaft & Peter Kohler, with mods by Byron Hopp, Rimantas Usevicius\n// Modified by Luis Krause May 10, 2003, Optimized and cleaned up code\n// Fixed &#58;&#58;Retr&#40;&#41; & &#58;&#58;Dir&#40;&#41; bugs\n// added progress bar capability\n// Made socket calls compatible with modified TSocket class &#40;TSmtp, etc&#46;&#41;\n// Added a timeout to escape from &#58;&#58;DoWait&#40;&#41; to avoid hanging up the system\n// Added Proxy support &#40;needs more testing&#41;\n// October 14, 2003, Optimized &#58;&#58;Retr&#40;&#41; & &#58;&#58;Dir&#40;&#41; more - much faster now\n// &#58;&#58;oTrnSocket wasn't being properly released&#46; Fixed!\n// May 8, 2003 More fixes to &#58;&#58;Retr???&#40;&#41; methods\n// Fixed &#58;&#58;Stor&#40;&#41;, added IVAR nDelay to allow upload to work\n// Entries in log file use the following codes&#58;\n// \"E&#58;\" an error occurred; description follows\n// \"I&#58;\" info about the current operation executed\n// \"S&#58;\" data/action sent to the ftp server\n// \"R&#58;\" reply/response returned by ftp server\n\n#include \"FiveWin&#46;ch\"\n#include \"Directry&#46;ch\"\n\n#ifndef __CLIPPER__\n#xtranslate Memory&#40;<n>&#41; => // only needed with Clipper, not Harbour\n#endif\n\n#define BLOCK_SIZE 10240\n\n#define ST_CLOSED 0\n#define ST_CONNECTING 1\n#define ST_CONNECTED 2\n#define ST_CONNECTERR 3\n\n#define ST_DOCWD 4\n#define ST_DONECWD 5\n#define ST_CWDERROR 6\n\n#define ST_DOTYPE 7\n#define ST_TYPEOK 8\n#define ST_TYPEBAD 9\n\n#define ST_DOPORT 10\n#define ST_PORTOK 11\n#define ST_PORTBAD 12\n\n#define ST_DOSTOR 13\n#define ST_STOROK 14\n#define ST_STORBAD 15\n#define ST_STORDONE 16\n\n#define ST_DOPASV 17\n#define ST_PASVOK 18\n#define ST_PASVBAD 19\n\n#define ST_DOQUIT 20\n#define ST_QUITOK 21\n#define ST_QUITBAD 22\n\n#define ST_DODIR 23\n#define ST_DIROK 24\n#define ST_DIRBAD 25\n#define ST_DIRDONE 26\n#define ST_DIRREADY 126\n\n#define ST_DOPWD 27\n#define ST_DONEPWD 28\n#define ST_PWDERROR 29\n\n#define ST_DORENFROM 30\n#define ST_RENFROMOK 31\n#define ST_RENFROMBAD 32\n#define ST_DORENTO 33\n#define ST_RENTOOK 34\n#define ST_RENTOBAD 35\n\n#define ST_DODELETE 36\n#define ST_DELETEOK 37\n#define ST_DELETEBAD 38\n\n#define ST_DOMKDIR 39\n#define ST_MKDIROK 40\n#define ST_MKDIRBAD 41\n\n#define ST_DORETR 42\n#define ST_RETROK 43\n#define ST_RETRBAD 44\n#define ST_RETRDONE 45\n\n#define ST_DOABOR 46\n#define ST_ABOROK 47\n#define ST_ABORBAD 48\n\n#define ST_DORMDIR 49\n#define ST_RMDIROK 50\n#define ST_RMDIRBAD 51\n\n#define NTRIM&#40;n&#41; &#40; LTrim&#40; Str&#40; n &#41; &#41; &#41;\n\n/*\nFunction Main&#40;&#41;\n\n local oWin\n\n DEFINE WINDOW oWin ;\n TITLE \"FTP Test\"\n\n ACTIVATE WINDOW oWin ;\n ON INIT FTPTest&#40;&#41;\n\nreturn nil\n\nStatic Function FTPTest&#40;&#41;\n\n local oFTP\n\n Ferase&#40;\"logftp&#46;txt\"&#41;\n\n oFTP &#58;= qFTPClient&#40;&#41;&#58;New&#40;\"10&#46;1&#46;1&#46;2\", 21, &#123;|cMessage| Logfile&#40;\"logftp&#46;txt\", &#123;cMessage&#125;&#41;&#125;,, ;\n \"alex\", \"secret\"&#41;\n\n // oFTP&#58;bAbort &#58;= &#123;|| oApp&#40;&#41;&#58;oFrmmain&#58;lFormClosed&#125;\n oFTP&#58;lPassive &#58;= &#46;T&#46;\n if oFTP&#58;Connect&#40;&#41;\n MsgInfo&#40;\"Connection successful to \" + oFTP&#58;cServer + CRLF + oFTP&#58;cServerIP + CRLF + oFTP&#58;oSocket&#58;ClientIP&#40;&#41;&#41;\n\n if oFTP&#58;Cd&#40;\"/home/alex\"&#41;\n MSginfo&#40;\"Successfully changed dir to /pub\"&#41;\n\n if oFTP&#58;Dir&#40;&#41;\n Msginfo&#40;\"Got directory listing\"&#41;\n //Aeval&#40;oFTP&#58;acDir, &#123;| cDir, nCount | Msginfo&#40;Str&#40;nCount&#41; + \" \" + cDir&#41;&#125;&#41;\n oFTP&#58;Retr&#40;\"/etc/hosts\", \"hosts&#46;txt\"&#41;\n oFTP&#58;Del&#40;\"hosts&#46;backup\"&#41;\n oFTP&#58;Stor&#40;\"hosts&#46;txt\", \"hosts&#46;txt\"&#41;\n oFTP&#58;Rename&#40;\"hosts&#46;txt\", \"hosts&#46;backup\"&#41;\n oFTP&#58;Quit&#40;&#41;\n oFTP&#58;End&#40;&#41;\n Msginfo&#40;\"Done\"&#41;\n else\n Msginfo&#40;\"Directory listing failed!\"&#41;\n oFTP&#58;Quit&#40;&#41;\n oFTP&#58;End&#40;&#41;\n endif\n else\n Msginfo&#40;\"CD to /pub failed!\"&#41;\n oFTP&#58;Quit&#40;&#41;\n oFTP&#58;End&#40;&#41;\n endif\n else\n Msginfo&#40;\"Connect failed!\"&#41;\n endif\n\nreturn nil\n\n*/\n\nCLASS qFTPClient\n\n #ifdef __CLIPPER__\n DATA oSocket, oTrnSocket, oProxy AS OBJECT, NIL\n #else\n DATA oSocket, oTrnSocket, oProxy AS OBJECT INIT Nil\n #endif\n\n DATA cServer, cServerIP, cUser, cPass, cBuffer, cLastCmd, cReply, cDirBuffer, ;\n cDataIP AS String INIT \"\"\n\n DATA nPort, nDataPort AS NUMERIC INIT 21\n\n DATA nStatus, nRetrHandle AS NUMERIC INIT 0\n\n DATA bResolving, bResolved, bDump, bAbort, bStorProgress ;\n AS Codeblock INIT Nil\n\n DATA lResolved, lConnected, lClosed, lSent, lSendFile, lPassive, lSentUser ;\n AS Logical Init &#46;F&#46;\n\n DATA acDir, acReply AS Array\n\n DATA nRetrFSize, nRetrBRead AS NUMERIC INIT 0\n\n // allow a small delay when uploading &#40;STOR command&#41; data if there's no way to get an acknowledgment from server\n DATA nDelay AS NUMERIC INIT 1\n\n // allow 30 seconds before we bump out of &#58;&#58;DoWait&#40;&#41; to avoid hanging up the system\n // set to 0 if you're pretty confident this won't happen to you &#58;o&#41;\n DATA nTimeOut AS NUMERIC INIT 30\n\n\n Method New&#40; cServer, nPort, bDump, bAbort, cUser, cPass, cProxyIP, nProxyPort, cProxyLog &#41; Constructor\n\n Method End&#40;&#41;\n\n Method Connect&#40;&#41;\n\n Method OnConnect&#40; oSocket, nWSAError &#41;\n Method OnRead&#40; oSocket, nWSAError &#41;\n Method OnClose&#40; oSocket, nWSAError &#41;\n\n Method Port&#40; oTransSocket &#41;\n\n Method CD&#40; cPath &#41;\n\n Method Pwd&#40;&#41;\n\n Method XfrType&#40; cType &#41;\n\n Method Stor&#40; cLocal, cRemote, bStorProgess, oMeter, oText &#41;\n Method StorAccept&#40; opSocket, nWSAError, cFile, oMeter, oText &#41; Hidden\n Method StorClose&#40; oSocket, nWSAError, cFile, oMeter, oText &#41; Hidden\n\n Method Dir&#40; cLoc &#41;\n Method DirAccept&#40; opSocket, nWSAError &#41; Hidden\n Method DirRead&#40; oSocket, nWSAError &#41; Hidden\n Method DirClose&#40; oSocket, nWSAError &#41; Hidden\n\n Method Dump&#40; cMsg &#41;\n\n Method Quit&#40;&#41;\n Method Bye&#40;&#41; Inline &#58;&#58;Quit&#40;&#41;\n\n Method DoWait&#40; nState &#41; Hidden\n\n Method Del&#40; cFile &#41;\n\n Method Rename&#40; cFrom, cTo &#41;\n\n Method MkDir&#40; cDir &#41;\n\n Method RmDir&#40; cDir &#41;\n\n Method Retr&#40; cRemote, cLocal, oMeter, oText &#41;\n Method RetrAccept&#40; opSocket, nWSAError, cFile, oMeter, oText &#41; Hidden\n Method RetrRead&#40; oSocket, nWSAError, cFile, oMeter, oText &#41; Hidden\n Method RetrClose&#40; oSocket, nWSAError, cFile, oMeter, oText &#41; Hidden\n\n Method Abort&#40;&#41;\n\n Method Pasv&#40;&#41;\n\nEndClass\n\n//---------------------------------------------------------------------------------------------//\n/*\n Creates FTP Object\n\n Parameters &#58; cServer &#58; Servername e&#46;g&#46; ftp&#46;microsoft&#46;com or 207&#46;46&#46;133&#46;140\n nPort &#58; Server FTP Port&#46; Defaults to 21\n bDump &#58; Codeblock to send all commands sent, and replies received to&#46; Useful for logging, etc&#46;\n bAbort &#58; Codeblock, which if eval's to True, will abort any current waiting process&#46;\n cUser &#58; User name to log-in with\n cPass &#58; Password to log-in with\n cProxyIP &#58; Optional Proxy IP Address\n nProxyPort &#58; Optional Proxy Port No&#46;\n cProxyLog &#58; Optional Proxy Logfile\n*/\nMethod New&#40; cServer, nPort, bDump, bAbort, cUser, cPass, ;\n cProxyIP, nProxyPort, cProxyLog &#41; Class qFTPClient\n\n Default cServer &#58;= \"10&#46;1&#46;1&#46;2\", ;\n nPort &#58;= 21, ;\n bAbort &#58;= &#123;|| &#46;F&#46; &#125;, ;\n cUser &#58;= \"anonymous\", ;\n cPass &#58;= \"fwuser@fivetech&#46;com\", ;\n cProxyIP &#58;= \"0&#46;0&#46;0&#46;0\", ;\n nProxyPort &#58;= 0\n\n &#58;&#58;cServer &#58;= cServer\n &#58;&#58;nPort &#58;= nPort\n &#58;&#58;bAbort &#58;= bAbort\n &#58;&#58;bDump &#58;= bDump\n\n &#58;&#58;acDir &#58;= &#123;&#125;\n &#58;&#58;acReply &#58;= &#123;&#125;\n\n &#58;&#58;cUser &#58;= cUser\n &#58;&#58;cPass &#58;= cPass\n\n If Val&#40; cProxyIP &#41; > 0 &#46;and&#46; nProxyPort > 0\n &#58;&#58;oProxy &#58;= TProxy&#40;&#41;&#58;New&#40; nProxyPort, cProxyIP &#41;\n &#58;&#58;oProxy&#58;lDebug &#58;= bDump # Nil\n If cProxyLog # Nil\n &#58;&#58;oProxy&#58;cLogFile &#58;= cProxyLog\n Endif\n &#58;&#58;oProxy&#58;Activate&#40;&#41;\n Endif\n\nReturn Self\n\n//---------------------------------------------------------------------------------------------//\n/*\n Internal method to give feedback to caller\n*/\nMethod Dump&#40; cMsg &#41; Class qFTPClient\n\n If ValType&#40; &#58;&#58;bDump &#41; == \"B\" &#46;and&#46; ValType&#40; cMsg &#41; == \"C\"\n Eval&#40; &#58;&#58;bDump, cMsg &#41;\n Endif\n\nReturn Nil\n\n//---------------------------------------------------------------------------------------------//\n/*\n Logs into the FTP Server, using parameters specified with New Method&#46;\n Returns True or False based on connection success\n*/\nMethod Connect&#40;&#41; Class qFTPClient\n Local nReturn\n Local lOK &#58;= &#46;F&#46; // was &#46;T&#46; - Thanks to Roberto Chiaiese\n\n &#58;&#58;lResolved &#58;= &#46;F&#46;\n\n &#58;&#58;oSocket &#58;= TSocket&#40;&#41;&#58;New&#40;0&#41;\n\n If ValType&#40; &#58;&#58;bResolving &#41; == \"B\"\n Eval&#40; &#58;&#58;bResolving, Self &#41;\n Endif\n\n If IsAlpha&#40; &#58;&#58;cServer &#41;\n &#58;&#58;cServerIP &#58;= GetHostByName&#40; AllTrim&#40; &#58;&#58;cServer &#41; &#41; // PK Note this hogs the pc for up to 35 seconds if it cannot be resolved\n Else\n &#58;&#58;cServerIP &#58;= &#58;&#58;cServer\n Endif\n\n If &#58;&#58;lResolved &#58;= Val&#40; &#58;&#58;cServerIP &#41; > 0\n\n &#58;&#58;oSocket&#58;bConnect &#58;= &#123;|o,n| &#58;&#58;OnConnect&#40; o, n &#41; &#125; // lkm - see adjustment to TSocket class\n &#58;&#58;oSocket&#58;bRead &#58;= &#123;|o,n| &#58;&#58;OnRead&#40; o, n &#41; &#125;\n &#58;&#58;oSocket&#58;bClose &#58;= &#123;|o,n| &#58;&#58;OnClose&#40; o, n &#41; &#125;\n\n &#58;&#58;nStatus &#58;= ST_CONNECTING\n Memory&#40;-1&#41; // cleanup memory when connecting frequently\n &#58;&#58;oSocket&#58;Connect&#40; &#58;&#58;cServerIP, &#58;&#58;nPort &#41;\n\n &#58;&#58;DoWait&#40; ST_CONNECTING &#41;\n\n lOK &#58;= &#58;&#58;nStatus == ST_CONNECTED\n If ValType&#40; &#58;&#58;bResolved &#41; == \"B\"\n Eval&#40; &#58;&#58;bResolved, Self &#41;\n Endif\n\n Endif\n\nReturn lOk\n\n//---------------------------------------------------------------------------------------------//\n/*\n Internal method to handle connection established&#46;\n Note it only checks for a bad connection&#46; The rest is done by OnRead\n*/\nMethod OnConnect&#40; oSocket, nWSAError &#41; Class qFTPClient\n\n If Val&#40; oSocket&#58;ClientIP&#40;&#41; &#41; == 0\n &#58;&#58;lConnected &#58;= &#46;F&#46;\n &#58;&#58;nStatus &#58;= ST_CONNECTERR\n Endif\n\nReturn Nil\n\n//---------------------------------------------------------------------------------------------//\n/*\n Internal method to handle data received by control socket\n*/\nMethod OnRead&#40; oSocket, nWSAError &#41; Class qFTPClient\n Local cData &#58;= \"\"\n Local nPos &#58;= 0, nPos1, nPos2\n Local cCmd &#58;= \"\"\n\n cData &#58;= oSocket&#58;GetData&#40;&#41;\n\n &#58;&#58;cBuffer += cData\n\n Do While &#40; nPos &#58;= At&#40; CRLF, &#58;&#58;cBuffer &#41; &#41; > 0 &#46;and&#46; ! Eval&#40; &#58;&#58;bAbort &#41;\n AAdd&#40; &#58;&#58;acReply, Left&#40; &#58;&#58;cBuffer, nPos - 1 &#41; &#41;\n &#58;&#58;cBuffer &#58;= SubStr&#40; &#58;&#58;cBuffer, nPos + 2 &#41;\n Enddo\n\n AEval&#40; &#58;&#58;acReply, &#123;|cReply| &#58;&#58;Dump&#40; \"R&#58;\" + NTRIM&#40; &#58;&#58;nStatus &#41; + \"&#58;\" + cReply &#41; &#125; &#41;\n If Len&#40; &#58;&#58;acReply &#41; > 0 &#46;and&#46; ;\n Val&#40; Left&#40; ATail&#40; &#58;&#58;acReply &#41;, 3 &#41; &#41; > 0 &#46;and&#46; ; // i&#46;e&#46; skip stuff like&#58;\n SubStr&#40; ATail&#40; &#58;&#58;acReply &#41;, 4, 1 &#41; == \" \" // \"230-\" or \" ***\"\n\n // Full reply received\n &#58;&#58;cReply &#58;= ATail&#40; &#58;&#58;acReply &#41;\n cCmd &#58;= Left&#40; &#58;&#58;cReply, 3 &#41; // Left&#40; &#58;&#58;acReply&#91;1&#93;, 3 &#41; <<- caused a ton of problems!\n\n Do Case\n Case cCmd == \"530\" &#46;or&#46; ; // Login incorrect&#46; &#91;or other error&#93;\n &#58;&#58;nStatus == ST_CLOSED &#46;or&#46; &#58;&#58;nStatus == ST_CONNECTERR\n &#58;&#58;nStatus &#58;= ST_DOQUIT\n &#58;&#58;lConnected &#58;= &#46;F&#46;\n\n Case &#58;&#58;nStatus == ST_CONNECTING\n Do Case\n Case cCmd == \"220\" // Ready for user| ProFTPD 1&#46;2&#46;2rc1 Server &#40;ProFTPD&#41; &#91;n&#46;n&#46;n&#46;n&#93;\n &#58;&#58;Dump&#40; \"S&#58;\" + NTRIM&#40; &#58;&#58;nStatus &#41; + \"&#58;USER *************\" &#41; // + AllTrim&#40; &#58;&#58;cUser &#41;\n oSocket&#58;SendData&#40; \"USER \" + AllTrim&#40; &#58;&#58;cUser &#41; + CRLF &#41;\n &#58;&#58;lSentUser &#58;= &#46;T&#46;\n Case cCmd == \"331\" // Password required for &#58;&#58;cUser&#46;\n &#58;&#58;Dump&#40; \"S&#58;\" + NTRIM&#40; &#58;&#58;nStatus &#41; + \"&#58;PASS *************\" &#41;\n oSocket&#58;SendData&#40; \"PASS \" + AllTrim&#40; &#58;&#58;cPass &#41; + CRLF &#41;\n Case cCmd == \"230\" // User &#58;&#58;cUser logged in&#46;\n &#58;&#58;nStatus &#58;= ST_CONNECTED\n &#58;&#58;lConnected &#58;= &#46;T&#46;\n Otherwise\n &#58;&#58;nStatus &#58;= ST_CONNECTERR\n EndCase\n\n Case &#58;&#58;nStatus == ST_DOCWD\n Do Case\n Case cCmd == \"250\" // CWD command successful&#46;\n &#58;&#58;nStatus &#58;= ST_DONECWD\n Otherwise\n &#58;&#58;nStatus &#58;= ST_CWDERROR\n EndCase\n\n Case &#58;&#58;nStatus == ST_DOQUIT\n &#58;&#58;lConnected &#58;= &#46;F&#46;\n Do Case\n Case cCmd == \"221\" &#46;or&#46; cCmd == \"530\" // Goodbye&#46;\n &#58;&#58;nStatus &#58;= ST_QUITOK\n Otherwise\n &#58;&#58;nStatus &#58;= ST_QUITBAD\n EndCase\n\n Case &#58;&#58;nStatus == ST_DODELETE\n Do Case\n Case cCmd == \"250\" // DEL command successful&#46;\n &#58;&#58;nStatus &#58;= ST_DELETEOK\n Otherwise\n &#58;&#58;nStatus &#58;= ST_DELETEBAD\n EndCase\n\n Case &#58;&#58;nStatus == ST_DOPWD\n Do Case\n Case cCmd == \"257\" // PWD command successful&#46;\n &#58;&#58;nStatus &#58;= ST_DONEPWD\n Otherwise\n &#58;&#58;nStatus &#58;= ST_PWDERROR\n EndCase\n\n Case &#58;&#58;nStatus == ST_DOPORT\n Do Case\n Case cCmd == \"200\" // OK\n &#58;&#58;nStatus &#58;= ST_PORTOK\n Otherwise\n &#58;&#58;nStatus &#58;= ST_PORTBAD\n EndCase\n\n Case &#58;&#58;nStatus == ST_DOTYPE\n Do Case\n Case cCmd == \"200\" // Type set to x&#46;\n &#58;&#58;nStatus &#58;= ST_TYPEOK\n Otherwise\n &#58;&#58;nStatus &#58;= ST_TYPEBAD\n EndCase\n\n Case &#58;&#58;nStatus == ST_DOSTOR\n Do Case\n Case cCmd == \"150\"\n &#58;&#58;nStatus &#58;= ST_STOROK\n &#58;&#58;lSendFile &#58;= &#46;T&#46;\n Otherwise\n &#58;&#58;nStatus &#58;= ST_STORBAD\n EndCase\n\n Case &#58;&#58;nStatus == ST_STOROK\n Do Case\n Case cCmd == \"226\" // OK\n &#58;&#58;nStatus &#58;= ST_STORDONE\n Otherwise\n &#58;&#58;nStatus &#58;= ST_STORBAD\n EndCase\n\n Case &#58;&#58;nStatus == ST_DOPASV\n Do Case\n Case cCmd == \"227\" // Entering Passive Mode &#40;n,n,n,n,m,m&#41;&#46;\n &#58;&#58;nStatus &#58;= ST_PASVOK\n Otherwise\n &#58;&#58;nStatus &#58;= ST_PASVBAD\n EndCase\n\n Case &#58;&#58;nStatus == ST_DODIR\n Do Case\n Case cCmd == \"150\" // Opening ASCII mode data connection for &#91;file list&#93;\n &#58;&#58;nStatus &#58;= ST_DIROK\n Case cCmd == \"125\" // Data connection already open; Transfer starting&#46;\n &#58;&#58;nStatus &#58;= ST_DIROK // some ftp servers return 125 instead of 150\n Otherwise\n &#58;&#58;nStatus &#58;= ST_DIRBAD\n EndCase\n\n Case &#58;&#58;nStatus == ST_DIROK &#46;or&#46; &#58;&#58;nStatus == ST_DIRREADY\n Do Case\n Case cCmd == \"226\" // Transfer complete&#46;\n &#58;&#58;nStatus &#58;= ST_DIRDONE\n Otherwise\n &#58;&#58;nStatus &#58;= ST_DIRBAD\n EndCase\n\n Case &#58;&#58;nStatus == ST_DORETR\n Do Case\n Case cCmd == \"150\" // Opening BINARY mode data connection for cFile &#40;nnnnn bytes&#41;&#46;\n If &#58;&#58;nRetrBRead == 0 // in case it jumped the gun &#40;with small files sometimes ST_RETRDONE jumps the gun and file has already arrived!&#41;\n nPos1 &#58;= At&#40; \"&#40;\", &#58;&#58;cReply &#41;\n nPos2 &#58;= At&#40; \" bytes&#41;\", &#58;&#58;cReply &#41;\n &#58;&#58;nRetrFSize &#58;= Val&#40; SubStr&#40; &#58;&#58;cReply, nPos1 + 1, nPos2 - nPos1 - 1 &#41; &#41;\n Endif\n &#58;&#58;nStatus &#58;= ST_RETROK\n Case cCmd == \"125\" // command 150 never received, therefore we don't know the size of the file being retrieved\n If &#58;&#58;nRetrFSize == 0 // horrible hack, but it's the only\n &#58;&#58;nRetrFSize &#58;= 1 // way around this &#40;for the time being&#41;\n Endif\n &#58;&#58;nStatus &#58;= ST_RETROK\n Otherwise // a 550 means No such file or directory\n &#58;&#58;nStatus &#58;= ST_RETRBAD\n EndCase\n\n Case &#58;&#58;nStatus == ST_RETROK &#46;or&#46; &#58;&#58;nStatus == ST_RETRDONE\n Do Case\n Case cCmd == \"226\" // Transfer complete&#46;\n &#58;&#58;nStatus &#58;= ST_RETRDONE\n Otherwise\n &#58;&#58;nStatus &#58;= ST_RETRBAD\n EndCase\n\n Case &#58;&#58;nStatus == ST_DORENFROM\n Do Case\n Case cCmd == \"350\"\n &#58;&#58;nStatus &#58;= ST_RENFROMOK\n Otherwise\n &#58;&#58;nStatus &#58;= ST_RENFROMBAD\n EndCase\n\n Case &#58;&#58;nStatus == ST_DORENTO\n Do Case\n Case cCmd == \"250\"\n &#58;&#58;nStatus &#58;= ST_RENTOOK\n Otherwise\n &#58;&#58;nStatus &#58;= ST_RENTOBAD\n EndCase\n\n Case &#58;&#58;nStatus == ST_DOMKDIR\n Do Case\n Case cCmd == \"257\" // OK\n &#58;&#58;nStatus &#58;= ST_MKDIROK\n Otherwise\n &#58;&#58;nStatus &#58;= ST_MKDIRBAD\n EndCase\n\n Case &#58;&#58;nStatus == ST_DOABOR\n Do Case\n Case cCmd == \"426\" // Data connection closed, file transfer cFile aborted&#46;\n &#58;&#58;nStatus &#58;= ST_DOABOR // stay put for successful reply from server\n Case cCmd == \"225\" &#46;or&#46; cCmd == \"226\" // ABOR command successful&#46;\n &#58;&#58;nStatus &#58;= ST_ABOROK\n Otherwise\n &#58;&#58;nStatus &#58;= ST_ABORBAD\n EndCase\n\n Case &#58;&#58;nStatus == ST_DORMDIR\n Do Case\n Case cCmd == \"250\" // OK\n &#58;&#58;nStatus &#58;= ST_RMDIROK\n Otherwise\n &#58;&#58;nStatus &#58;= ST_RMDIRBAD\n EndCase\n\n Otherwise\n &#58;&#58;Dump&#40; \"E&#58;\" + NTRIM&#40; &#58;&#58;nStatus &#41; + \"&#58;Unknown exception on cmd \" + &#58;&#58;cReply &#41;\n\n EndCase\n\n Endif\n &#58;&#58;acReply &#58;= &#123;&#125;\n\nReturn Nil\n\n//---------------------------------------------------------------------------------------------//\n/*\n Used to get directory listing&#46;\n cLoc Parameter gives dir spec&#46;\n Returns true or false based on success\n When True&#46; Data var acDir will hold dir listing as returned by server&#46;\n*/\nMethod Dir&#40; cLoc &#41; CLASS qFTPClient\n Local lOK &#58;= &#46;T&#46;\n Local cPort &#58;= \"\"\n Local nPos &#58;= 0\n Local cLine &#58;= \"\"\n Local cSepChar &#58;= \"\"\n\n Default cLoc &#58;= \"\"\n\n &#58;&#58;acDir &#58;= &#123;&#125;\n &#58;&#58;cDirBuffer &#58;= \"\"\n\n &#58;&#58;oTrnSocket &#58;= TSocket&#40;&#41;&#58;New&#40;0&#41;\n\n If ! &#58;&#58;lPassive\n cPort &#58;= &#58;&#58;Port&#40; &#58;&#58;oTrnSocket &#41;\n\n &#58;&#58;oTrnSocket&#58;bAccept &#58;= &#123;|o,n| &#58;&#58;DirAccept&#40; o, n &#41; &#125;\n &#58;&#58;oTrnSocket&#58;Listen&#40;&#41;\n\n &#58;&#58;Dump&#40; \"I&#58;\" + NTRIM&#40; &#58;&#58;nStatus &#41; + \"&#58;Listening on port \" + NTRIM&#40; &#58;&#58;oTrnSocket&#58;nPort &#41; &#41;\n\n &#58;&#58;nStatus &#58;= ST_DOPORT\n &#58;&#58;Dump&#40; \"S&#58;\" + NTRIM&#40; &#58;&#58;nStatus &#41; + \"&#58;\" + cPort &#41;\n &#58;&#58;oSocket&#58;SendData&#40; cPort + CRLF &#41;\n\n &#58;&#58;DoWait&#40; ST_DOPORT &#41;\n lOK &#58;= &#58;&#58;nStatus == ST_PORTOK\n Else\n If &#58;&#58;Pasv&#40;&#41;\n If lOK &#58;= &#58;&#58;nDataPort > 0\n &#58;&#58;oTrnSocket&#58;bConnect &#58;= &#123;|o,n| &#58;&#58;DirAccept&#40; o, n &#41; &#125;\n &#58;&#58;oTrnSocket&#58;bRead &#58;= &#123;|o,n| &#58;&#58;DirRead&#40; o, n &#41; &#125;\n &#58;&#58;oTrnSocket&#58;bClose &#58;= &#123;|o,n| &#58;&#58;DirClose&#40; o, n &#41; &#125;\n &#58;&#58;Dump&#40; \"I&#58;\" + NTRIM&#40; &#58;&#58;nStatus &#41; + \"&#58;Connecting on IP&#58;port \" + &#58;&#58;cDataIP + \"&#58;\" + NTRIM&#40; &#58;&#58;nDataPort &#41; &#41;\n Memory&#40;-1&#41; // cleanup memory when connecting frequently\n &#58;&#58;oTrnSocket&#58;Connect&#40; &#58;&#58;cDataIP, &#58;&#58;nDataPort &#41;\n Endif\n Endif\n Endif\n\n If lOK\n &#58;&#58;nStatus &#58;= ST_DODIR\n &#58;&#58;Dump&#40; \"S&#58;\" + NTRIM&#40; &#58;&#58;nStatus &#41; + \"&#58;LIST \" + AllTrim&#40; cLoc &#41; &#41;\n &#58;&#58;oSocket&#58;SendData&#40; \"LIST \" + AllTrim&#40; cLoc &#41; + CRLF &#41;\n\n &#58;&#58;DoWait&#40; ST_DODIR &#41;\n &#58;&#58;DoWait&#40; ST_DIROK &#41;\n\n If lOK &#58;= &#58;&#58;nStatus == ST_DIRDONE\n &#58;&#58;Dump&#40; \"I&#58;\" + NTRIM&#40; &#58;&#58;nStatus &#41; + \"&#58;Interpreting dir listing\" &#41;\n cSepChar &#58;= CRLF\n nPos &#58;= At&#40; cSepChar, &#58;&#58;cDirBuffer &#41;\n If nPos == 0\n If ! Empty&#40; &#58;&#58;cDirBuffer &#41; // single line, just one file, THEREFORE there won't be any CRLF's!\n &#58;&#58;cDirBuffer += CRLF\n Else\n cSepChar &#58;= Chr&#40;10&#41;\n Endif\n nPos &#58;= At&#40; cSepChar, &#58;&#58;cDirBuffer &#41;\n Endif\n &#58;&#58;acDir &#58;= &#123;&#125;\n Do While nPos > 0 &#46;and&#46; ! Eval&#40; &#58;&#58;bAbort &#41;\n cLine &#58;= AllTrim&#40; Left&#40; &#58;&#58;cDirBuffer, nPos - 1 &#41; &#41;\n &#58;&#58;cDirBuffer &#58;= SubStr&#40; &#58;&#58;cDirBuffer, nPos + Len&#40; cSepChar &#41; &#41;\n cLine &#58;= AllTrim&#40; StrTran&#40; cLine, Chr&#40;0&#41;, \"\" &#41; &#41;\n\n If&#40; ! Empty&#40; cLine &#41;, AAdd&#40; &#58;&#58;acDir, cLine &#41;, Nil &#41;\n\n nPos &#58;= At&#40; cSepChar, &#58;&#58;cDirBuffer &#41;\n SysRefresh&#40;&#41;\n Enddo\n lOk &#58;= ! Empty&#40; &#58;&#58;acDir &#41;\n &#58;&#58;nStatus &#58;= ST_DIRREADY\n SysWait&#40; &#58;&#58;nDelay &#41; // allow time for server to respond\n Else\n &#58;&#58;Abort&#40;&#41;\n Endif\n Endif\n\n If &#58;&#58;oTrnSocket # Nil\n &#58;&#58;oTrnSocket&#58;End&#40;&#41;\n &#58;&#58;oTrnSocket &#58;= Nil\n Endif\n\nReturn lOK\n\n//---------------------------------------------------------------------------------------------//\n/*\n Internal method to manage directory socket\n*/\nMethod DirAccept&#40; opSocket, nWSAError &#41; Class qFTPClient\n Local oSocket\n\n If ! &#58;&#58;lPassive\n oSocket &#58;= TSocket&#40;&#41;&#58;Accept&#40; opSocket&#58;nSocket &#41;\n oSocket&#58;bRead &#58;= &#123;|o,n| &#58;&#58;DirRead&#40; o, n &#41; &#125;\n oSocket&#58;bClose &#58;= &#123;|o,n| &#58;&#58;DirClose&#40; o, n &#41; &#125;\n Endif\n &#58;&#58;Dump&#40; \"I&#58;\" + NTRIM&#40; &#58;&#58;nStatus &#41; + \"&#58;LIST data connection established\" &#41;\n\nReturn Nil\n\n//---------------------------------------------------------------------------------------------//\n/*\n Internal method to manage directory socket\n*/\nMethod DirRead&#40; oSocket, nWSAError &#41; Class qFTPClient\n Local cData &#58;= oSocket&#58;GetData&#40;&#41;\n\n &#58;&#58;cDirBuffer += cData\n &#58;&#58;Dump&#40; \"I&#58;\" + NTRIM&#40; &#58;&#58;nStatus &#41; + \"&#58;LIST data received\" &#41;\n\nReturn Nil\n\n//---------------------------------------------------------------------------------------------//\n/*\n Internal method to manage directory socket\n*/\nMethod DirClose&#40; oSocket, nWSAError &#41; Class qFTPClient\n\n &#58;&#58;Dump&#40; \"I&#58;\" + NTRIM&#40; &#58;&#58;nStatus &#41; + \"&#58;LIST data socket closed&#58;\" + CRLF + &#58;&#58;cDirBuffer &#41;\n oSocket&#58;Close&#40;&#41;\n &#58;&#58;nStatus &#58;= ST_DIRDONE\n\nReturn Nil\n\n//---------------------------------------------------------------------------------------------//\n/*\n Internal method to handle socket closed by server\n*/\nMethod OnClose&#40; oSocket, nWSAError &#41; Class qFTPClient\n\n &#58;&#58;Dump&#40; \"I&#58;\" + NTRIM&#40; &#58;&#58;nStatus &#41; + \"&#58;Server closed down\" &#41;\n &#58;&#58;lClosed &#58;= &#46;T&#46;\n &#58;&#58;nStatus &#58;= ST_CLOSED\n If ValType&#40; &#58;&#58;oSocket &#41; == \"O\"\n &#58;&#58;oSocket&#58;Close&#40;&#41;\n &#58;&#58;oSocket &#58;= Nil\n Endif\n\n If ValType&#40; &#58;&#58;oTrnSocket &#41; == \"O\"\n &#58;&#58;oTrnSocket&#58;Close&#40;&#41;\n &#58;&#58;oTrnSocket &#58;= Nil\n Endif\n\nReturn Nil\n\n//---------------------------------------------------------------------------------------------//\n/*\n Kills connections\n*/\nMethod End&#40;&#41; Class qFTPClient\n\n If ValType&#40; &#58;&#58;oSocket &#41; == \"O\"\n &#58;&#58;oSocket&#58;End&#40;&#41;\n &#58;&#58;oSocket &#58;= Nil\n Endif\n\n If ValType&#40; &#58;&#58;oTrnSocket &#41; == \"O\"\n &#58;&#58;oTrnSocket&#58;End&#40;&#41;\n &#58;&#58;oTrnSocket &#58;= Nil\n Endif\n\n If ValType&#40; &#58;&#58;oProxy &#41; == \"O\"\n &#58;&#58;oProxy&#58;End&#40;&#41;\n &#58;&#58;oProxy &#58;= Nil\n Endif\n\nReturn Nil\n\n//---------------------------------------------------------------------------------------------//\n/*\n Internal method to obtain unused port no&#46; for data connections&#46;\n*/\nMETHOD Port&#40; oTransSocket &#41; Class qFTPClient\n Local cIP &#58;= GetIP&#40; &#58;&#58;oSocket&#58;nSocket &#41;\n Local nPort\n Local cPort\n Local cComplement\n\n BindToPort&#40; oTransSocket&#58;nSocket, 0 &#41; // Get a free port from 1024 - 5000\n\n nPort &#58;= GetPort&#40; oTransSocket&#58;nSocket &#41;\n cPort &#58;= AllTrim&#40; Str&#40; Int&#40; nPort / 256 &#41;, 3 &#41; &#41;\n cComplement &#58;= AllTrim&#40; Str&#40; Int&#40; nPort % 256 &#41;, 3 &#41; &#41;\n\n oTransSocket&#58;nPort &#58;= nPort\n\nReturn \"PORT \" + StrTran&#40; AllTrim&#40; StrTran&#40; cIP, \"&#46;\", \",\" &#41; &#41; + ;\n \",\" + cPort + \",\" + cComplement, \" \", \"\" &#41;\n\n//---------------------------------------------------------------------------------------------//\n/*\n Change directory on FTP Server&#46;\n Returns True or False based on success\n*/\nMethod CD&#40; cPath &#41; Class qFTPClient\n Local lOK &#58;= &#46;T&#46;\n\n &#58;&#58;nStatus &#58;= ST_DOCWD\n &#58;&#58;Dump&#40; \"S&#58;\" + NTRIM&#40; &#58;&#58;nStatus &#41; + \"&#58;CWD \" + cPath &#41;\n &#58;&#58;oSocket&#58;SendData&#40; \"CWD \" + cPath + CRLF &#41;\n &#58;&#58;DoWait&#40; ST_DOCWD &#41;\n\n lOK &#58;= &#58;&#58;nStatus == ST_DONECWD\n\nReturn lOK\n\n//---------------------------------------------------------------------------------------------//\n/*\n Used internally to set Binary transfer mode for transfers\n*/\nMethod XfrType&#40; cType &#41; Class qFTPClient\n Local lOK &#58;= &#46;T&#46;\n\n Default cType &#58;= \"I\"\n\n &#58;&#58;nStatus &#58;= ST_DOTYPE\n &#58;&#58;Dump&#40; \"S&#58;\" + NTRIM&#40; &#58;&#58;nStatus &#41; + \"&#58;TYPE \" + cType &#41;\n &#58;&#58;oSocket&#58;SendData&#40; \"TYPE \" + cType + CRLF &#41;\n &#58;&#58;DoWait&#40; ST_DOTYPE &#41;\n\n lOK &#58;= &#58;&#58;nStatus == ST_TYPEOK\n\nReturn lOK\n\n//---------------------------------------------------------------------------------------------//\n/*\n Used to store files on server&#46;\n Parameters &#58; cLocal &#58; Local File to send\n cRemote &#58; Location to store file remotely\n bStorProgess &#58; Codeblock to get percent complete\n oMeter &#58; Meter object progress bar &#91;optional&#93;\n oText &#58; Say object used with meter object to display bytes processed &#91;optional&#93;\n Returns True or False based on success\n*/\nMethod Stor&#40; cLocal, cRemote, bStorProgress, oMeter, oText &#41; Class qFTPClient\n Local cRemFile &#58;= \"\"\n Local nPos &#58;= 0\n Local cPort &#58;= \"\"\n Local lOK &#58;= &#46;T&#46;\n\n Default cRemote &#58;= \"\", ;\n bStorProgress &#58;= &#123;|| Nil &#125;\n\n &#58;&#58;bStorProgress &#58;= bStorProgress\n\n &#58;&#58;lSendFile &#58;= &#46;F&#46;\n If Empty&#40; cRemote &#41;\n If &#40; nPos &#58;= RAt&#40; \"\\\", cLocal &#41; &#41; > 0\n cRemFile &#58;= SubStr&#40; cLocal, nPos + 1 &#41;\n Else\n cRemFile &#58;= cLocal\n Endif\n Else\n cRemFile &#58;= cRemote\n Endif\n\n If oMeter # Nil\n oMeter&#58;cargo &#58;= &#46;T&#46; // cancel button available while download in progress\n oMeter&#58;oWnd&#58;AEvalWhen&#40;&#41;\n Endif\n\n &#58;&#58;XfrType&#40; \"I\" &#41;\n &#58;&#58;DoWait&#40; ST_DOTYPE &#41;\n\n &#58;&#58;oTrnSocket &#58;= TSocket&#40;&#41;&#58;New&#40;0&#41;\n\n If lOK &#58;= &#58;&#58;nStatus == ST_TYPEOK\n\n If ! &#58;&#58;lPassive\n cPort &#58;= &#58;&#58;Port&#40; &#58;&#58;oTrnSocket &#41;\n &#58;&#58;oTrnSocket&#58;bAccept &#58;= &#123;|o,n| &#58;&#58;StorAccept&#40; o, n, cLocal, oMeter, oText &#41; &#125;\n &#58;&#58;oTrnSocket&#58;Listen&#40;&#41;\n &#58;&#58;Dump&#40; \"I&#58;\" + NTRIM&#40; &#58;&#58;nStatus &#41; + \"&#58;Listening on port \" + NTRIM&#40; &#58;&#58;oTrnSocket&#58;nPort &#41; &#41;\n\n &#58;&#58;nStatus &#58;= ST_DOPORT\n &#58;&#58;Dump&#40; \"S&#58;\" + NTRIM&#40; &#58;&#58;nStatus &#41; + \"&#58;\" + cPort &#41;\n &#58;&#58;oSocket&#58;SendData&#40; cPort + CRLF &#41;\n\n &#58;&#58;DoWait&#40; ST_DOPORT &#41;\n lOK &#58;= &#58;&#58;nStatus == ST_PORTOK\n Else\n If &#58;&#58;Pasv&#40;&#41;\n If lOK &#58;= &#58;&#58;nDataPort > 0\n &#58;&#58;oTrnSocket&#58;bConnect &#58;= &#123;|o,n| &#58;&#58;StorAccept&#40; o, n, cLocal, oMeter, oText &#41; &#125;\n &#58;&#58;oTrnSocket&#58;bClose &#58;= &#123;|o,n| &#58;&#58;StorClose&#40; o, n, cLocal, oMeter, oText &#41; &#125;\n &#58;&#58;Dump&#40; \"I&#58;\" + NTRIM&#40; &#58;&#58;nStatus &#41; + \"&#58;Connecting on IP&#58;port \" + &#58;&#58;cDataIP + \"&#58;\" + NTRIM&#40; &#58;&#58;nDataPort &#41; &#41;\n Memory&#40;-1&#41; // cleanup memory when connecting frequently\n &#58;&#58;oTrnSocket&#58;Connect&#40; &#58;&#58;cDataIP, &#58;&#58;nDataPort &#41;\n Endif\n Endif\n Endif\n Endif\n\n If lOk\n &#58;&#58;nStatus &#58;= ST_DOSTOR\n &#58;&#58;Dump&#40; \"S&#58;\" + NTRIM&#40; &#58;&#58;nStatus &#41; + \"&#58;STOR \" + cRemFile &#41;\n &#58;&#58;oSocket&#58;SendData&#40; \"STOR \" + cRemFile + CRLF &#41;\n\n &#58;&#58;DoWait&#40; ST_DOSTOR &#41;\n &#58;&#58;DoWait&#40; ST_STOROK &#41;\n\n lOK &#58;= &#58;&#58;nStatus == ST_STORDONE\n Endif\n\n If &#58;&#58;oTrnSocket # Nil\n &#58;&#58;oTrnSocket&#58;End&#40;&#41;\n &#58;&#58;oTrnSocket &#58;= Nil\n Endif\n\nReturn lOK\n\n//---------------------------------------------------------------------------------------------//\n/*\n Internal method to manage file store socket\n*/\nMethod StorAccept&#40; opSocket, nWSAError, cFile, oMeter, oText &#41; Class qFTPClient\n Local oSocket\n Local hFile &#58;= 0\n Local cBuffer &#58;= \"\"\n Local nSent &#58;= 0\n Local nTotal &#58;= 0\n Local lClosed &#58;= &#46;F&#46;\n Local nNow &#58;= 0\n Local nSize\n\n If ! &#58;&#58;lPassive\n oSocket &#58;= TSocket&#40;&#41;&#58;Accept&#40; opSocket&#58;nSocket &#41;\n oSocket&#58;bClose &#58;= &#123;|o,n| &#58;&#58;StorClose&#40; o, n, cFile, oMeter, oText &#41;, lClosed &#58;= &#46;T&#46; &#125;\n Else\n oSocket &#58;= opSocket\n Endif\n\n Do While ! &#58;&#58;lSendFile &#46;and&#46; ! &#58;&#58;lClosed &#46;and&#46; ! Eval&#40; &#58;&#58;bAbort &#41;\n SysRefresh&#40;&#41;\n Enddo\n\n If &#58;&#58;lSendFile\n &#58;&#58;Dump&#40; \"I&#58;\" + NTRIM&#40; &#58;&#58;nStatus &#41; + \"&#58;STOR data connection established\" &#41;\n\n nNow &#58;= Seconds&#40;&#41;\n If &#40; hFile &#58;= FOpen&#40; cFile &#41; &#41; > 0\n nSize &#58;= Directory&#40; cFile &#41;&#91;1,F_SIZE&#93;\n &#58;&#58;Dump&#40; \"I&#58;\" + NTRIM&#40; &#58;&#58;nStatus &#41; + \"&#58;Uploading \" + cFile + \", \" + NTRIM&#40; nSize &#41; + \" bytes in size\" &#41;\n If oMeter # Nil\n oMeter&#58;Set&#40;0&#41; // reset\n oMeter&#58;SetTotal&#40; nSize &#41; // set bar length\n Endif\n cBuffer &#58;= Space&#40; BLOCK_SIZE &#41;\n Do While &#46;T&#46;\n nSent &#58;= FRead&#40; hFile, @cBuffer, BLOCK_SIZE &#41;\n oSocket&#58;SendData&#40; Left&#40; cBuffer, nSent &#41; &#41;\n nTotal += nSent\n If &#58;&#58;nDelay > 0\n SysWait&#40; &#58;&#58;nDelay &#41; // this is trial and error&#46;&#46;&#46; I'm using 0&#46;5 to 1&#46;5; default is 1&#46;0\n Endif\n\n Eval&#40; &#58;&#58;bStorProgress, Round&#40; nTotal / nSize * 100, 2 &#41; &#41; // left for compatibility with original class\n If&#40; oMeter # Nil, oMeter&#58;Set&#40; nTotal &#41;, Nil &#41;\n If&#40; oText # Nil, oText&#58;SetText&#40; cFile + \"&#58; \" + NTRIM&#40; nTotal &#41; + \" bytes uploaded&#46;&#46;&#46;\" &#41;, Nil &#41;\n\n If nSent < BLOCK_SIZE &#46;or&#46; lClosed &#46;or&#46; &#58;&#58;nStatus == ST_STORBAD &#46;or&#46; Eval&#40; &#58;&#58;bAbort &#41;\n Exit\n Endif\n If &#58;&#58;nDelay == 0\n SysRefresh&#40;&#41;\n Endif\n\n Enddo\n FClose&#40; hFile &#41;\n &#58;&#58;Dump&#40; \"I&#58;\" + NTRIM&#40; &#58;&#58;nStatus &#41; + \"&#58;\" + NTRIM&#40; nTotal &#41; + \" bytes of file sent in \" + LTrim&#40; Str&#40; Seconds&#40;&#41; - nNow, 16, 2 &#41; &#41; + \" seconds\" &#41;\n &#58;&#58;Dump&#40; \"I&#58;\" + NTRIM&#40; &#58;&#58;nStatus &#41; + \"&#58;Waiting for acknowledgement\" &#41;\n\n oSocket&#58;Close&#40;&#41;\n Else\n oSocket&#58;Close&#40;&#41;\n oSocket&#58;End&#40;&#41;\n &#58;&#58;Dump&#40; \"E&#58;\" + NTRIM&#40; &#58;&#58;nStatus &#41; + \"&#58;FOpen&#40;&#41; failed with file \" + cFile + \" DOS Error #\" + NTRIM&#40; FError&#40;&#41; &#41; &#41;\n Endif\n SysRefresh&#40;&#41;\n Endif\n\nReturn Nil\n\n//---------------------------------------------------------------------------------------------//\n/*\n Internal method to manage file store socket\n*/\nMethod StorClose&#40; oSocket, nWSAError, cFile, oMeter, oText &#41; Class qFTPClient\n\n If oMeter # Nil\n oMeter&#58;cargo &#58;= &#46;F&#46; // cancel button not available anymore\n oMeter&#58;oWnd&#58;AEvalWhen&#40;&#41;\n Endif\n &#58;&#58;lSendFile &#58;= &#46;F&#46;\n oSocket&#58;Close&#40;&#41;\n If &#58;&#58;nStatus == ST_DOABOR &#46;or&#46; &#58;&#58;nStatus == ST_ABOROK &#46;or&#46; ;\n &#58;&#58;nStatus == ST_ABORBAD &#46;or&#46; &#58;&#58;nStatus == ST_STORBAD\n &#58;&#58;Dump&#40; \"I&#58;\" + NTRIM&#40; &#58;&#58;nStatus &#41; + \"&#58;STOR data aborted\" &#41;\n Else\n &#58;&#58;Dump&#40; \"I&#58;\" + NTRIM&#40; &#58;&#58;nStatus &#41; + \"&#58;STOR data completed &#58;-&#41;\" &#41;\n &#58;&#58;nStatus &#58;= ST_STORDONE\n Endif\n\nReturn Nil\n\n//---------------------------------------------------------------------------------------------//\n/*\n Close FTP Connection\n*/\nMethod Quit&#40;&#41; Class qFTPClient\n\n &#58;&#58;nStatus &#58;= ST_DOQUIT\n &#58;&#58;Dump&#40; \"S&#58;\" + NTRIM&#40; &#58;&#58;nStatus &#41; + \"&#58;QUIT\" &#41;\n &#58;&#58;oSocket&#58;SendData&#40; \"QUIT\" + CRLF &#41;\n\n &#58;&#58;DoWait&#40; ST_DOQUIT &#41;\n\nReturn &#46;T&#46;\n\n//---------------------------------------------------------------------------------------------//\n/*\n Get current directory on FTP Server\n Returns True or False based on success\n*/\nMethod Pwd&#40;&#41; Class qFTPClient\n Local cRetVal &#58;= \"\"\n Local nPos &#58;= \"\"\n Local cReply\n\n &#58;&#58;nStatus &#58;= ST_DOPWD\n &#58;&#58;Dump&#40; \"S&#58;\" + NTRIM&#40; &#58;&#58;nStatus &#41; + \"&#58;PWD\" &#41;\n &#58;&#58;oSocket&#58;SendData&#40; \"PWD\" + CRLF &#41;\n\n &#58;&#58;DoWait&#40; ST_DOPWD &#41;\n\n cReply &#58;= &#58;&#58;cReply\n nPos &#58;= At&#40; '\"', cReply &#41;\n cReply &#58;= SubStr&#40; cReply, nPos + 1 &#41;\n\n nPos &#58;= At&#40; '\"', cReply &#41;\n cReply &#58;= SubStr&#40; cReply, 1, nPos - 1 &#41;\n cRetVal &#58;= cReply\n\nReturn cRetVal\n\n//---------------------------------------------------------------------------------------------//\n/*\n Delete file &#40;cFile of server&#41;\n Will return Success True or False\n*/\nMethod Del&#40; cFile &#41; Class qFTPClient\n Local lOK &#58;= &#46;T&#46;\n\n Default cFile &#58;= \"\"\n\n &#58;&#58;nStatus &#58;= ST_DODELETE\n\n If lOK &#58;= ! Empty&#40; cFile &#41;\n &#58;&#58;Dump&#40; \"S&#58;\" + NTRIM&#40; &#58;&#58;nStatus &#41; + \"&#58;DELE \" + cFile &#41;\n &#58;&#58;oSocket&#58;SendData&#40; \"DELE \" + cFile + CRLF &#41;\n\n &#58;&#58;DoWait&#40; ST_DODELETE &#41;\n\n lOK &#58;= &#58;&#58;nStatus == ST_DELETEOK\n Endif\n\nReturn lOK\n\n//---------------------------------------------------------------------------------------------//\n/*\n Rename file on server\n Parameters &#58; cFrom &#58; Source file\n cTo &#58; Target file\n Will return Success True or False\n*/\nMethod Rename&#40; cFrom, cTo &#41; Class qFTPClient\n Local lOK &#58;= &#46;F&#46;\n\n Default cFrom &#58;= \"\", ;\n cTo &#58;= \"\"\n\n If lOK &#58;= ! Empty&#40; cFrom &#41; &#46;and&#46; ! Empty&#40; cTo &#41;\n &#58;&#58;nStatus &#58;= ST_DORENFROM\n &#58;&#58;Dump&#40; \"S&#58;\" + NTRIM&#40; &#58;&#58;nStatus &#41; + \"&#58;RNFR \" + cFrom &#41;\n &#58;&#58;oSocket&#58;SendData&#40; \"RNFR \" + cFrom + CRLF &#41;\n\n &#58;&#58;DoWait&#40; ST_DORENFROM &#41;\n\n If lOK &#58;= &#58;&#58;nStatus == ST_RENFROMOK\n &#58;&#58;nStatus &#58;= ST_DORENTO\n &#58;&#58;Dump&#40; \"S&#58;\" + NTRIM&#40; &#58;&#58;nStatus &#41; + \"&#58;RNTO \" + cTo &#41;\n &#58;&#58;oSocket&#58;SendData&#40; \"RNTO \" + cTo + CRLF &#41;\n\n &#58;&#58;DoWait&#40; ST_DORENTO &#41;\n\n lOK &#58;= &#58;&#58;nStatus == ST_RENTOOK\n Endif\n Endif\n\nReturn lOk\n\n//---------------------------------------------------------------------------------------------//\n/*\n Create a directory\n*/\nMethod MkDir&#40; cDir &#41; Class qFTPClient\n Local lOK &#58;= &#46;T&#46;\n\n &#58;&#58;nStatus &#58;= ST_DOMKDIR\n &#58;&#58;Dump&#40; \"S&#58;\" + NTRIM&#40; &#58;&#58;nStatus &#41; + \"&#58;MKD \" + cDir &#41;\n &#58;&#58;oSocket&#58;SendData&#40; \"MKD \" + cDir + CRLF &#41;\n\n &#58;&#58;DoWait&#40; ST_DOMKDIR &#41;\n\n lOK &#58;= &#58;&#58;nStatus == ST_MKDIROK\n\nReturn lOK\n\n//---------------------------------------------------------------------------------------------//\n/*\n Remove a directory\n*/\nMethod RmDir&#40; cDir &#41; Class qFTPClient\n Local lOK &#58;= &#46;T&#46;\n\n &#58;&#58;nStatus &#58;= ST_DORMDIR\n &#58;&#58;Dump&#40; \"S&#58;\" + NTRIM&#40; &#58;&#58;nStatus &#41; + \"&#58;RMD \" + cDir &#41;\n &#58;&#58;oSocket&#58;SendData&#40; \"RMD \" + cDir + CRLF &#41;\n\n &#58;&#58;DoWait&#40; ST_DORMDIR &#41;\n\n lOK &#58;= &#58;&#58;nStatus == ST_RMDIROK\n\nReturn lOK\n\n//---------------------------------------------------------------------------------------------//\n/*\n Retrieve file from server&#46;\n Parameters &#58; cRemote &#58; Remote file name\n cLocal &#58; Local file name\n oMeter &#58; Meter object progress bar &#91;optional&#93;\n oText &#58; Say object used with meter object to display bytes processed &#91;optional&#93;\n*/\nMethod Retr&#40; cRemote, cLocal, oMeter, oText &#41; Class qFTPClient\n Local lOK &#58;= &#46;T&#46;\n Local cPort &#58;= \"\"\n Local nPos &#58;= 0\n Local cLine &#58;= \"\"\n Local nNow &#58;= 0\n\n nPos &#58;= RAt&#40; \"/\", cRemote &#41;\n If nPos == 0\n Default cLocal &#58;= cRemote\n Else\n Default cLocal &#58;= SubStr&#40; cRemote, nPos + 1 &#41;\n Endif\n\n If oMeter # Nil\n oMeter&#58;cargo &#58;= &#46;T&#46; // cancel button available while download in progress\n oMeter&#58;oWnd&#58;AEvalWhen&#40;&#41;\n Endif\n\n &#58;&#58;nRetrHandle &#58;= FCreate&#40; cLocal &#41;\n If lOK &#58;= &#40; &#58;&#58;nRetrHandle > 0 &#41;\n\n &#58;&#58;XfrType&#40; \"I\" &#41;\n &#58;&#58;DoWait&#40; ST_DOTYPE &#41;\n\n If lOK &#58;= &#58;&#58;nStatus == ST_TYPEOK\n &#58;&#58;oTrnSocket &#58;= TSocket&#40;&#41;&#58;New&#40;0&#41;\n If ! &#58;&#58;lPassive\n cPort &#58;= &#58;&#58;Port&#40; &#58;&#58;oTrnSocket &#41;\n\n &#58;&#58;oTrnSocket&#58;bAccept &#58;= &#123;|o,n| &#58;&#58;RetrAccept&#40; o, n, cRemote, oMeter, oText &#41; &#125;\n &#58;&#58;oTrnSocket&#58;Listen&#40;&#41;\n\n &#58;&#58;Dump&#40; \"I&#58;\" + NTRIM&#40; &#58;&#58;nStatus &#41; + \"&#58;Listening on port \" + NTRIM&#40; &#58;&#58;oTrnSocket&#58;nPort &#41; &#41;\n\n &#58;&#58;nStatus &#58;= ST_DOPORT\n &#58;&#58;Dump&#40; \"S&#58;\" + NTRIM&#40; &#58;&#58;nStatus &#41; + \"&#58;\" + cPort &#41;\n &#58;&#58;oSocket&#58;SendData&#40; cPort + CRLF &#41;\n\n &#58;&#58;DoWait&#40; ST_DOPORT &#41;\n lOK &#58;= &#58;&#58;nStatus == ST_PORTOK\n Else\n If &#58;&#58;Pasv&#40;&#41;\n If lOK &#58;= &#58;&#58;nDataPort > 0\n &#58;&#58;oTrnSocket&#58;bConnect &#58;= &#123;|o,n| &#58;&#58;RetrAccept&#40; o, n, cRemote, oMeter, oText &#41; &#125;\n &#58;&#58;oTrnSocket&#58;bRead &#58;= &#123;|o,n| &#58;&#58;RetrRead&#40; o, n, cRemote, oMeter, oText &#41; &#125;\n &#58;&#58;oTrnSocket&#58;bClose &#58;= &#123;|o,n| &#58;&#58;RetrClose&#40; o, n, cRemote, oMeter, oText &#41; &#125;\n &#58;&#58;Dump&#40; \"I&#58;\" + NTRIM&#40; &#58;&#58;nStatus &#41; + \"&#58;Connecting on IP&#58;port \" + &#58;&#58;cDataIP + \"&#58;\" + NTRIM&#40; &#58;&#58;nDataPort &#41; &#41;\n Memory&#40;-1&#41; // cleanup memory when connecting frequently\n &#58;&#58;oTrnSocket&#58;Connect&#40; &#58;&#58;cDataIP, &#58;&#58;nDataPort &#41;\n Endif\n Endif\n Endif\n Endif\n Else\n &#58;&#58;Dump&#40; \"E&#58;\" + NTRIM&#40; &#58;&#58;nStatus &#41; + \"&#58;FCreate&#40;&#41; failed with file \" + cLocal + \" DOS Error #\" + NTRIM&#40; FError&#40;&#41; &#41; &#41;\n Endif\n\n If lOK\n &#58;&#58;nRetrBRead &#58;= 0 // initialize here, not in &#58;&#58;OnRead&#40;&#41;\n &#58;&#58;nStatus &#58;= ST_DORETR\n &#58;&#58;Dump&#40; \"S&#58;\" + NTRIM&#40; &#58;&#58;nStatus &#41; + \"&#58;RETR \" + cRemote &#41;\n &#58;&#58;oSocket&#58;SendData&#40; \"RETR \" + cRemote + CRLF &#41;\n\n &#58;&#58;DoWait&#40; ST_DORETR &#41;\n Do While &#58;&#58;nRetrBRead < &#58;&#58;nRetrFSize &#46;and&#46; ; // stay put until file fully downloaded so it won't be truncated\n ! &#58;&#58;nRetrHandle == 0 &#46;and&#46; ! &#58;&#58;lClosed &#46;and&#46; ! Eval&#40; &#58;&#58;bAbort &#41; &#46;and&#46; ;\n ! &#58;&#58;nStatus == ST_RETRBAD // this is case the file was not found&#58; 550 ?????&#46;???&#58; No such file or directory\n SysRefresh&#40;&#41;\n Enddo\n &#58;&#58;DoWait&#40; ST_RETROK &#41;\n\n lOK &#58;= &#58;&#58;nStatus == ST_RETRDONE\n SysWait&#40; &#58;&#58;nDelay &#41; // allow time for server to respond\n Endif\n\n If &#58;&#58;oTrnSocket # Nil\n &#58;&#58;oTrnSocket&#58;End&#40;&#41;\n &#58;&#58;oTrnSocket &#58;= Nil\n Endif\n\nReturn lOK\n\n//---------------------------------------------------------------------------------------------//\n/*\n Internal method to manage file retrieval socket\n*/\nMethod RetrAccept&#40; opSocket, nWSAError, cFile, oMeter, oText &#41; Class qFTPClient\n Local oSocket\n\n If ! &#58;&#58;lPassive\n oSocket &#58;= TSocket&#40;&#41;&#58;Accept&#40; opSocket&#58;nSocket &#41;\n oSocket&#58;bRead &#58;= &#123;|o,n| &#58;&#58;RetrRead&#40; o, n, cFile, oMeter, oText &#41; &#125;\n oSocket&#58;bClose &#58;= &#123;|o,n| &#58;&#58;RetrClose&#40; o, n, cFile, oMeter, oText &#41; &#125;\n Endif\n &#58;&#58;Dump&#40; \"I&#58;\" + NTRIM&#40; &#58;&#58;nStatus &#41; + \"&#58;RETR data connection established\" &#41;\n\nReturn Nil\n\n//---------------------------------------------------------------------------------------------//\n/*\n Internal method to manage file retrieval socket\n*/\nMethod RetrRead&#40; oSocket, nWSAError, cFile, oMeter, oText &#41; Class qFTPClient\n Local cData &#58;= oSocket&#58;GetData&#40;&#41;\n\n If &#58;&#58;nRetrHandle > 0\n If &#58;&#58;nRetrBRead == 0 &#46;and&#46; oMeter # Nil\n oMeter&#58;Set&#40;0&#41; // reset\n oMeter&#58;SetTotal&#40; &#58;&#58;nRetrFSize &#41; // set bar length\n Endif\n FWrite&#40; &#58;&#58;nRetrHandle, cData &#41;\n &#58;&#58;nRetrBRead += Len&#40; cData &#41;\n If&#40; oMeter # Nil, oMeter&#58;Set&#40; &#58;&#58;nRetrBRead &#41;, Nil &#41;\n If&#40; oText # Nil, oText&#58;SetText&#40; cFile + \"&#58; \" + NTRIM&#40; &#58;&#58;nRetrBRead &#41; + \" bytes downloaded&#46;&#46;&#46;\" &#41;, Nil &#41;\n //&#58;&#58;Dump&#40; \"I&#58;\" + NTRIM&#40; &#58;&#58;nStatus &#41; + \"&#58;Bytes retrieved \" + NTRIM&#40; &#58;&#58;nRetrBRead &#41; + \" out of \" + NTRIM&#40; &#58;&#58;nRetrFSize &#41; &#41;\n Endif\n\nReturn Nil\n\n//---------------------------------------------------------------------------------------------//\n/*\n Internal method to manage file retrieval socket\n Note&#58; When retrieving very small files, the file might already be downloaded\n before &#58;&#58;nRetrFSize can even be initialized &#40;cmd 150&#41;&#46; So it's OK if it's ZERO\n*/\nMethod RetrClose&#40; oSocket, nWSAError, cFile, oMeter, oText &#41; Class qFTPClient\n\n If oMeter # Nil\n oMeter&#58;cargo &#58;= &#46;F&#46; // cancel button not available anymore\n oMeter&#58;oWnd&#58;AEvalWhen&#40;&#41;\n Endif\n FClose&#40; &#58;&#58;nRetrHandle &#41;\n &#58;&#58;nRetrHandle &#58;= 0\n oSocket&#58;Close&#40;&#41;\n If &#58;&#58;nStatus == ST_DOABOR &#46;or&#46; &#58;&#58;nStatus == ST_ABOROK &#46;or&#46; ;\n &#58;&#58;nStatus == ST_ABORBAD &#46;or&#46; &#58;&#58;nStatus == ST_RETRBAD\n &#58;&#58;Dump&#40; \"I&#58;\" + NTRIM&#40; &#58;&#58;nStatus &#41; + \"&#58;RETR data aborted\" &#41;\n Else\n &#58;&#58;Dump&#40; \"I&#58;\" + NTRIM&#40; &#58;&#58;nStatus &#41; + \"&#58;RETR data completed\" + If&#40; &#58;&#58;nRetrBRead < &#58;&#58;nRetrFSize, ;\n \", but file truncated by \" + NTRIM&#40; &#58;&#58;nRetrFSize - &#58;&#58;nRetrBRead &#41; + \" bytes &#58;-&#40;\", \" &#58;-&#41;\" &#41; &#41;\n // this should avoid the occasional hanging in &#58;&#58;DoWait&#40;&#41;\n &#58;&#58;nStatus &#58;= If&#40; &#58;&#58;nRetrFSize == 0 &#46;or&#46; &#58;&#58;nRetrBRead >= &#58;&#58;nRetrFSize, ST_RETRDONE, ST_RETRBAD &#41;\n Endif\n\nReturn Nil\n\n//---------------------------------------------------------------------------------------------//\n/*\n Cancel any transfer/command in progress&#46;\n Called by class if bAbort block evals to true in wait state&#46;\n*/\nMethod Abort&#40;&#41; Class qFTPClient\n Local lOK &#58;= &#46;T&#46;, nStatus &#58;= &#58;&#58;nStatus, bAbort &#58;= &#58;&#58;bAbort\n\n &#58;&#58;bAbort &#58;= &#123;|| &#46;F&#46; &#125; // avoid nested calls to &#58;&#58;Abort&#40;&#41;\n &#58;&#58;nStatus &#58;= ST_DOABOR\n &#58;&#58;Dump&#40; \"S&#58;\" + NTRIM&#40; &#58;&#58;nStatus &#41; + \"&#58;ABOR while on \" + NTRIM&#40; nStatus &#41; &#41;\n &#58;&#58;oSocket&#58;SendData&#40; \"ABOR\" + CRLF &#41;\n\n &#58;&#58;DoWait&#40; ST_DOABOR &#41;\n\n lOK &#58;= &#58;&#58;nStatus == ST_ABOROK\n &#58;&#58;bAbort &#58;= bAbort // restore abort codeblock\n\nReturn lOK\n\n//---------------------------------------------------------------------------------------------//\n/*\n Switch next transfer to passive mode\n*/\nMethod Pasv&#40;&#41; Class qFTPClient\n Local cReply &#58;= \"\"\n Local nPos &#58;= 0\n\n &#58;&#58;nStatus &#58;= ST_DOPASV\n &#58;&#58;Dump&#40; \"S&#58;\" + NTRIM&#40; &#58;&#58;nStatus &#41; + \"&#58;PASV\" &#41;\n &#58;&#58;oSocket&#58;SendData&#40; \"PASV\" + CRLF &#41;\n\n &#58;&#58;DoWait&#40; ST_DOPASV &#41;\n\n If &#58;&#58;lPassive &#58;= &#58;&#58;nStatus == ST_PASVOK\n cReply &#58;= &#58;&#58;cReply\n nPos &#58;= At&#40; \"&#40;\", cReply &#41;\n cReply &#58;= SubStr&#40; cReply, nPos + 1 &#41;\n\n nPos &#58;= At&#40; \"&#41;\", cReply &#41;\n cReply &#58;= Left&#40; cReply, nPos - 1 &#41;\n\n &#58;&#58;cDataIP &#58;= StrToken&#40; cReply, 1, \",\" &#41; + \"&#46;\"\n &#58;&#58;cDataIP += StrToken&#40; cReply, 2, \",\" &#41; + \"&#46;\"\n &#58;&#58;cDataIP += StrToken&#40; cReply, 3, \",\" &#41; + \"&#46;\"\n &#58;&#58;cDataIP += StrToken&#40; cReply, 4, \",\" &#41;\n\n &#58;&#58;nDataPort &#58;= 0\n &#58;&#58;nDataPort += 256 * Val&#40; StrToken&#40; cReply, 5, \",\" &#41; &#41;\n &#58;&#58;nDataPort += Val&#40; StrToken&#40; cReply, 6, \",\" &#41; &#41;\n &#58;&#58;Dump&#40; \"I&#58;\" + NTRIM&#40; &#58;&#58;nStatus &#41; + \"&#58;Server has opened connection on port \" + NTRIM&#40; &#58;&#58;nDataPort &#41; + \" - IP&#58;\" + &#58;&#58;cDataIP &#41;\n Endif\n\nReturn &#58;&#58;lPassive\n\n//---------------------------------------------------------------------------------------------//\n/*\n Internal method to wait for responses from server&#46;\n*/\nMethod DoWait&#40; nState &#41; Class qFTPClient\n Local nStart &#58;= Seconds&#40;&#41;\n\n Do While &#58;&#58;nStatus == nState &#46;and&#46; ! &#58;&#58;lClosed &#46;and&#46; ! Eval&#40; &#58;&#58;bAbort &#41;\n If &#58;&#58;nTimeOut > 0 &#46;and&#46; Seconds&#40;&#41; - nStart > &#58;&#58;nTimeOut\n &#58;&#58;Dump&#40; \"E&#58;\" + NTRIM&#40; &#58;&#58;nStatus &#41; + \"&#58;Timed out waiting for state \" + NTRIM&#40; nState &#41; + \" to finish\" &#41;\n Exit\n Endif\n SysRefresh&#40;&#41;\n Enddo\n\n If nState # ST_DOABOR &#46;and&#46; Eval&#40; &#58;&#58;bAbort &#41;\n &#58;&#58;Abort&#40;&#41;\n Endif\n\nReturn Nil\n\n//---------------------------------------------------------------------------------------------//\n[/code:3tc5y7wu]", "time": "22:32", "topic": "Cliente Telnet", "username": "Rochinha" } ]
Cliente Telnet
[ { "date": "2007-05-29", "forum": "FiveWin para Harbour/xHarbour", "text": "¿ Alguna clase TELNET ?", "time": "16:37", "topic": "Cliente Telnet", "username": "JmGarcia" } ]
Cliente Telnet
[ { "date": "2007-05-30", "forum": "FiveWin para Harbour/xHarbour", "text": "Hola JM, tengo una implementacion muy basica para Telnet, si no necesitas emulacion de terminal VT100 ,VTxxx puede valerte, sino tendrias que desarrollar el modulo para interpretar las secuencias de escape. \nMandame un privado si te interesa lo que tengo hecho, soy Gabriel de Mallorca.\n\nUn saludo", "time": "08:24", "topic": "Cliente Telnet", "username": "Biel EA6DD" } ]
Cliente Telnet
[ { "date": "2007-05-30", "forum": "FiveWin para Harbour/xHarbour", "text": "[quote=\"Biel EA6DD\":3sh8en08]...tengo una implementacion muy basica para Telnet...[/quote:3sh8en08]\nIgual me sirve.\n\nNo quiero un cliente telnet a lo bestia sino que me permita utilizar comandos.\nPor ejemplo quiero entrar en una maquina Sun con Solaris 8 y pedirle cuales son sus interfaces de red.\nPara ello me basta con ejecutar el comando [b:3sh8en08]ifconfig -a > /tmp/Interfaces.txt[/b:3sh8en08]\nPosteriormente con FTP me traigo el fichero \"/tmp/Interfaces.txt\".\nQuien dice ese comando pues cualquier comando de Unix-Solaris 8.\nLas posibilidades se me antojan infinitas... tirar procesos, arrancar servicios... etc ...\n\nMuchas gracias por tu ofrecimiento.", "time": "09:39", "topic": "Cliente Telnet", "username": "JmGarcia" } ]
Cliente Telnet
[ { "date": "2007-05-31", "forum": "FiveWin para Harbour/xHarbour", "text": "[quote=\"Biel EA6DD\":17sa1lza]...si no necesitas emulacion de terminal VT100 ,VTxxx puede valerte...[/quote:17sa1lza]\nPues precisamente necesito VT100.\nPor lo que he podido comprobar con un cliente telnet (el de windows) y un sniffer Ethereal y Analyzer que desde que se establece la conexion TCPIP hasta que aparece la peticion de login pues hay como unos 4 o 5 mensajes de intercambio entre el cliente y el servidor con valores no ASCII y que entre ellos he visto la palabra VT100 pero el resto de cosas son indescifrables...\nLo tengo crudo... hare con el FTP lo que pueda y del TELNET pues eso... socooorrrroooooooooo... <!-- s:wink: --><img src=\"{SMILIES_PATH}/icon_wink.gif\" alt=\":wink:\" title=\"Wink\" /><!-- s:wink: --> \nGracias a todos.\nSeguire dando la coña <!-- s:lol: --><img src=\"{SMILIES_PATH}/icon_lol.gif\" alt=\":lol:\" title=\"Laughing\" /><!-- s:lol: -->", "time": "17:26", "topic": "Cliente Telnet", "username": "JmGarcia" } ]
Cliente Telnet
[ { "date": "2007-06-01", "forum": "FiveWin para Harbour/xHarbour", "text": "Pues investigando podria salir del apuro con el RemoteShell (rsh.exe)\nPuedo poner en un ventana de MS-DOS esto: [b:3dm8jbqt]rsh <host> -l <usuario> ifconfig -a[/b:3dm8jbqt] y me contesta con el resultado del comando.\nPero esto es en una ventana MS-DOS.\nNo puedo redireccionar (>) ya que eso supondria que es parte del comando unix.\n¿ Hay alguna forma de hacerse con el TEXTO que hay en una ventana MS-DOS ?\n¿ Tenemos alguna clase RSH (Remote Shell) ?\n\nGracias.", "time": "09:02", "topic": "Cliente Telnet", "username": "JmGarcia" } ]
Cliente Telnet
[ { "date": "2007-06-01", "forum": "FiveWin para Harbour/xHarbour", "text": "Hola,\n\nsi lo que deseas es tener simplemente informacion del equipo con UNIX, crea un servidor\ncon PERL en el unix en un determinado puerto y los dejas como servicio del unix, luego desde tu programa en FW con socket te conectas con el y te pasa la informacion que necesitas.\n\nClaro lo complicado aqui es que tendrias que poner este servicio en cada equipo unix\n\nSolor es una idea\n\nSaludos\n\nMarcelo", "time": "13:30", "topic": "Cliente Telnet", "username": "Marcelo Via Giglio" } ]
Cliente Telnet
[ { "date": "2007-06-01", "forum": "FiveWin para Harbour/xHarbour", "text": "[quote=\"Marcelo Via Giglio\":36l2fi18]...Claro lo complicado aqui es que tendrias que poner este servicio en cada equipo unix...[/quote:36l2fi18]\nNo solo eso, sino que no soy el \"amo\" de los equipos y tienen lo que tiene y solo me dan login y pass...\nCon \"Remote Shell\" seria feliz <!-- s:roll: --><img src=\"{SMILIES_PATH}/icon_rolleyes.gif\" alt=\":roll:\" title=\"Rolling Eyes\" /><!-- s:roll: --> (remote shel de FW, jejeje)", "time": "18:43", "topic": "Cliente Telnet", "username": "JmGarcia" } ]
Cliente Telnet
[ { "date": "2007-06-05", "forum": "FiveWin para Harbour/xHarbour", "text": "Bueno, pues al final lo he solucionado con el REMOTE SHELL.\nLas maquinas Unix a las que \"ataco\" para pedir datos lo tiene activado.\nEntonces con el comando [b:yfxz9e2e]rsh[/b:yfxz9e2e] de windows (el MS-DOS nunca muere) y la consola [b:yfxz9e2e]cmd[/b:yfxz9e2e] hago lo siguiente.\n\n[code:yfxz9e2e]function main&#40;&#41;\nlocal oShell&#58;=TOleAuto&#40;&#41;&#58;New&#40;\"WScript&#46;Shell\"&#41;\noShell&#58;Run&#40;\"cmd /K rsh 99&#46;99&#46;99&#46;99 -l usuario ifconfig -a > tmp&#46;txt & exit\",0,&#46;F&#46;&#41;\nMagInfo&#40;Memoread&#40;\"tmp&#46;txt\"&#41;&#41; // Visualiza las IPs de las tarjetas de red de la maquina Unix\nreturn nil[/code:yfxz9e2e]\n\nPara que la pantalla de MS-DOS no aparezca al metodo :Run se le pasa los parametros \"0,.T.\".", "time": "08:29", "topic": "Cliente Telnet", "username": "JmGarcia" } ]
Cliente Telnet
[ { "date": "2014-09-14", "forum": "FiveWin para Harbour/xHarbour", "text": "Hola,\n\n¿ Alguien sabe donde se puede descargar o como se puede construir la librería del cliente de postgresql, para mingw?\n\nMi idea es la pgsql.a pero como librería estática, es decir, no quiere tener una pgsql.dll y una .a para enlazar. Sólo la .a ya compilada con las funciones\ndentro, sin depender de una .dll externa.\n\nHe buscado en muchos sitios y de verdad no he sido capaz de encontrarlo.\n\n\nAgradecería mucho vuestra ayuda.", "time": "21:13", "topic": "Cliente postgresql para mingw", "username": "jmartial" } ]
Cliente postgresql para mingw
[ { "date": "2023-02-28", "forum": "FiveWin for Harbour/xHarbour", "text": "hi,\n\ni copy Filename from App to Clipboard\nlater i paste from Cliboard back to App and want \"goto\" File\n\nbut it does not work <!-- s:shock: --><img src=\"{SMILIES_PATH}/icon_eek.gif\" alt=\":shock:\" title=\"Shocked\" /><!-- s:shock: --> \n\npaste Filename into Notepad\nmark Filename \"in\" Notepad and copy back to Clipboard\n\nnow it work <!-- s:D --><img src=\"{SMILIES_PATH}/icon_biggrin.gif\" alt=\":D\" title=\"Very Happy\" /><!-- s:D --> \n\n---\n\nthan i had a look into Logfile and found\n[quote:1m6uuo7f]28.02.2023 07:46:42: COPYTOCLIPBOARD( 3386 )\tcText = E\"C:\\fwh\\0\\LISTVIEW\\TGRID.BAK\\r\\n \"\t\n28.02.2023 07:47:08: TEXTFROMCLIPBOARD( 3400 )\tcText = E\"C:\\fwh\\0\\LISTVIEW\\TGRID.BAK\\r\\n\"\t\n\n28.02.2023 07:47:25: TEXTFROMCLIPBOARD( 3400 )\tcText = \"C:\\fwh\\0\\LISTVIEW\\TGRID.BAK\"[/quote:1m6uuo7f]\nwhere are E and \\r\\n come from <!-- s:?: --><img src=\"{SMILIES_PATH}/icon_question.gif\" alt=\":?:\" title=\"Question\" /><!-- s:?: --> \nhow can i get rid of it <!-- s:?: --><img src=\"{SMILIES_PATH}/icon_question.gif\" alt=\":?:\" title=\"Question\" /><!-- s:?: --> \n\n---\n\n[code=fw:1m6uuo7f]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><span style=\"color: #00C800;\">FUNCTION</span> CopyToClipboard<span style=\"color: #000000;\">&#40;</span> cText <span style=\"color: #000000;\">&#41;</span><br /><span style=\"color: #00C800;\">LOCAL</span> oClip := TClipBoard<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 /><br />   <span style=\"color: #00C800;\">IF</span> oClip:<span style=\"color: #000000;\">Open</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />      oClip:<span style=\"color: #000000;\">SetText</span><span style=\"color: #000000;\">&#40;</span> cText <span style=\"color: #000000;\">&#41;</span><br />*      oClip:<span style=\"color: #000000;\">SetWideText</span><span style=\"color: #000000;\">&#40;</span> cText <span style=\"color: #000000;\">&#41;</span><br />      oClip:<span style=\"color: #000000;\">Close</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />   <span style=\"color: #00C800;\">ENDIF</span><br />   oClip:<span style=\"color: #000000;\">End</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><span style=\"color: #00C800;\">RETURN</span> <span style=\"color: #00C800;\">nil</span></div>[/code:1m6uuo7f]\n\n[code=fw:1m6uuo7f]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><span style=\"color: #00C800;\">FUNCTION</span> TextFromClipboard<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><span style=\"color: #00C800;\">LOCAL</span> cText := <span style=\"color: #ff0000;\">\"\"</span><br /><span style=\"color: #00C800;\">LOCAL</span> oClip := TClipBoard<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 /><br />   <span style=\"color: #00C800;\">IF</span> oClip:<span style=\"color: #000000;\">Open</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />      cText := oClip:<span style=\"color: #000000;\">GetText</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />*      cText := oClip:<span style=\"color: #000000;\">GetUnicodeText</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />      oClip:<span style=\"color: #000000;\">Close</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />   <span style=\"color: #00C800;\">ENDIF</span><br />   oClip:<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> cText<br /> </div>[/code:1m6uuo7f]", "time": "08:11", "topic": "Clipboard TEXT", "username": "Jimmy" } ]
Clipboard TEXT
[ { "date": "2022-01-20", "forum": "FiveWin for Harbour/xHarbour", "text": "A couple months ago I incorporated a change from this forum, basic code below, to be able to fetch the clipboard contents, edit it, then put the edited version into the get . This stopped working with the last update, in the following code it crashes on the oClp:Open() line, giving me a TGet():MsgNotFound(0) error. What might have changed in fivewin to cause this to start happening, and what is the solution?\n\n[code=fw:3vtfaw76]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /><br /><span style=\"color: #B900B9;\">// oSegment is a get</span><br />oSegment:<span style=\"color: #000000;\">bGotFocus</span> := <span style=\"color: #000000;\">&#123;</span> |oClp| ColToString<span style=\"color: #000000;\">&#40;</span> oClp <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#125;</span><br /><br /><span style=\"color: #00C800;\">STATIC</span> PROCEDURE ColToString<span style=\"color: #000000;\">&#40;</span> oClp <span style=\"color: #000000;\">&#41;</span><br /><br />   <span style=\"color: #00C800;\">LOCAL</span> cText<br /><br />   <span style=\"color: #00C800;\">IF</span> oClp:<span style=\"color: #000000;\">Open</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <<== Crashes with TGet<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>:<span style=\"color: #000000;\">MsgNotFound</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">0</span><span style=\"color: #000000;\">&#41;</span> here<br />      cText := AllTrim<span style=\"color: #000000;\">&#40;</span> oClp:<span style=\"color: #000000;\">GetText</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span><br />      <span style=\"color: #00C800;\">IF</span> cText != <span style=\"color: #00C800;\">NIL</span><br />         <span style=\"color: #00C800;\">IF</span> _LF $ cText<br />            cText := StrTran<span style=\"color: #000000;\">&#40;</span> cText, _CRLF, _LF <span style=\"color: #000000;\">&#41;</span><br />            cText := StrTran<span style=\"color: #000000;\">&#40;</span> cText, _LF, <span style=\"color: #ff0000;\">\",\"</span> <span style=\"color: #000000;\">&#41;</span><br />            cText := StrTran<span style=\"color: #000000;\">&#40;</span> cText, <span style=\"color: #ff0000;\">\" \"</span>, <span style=\"color: #ff0000;\">\",\"</span> <span style=\"color: #000000;\">&#41;</span><br />            cText := AllTrim<span style=\"color: #000000;\">&#40;</span> cText <span style=\"color: #000000;\">&#41;</span><br />            <span style=\"color: #00C800;\">DO</span> <span style=\"color: #00C800;\">WHILE</span> <span style=\"color: #0000ff;\">Right</span><span style=\"color: #000000;\">&#40;</span> cText, <span style=\"color: #000000;\">01</span> <span style=\"color: #000000;\">&#41;</span> == <span style=\"color: #ff0000;\">\",\"</span><br />                cText := RTrim<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #0000ff;\">Left</span><span style=\"color: #000000;\">&#40;</span> cText, Len<span style=\"color: #000000;\">&#40;</span> cText <span style=\"color: #000000;\">&#41;</span> - <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span><br />            <span style=\"color: #00C800;\">ENDDO</span><br />            oClp:<span style=\"color: #000000;\">Clear</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />            oClp:<span style=\"color: #000000;\">SetText</span><span style=\"color: #000000;\">&#40;</span> cText <span style=\"color: #000000;\">&#41;</span><br />         <span style=\"color: #00C800;\">ENDIF</span><br />      <span style=\"color: #00C800;\">ENDIF</span><br />      oClp:<span style=\"color: #000000;\">Close</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />   <span style=\"color: #00C800;\">ENDIF</span><br /><br /><span style=\"color: #00C800;\">RETURN</span><br /><br /> </div>[/code:3vtfaw76]", "time": "03:13", "topic": "Clipboard question", "username": "rhlawek" } ]
Clipboard question
[ { "date": "2022-01-20", "forum": "FiveWin for Harbour/xHarbour", "text": "Robert,\n\nPlease modify this line this way:\n\noSegment:bGotFocus := { |oClp| ColToString() } // We don't provide oClp as a param, which it is a TGet object to function ColToString()\n\nthat way, oClp will arrive as a nil to function ColToString() and there should be no error TGet():MsgNotFound(0)\n\nalso you need to define a local oClp := TClipboard():New() inside function ColToString()", "time": "07:49", "topic": "Clipboard question", "username": "Antonio Linares" } ]
Clipboard question
[ { "date": "2008-06-18", "forum": "FiveWin for Harbour/xHarbour", "text": "We have a problem when very long text (> 100.000 characters) is copied to the clipboard - only part of it can be pasted.\r\n\r\nWhat can be done?\r\nIs there a limit of the clipboard?\r\n\r\nThanks for help,\r\nDietmar", "time": "19:47", "topic": "Clipboard size", "username": "Dietmar Jahnel" } ]
Clipboard size
[ { "date": "2008-06-21", "forum": "FiveWin for Harbour/xHarbour", "text": "Dietmar,\r\n\r\nThe clipboard should be able to support up to 2GB strings or more (limited by max available memory).\r\n\r\nAre you copying from a richedit control ?", "time": "11:50", "topic": "Clipboard size", "username": "Antonio Linares" } ]
Clipboard size
[ { "date": "2008-06-22", "forum": "FiveWin for Harbour/xHarbour", "text": "no I'm using FGet (with many modifications for our use)\r\n\r\nwith\r\n oClp:SetText( cText )\r\n oClp:GetText( )\r\n\r\nI can see that only part of very long texts are copied.\r\nI there a limit by Windows? (same results with xP and vista)\r\n\r\nThanks,\r\nDietmar", "time": "10:10", "topic": "Clipboard size", "username": "Dietmar Jahnel" } ]
Clipboard size
[ { "date": "2008-06-22", "forum": "FiveWin for Harbour/xHarbour", "text": "If you Google \"clipboard maximum size\" you will get a lot of different opinions on this. It seems most people say that the limit was 32K in 16bit but in 32bit the maximum is limited to available memory which can, of course, vary from time to time even on the same computer. So, I think you are always going to have some problems with copying large amounts of text.\r\n\r\nJames", "time": "19:14", "topic": "Clipboard size", "username": "James Bott" } ]
Clipboard size
[ { "date": "2008-06-22", "forum": "FiveWin for Harbour/xHarbour", "text": "Dietmar,\r\n\r\njust an idea and not tested.\r\nTest your text string for binary zeroes.\r\n\r\nClipper and xHarbour can handle these characters in a string.\r\nBut in c language a '\\0', which is chr( 0 ) terminates a string.\r\n\r\nMay be that this causes your problem ?\r\n\r\nRegards,\r\nDetlef", "time": "22:31", "topic": "Clipboard size", "username": "Detlef Hoefner" } ]
Clipboard size
[ { "date": "2008-12-10", "forum": "FiveWin for Harbour/xHarbour", "text": "Hello Dietmar,\r\n\r\nDid you ever get this issue resolved? I'm having a problem with the Windows Clipboard only accepting about 20k of text. I'm using FWH 8.10 and Windows XP. As a test I modified the PlaceSomeText() function of the TestClip.prg sample as follows:\r\n\r\n[code:pc3xym7e]\nfunction PlaceSomeText&#40;&#41;\n\n local cText &#58;= Space&#40; 30 &#41;\n\n //if MsgGet&#40; \"Ok&#46;&#46;&#46;\", \"Write something!\", @cText &#41;\n // oClp&#58;SetText&#40; cText &#41;\n //endif\n\n oClp&#58;SetText&#40; Replicate&#40; \"ABCDEFGHIJ\" + Chr&#40; 13 &#41; + Chr&#40; 10 &#41;, 100000 &#41; &#41;\n\n nMsgBox&#40; \"Number of bytes in clipboard&#58; \" + Str&#40; Len&#40; oClp&#58;GetText&#40;&#41; &#41; &#41; &#41;\n\nreturn nil\n\n[/code:pc3xym7e]\r\n\r\nWhen I run it and select Use The Clipboard, Place Some Text, I get 20,352 in the result:\r\n\r\n[img]\r\n<!-- m --><a class=\"postlink\" href=\"http://www.donorquest.com/images/TestClp.jpg\">http://www.donorquest.com/images/TestClp.jpg</a><!-- m -->\r\n[/img]\r\n\r\nIt should be 1,200,000 bytes based on replicating the string \"ABCDEFGHIJ\" (plus CR-LF) 100,000 times.\r\n\r\nI have tried it on two different XP machines and still get the same result.\r\n\r\nThanks,\r\n\r\n-Patrick", "time": "09:34", "topic": "Clipboard size", "username": "PatrickWeisser" } ]
Clipboard size
[ { "date": "2008-12-10", "forum": "FiveWin for Harbour/xHarbour", "text": "Patrick,\r\n\r\nWe are going to test it in a few minutes... <!-- s:-) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":-)\" title=\"Smile\" /><!-- s:-) -->", "time": "09:37", "topic": "Clipboard size", "username": "Antonio Linares" } ]
Clipboard size
[ { "date": "2008-12-10", "forum": "FiveWin for Harbour/xHarbour", "text": "Patrick,\r\n\r\nYou are right, it seems as its size is limited (around 32 Ks).\r\n\r\nThe text that you want to copy, where will it be used from ? I mean, will it be used from the same application, or from another application ?", "time": "10:05", "topic": "Clipboard size", "username": "Antonio Linares" } ]
Clipboard size
[ { "date": "2008-12-10", "forum": "FiveWin for Harbour/xHarbour", "text": "Antonio,\r\n\r\nThe text will be used in another application. The particular feature I am implementing copies delimited email addresses to the Clipboard so that they may be pasted in the TO: or BCC: block of an email message using whatever email software our customer prefers to use. There may be a better way of allowing our customers to do a mass email to a select group of their constituents, so I'm open to suggestions. However, having full access to the Windows Clipboard is very important and not something I would want to worry about having a limit on. I'm able to copy and paste many megabytes worth of text from my editor to a FWH memo field, and from a memo field back to the Clipboard and my editor, so I don't think it's a Windows limitation. My feeling is that it must be something with Harbour or FiveWin. It's not extremely urgent right now, but I would sure like to have full functionality at some point.\r\n\r\nThanks,\r\n\r\n-Patrick", "time": "10:50", "topic": "Clipboard size", "username": "PatrickWeisser" } ]
Clipboard size