messages
listlengths 1
1
| topic
stringlengths 2
60
|
---|---|
[
{
"date": "2018-04-18",
"forum": "FiveWin for Harbour/xHarbour",
"text": "HbFormat is included in FivEdit",
"time": "17:19",
"topic": "Click! is a CA-Clipper and Xbase++ source code reformatter",
"username": "cnavarro"
}
] | Click! is a CA-Clipper and Xbase++ source code reformatter |
[
{
"date": "2018-04-19",
"forum": "FiveWin for Harbour/xHarbour",
"text": "is a HbFormat.exe aviable ??\n\nTx",
"time": "12:53",
"topic": "Click! is a CA-Clipper and Xbase++ source code reformatter",
"username": "Uwe.Diemer"
}
] | Click! is a CA-Clipper and Xbase++ source code reformatter |
[
{
"date": "2018-04-19",
"forum": "FiveWin for Harbour/xHarbour",
"text": "In contrib/hbformat of harbour you have all source",
"time": "12:58",
"topic": "Click! is a CA-Clipper and Xbase++ source code reformatter",
"username": "cnavarro"
}
] | Click! is a CA-Clipper and Xbase++ source code reformatter |
[
{
"date": "2018-04-21",
"forum": "FiveWin for Harbour/xHarbour",
"text": "try this [url:28wsrul9]http://www.share-online.biz/dl/X9YGSJ7PXDO[/url:28wsrul9]",
"time": "19:29",
"topic": "Click! is a CA-Clipper and Xbase++ source code reformatter",
"username": "frose"
}
] | Click! is a CA-Clipper and Xbase++ source code reformatter |
[
{
"date": "2018-04-22",
"forum": "FiveWin for Harbour/xHarbour",
"text": "there are the sources ?",
"time": "09:24",
"topic": "Click! is a CA-Clipper and Xbase++ source code reformatter",
"username": "Silvio.Falconi"
}
] | Click! is a CA-Clipper and Xbase++ source code reformatter |
[
{
"date": "2018-04-22",
"forum": "FiveWin for Harbour/xHarbour",
"text": "[quote=\"cnavarro\":3k2ys2ov]In contrib/hbformat of harbour you have all source[/quote:3k2ys2ov]\n\nI run harbour/bin/ Hbformat,exe and it ask harbour32.dll \nwhere I found this ?",
"time": "09:26",
"topic": "Click! is a CA-Clipper and Xbase++ source code reformatter",
"username": "Silvio.Falconi"
}
] | Click! is a CA-Clipper and Xbase++ source code reformatter |
[
{
"date": "2018-04-22",
"forum": "FiveWin for Harbour/xHarbour",
"text": "It is usually in the BIN folder of Harbour",
"time": "23:58",
"topic": "Click! is a CA-Clipper and Xbase++ source code reformatter",
"username": "cnavarro"
}
] | Click! is a CA-Clipper and Xbase++ source code reformatter |
[
{
"date": "2018-04-23",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Dear Cristobal,\n\ndoes hbformat.exe and click32.exe have the same features and functionality.\n\nBest regards,\nOtto",
"time": "10:51",
"topic": "Click! is a CA-Clipper and Xbase++ source code reformatter",
"username": "Otto"
}
] | Click! is a CA-Clipper and Xbase++ source code reformatter |
[
{
"date": "2018-04-23",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Sorry, I can not download the code",
"time": "23:44",
"topic": "Click! is a CA-Clipper and Xbase++ source code reformatter",
"username": "cnavarro"
}
] | Click! is a CA-Clipper and Xbase++ source code reformatter |
[
{
"date": "2018-04-24",
"forum": "FiveWin for Harbour/xHarbour",
"text": "I have the full code <!-- s:D --><img src=\"{SMILIES_PATH}/icon_biggrin.gif\" alt=\":D\" title=\"Very Happy\" /><!-- s:D --> \nadding a download-link to my homepage <!-- s:?: --><img src=\"{SMILIES_PATH}/icon_question.gif\" alt=\":?:\" title=\"Question\" /><!-- s:?: --> \n( back from holidays I still have to update some things ) \n\n*+²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²\n*+\n*+ Source Module => D:\\SRC\\CLICK\\CLICK.PRG\n*+\n*+ Click! is a Clipper/Xbase++ source code reformatter.\n*+ \n*+ Copyright(C) 1996-1999 by Phil Barnett.\n*+ \n*+ This program is free software; you can redistribute it and/or modify it\n*+ under the terms of the GNU General Public License as published by the\n*+ Free Software Foundation; either version 2 of the License, or (at your\n*+ option) any later version.\n\n*+ \n*+ This program is distributed in the hope that it will be useful, but\n*+ WITHOUT ANY WARRANTY; without even the implied warranty of\n*+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n*+ General Public License for more details.\n*+ \n*+ You should have received a copy of the GNU General Public License along\n*+ with this program; if not, write to the Free Software Foundation, Inc.,\n*+ 675 Mass Ave, Cambridge, MA 02139, USA.\n*+ \n*+ You can contact me at:\n*+ \n*+ Phil Barnett\n*+ Box 944\n*+ Plymouth, Florida 32768\n\nregards\nUwe <!-- s:?: --><img src=\"{SMILIES_PATH}/icon_question.gif\" alt=\":?:\" title=\"Question\" /><!-- s:?: -->",
"time": "08:37",
"topic": "Click! is a CA-Clipper and Xbase++ source code reformatter",
"username": "ukoenig"
}
] | Click! is a CA-Clipper and Xbase++ source code reformatter |
[
{
"date": "2018-04-24",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Download CLICK.zip\n\n<!-- m --><a class=\"postlink\" href=\"http://www.pflegeplus.com/DOWNLOADS/Click.zip\">http://www.pflegeplus.com/DOWNLOADS/Click.zip</a><!-- m -->\n\nregards\nUwe <!-- s:D --><img src=\"{SMILIES_PATH}/icon_biggrin.gif\" alt=\":D\" title=\"Very Happy\" /><!-- s:D -->",
"time": "16:41",
"topic": "Click! is a CA-Clipper and Xbase++ source code reformatter",
"username": "ukoenig"
}
] | Click! is a CA-Clipper and Xbase++ source code reformatter |
[
{
"date": "2018-04-24",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Uwe, thanks",
"time": "16:54",
"topic": "Click! is a CA-Clipper and Xbase++ source code reformatter",
"username": "cnavarro"
}
] | Click! is a CA-Clipper and Xbase++ source code reformatter |
[
{
"date": "2018-04-24",
"forum": "FiveWin for Harbour/xHarbour",
"text": "It seems funny that the Click source is not indented at the function level.\n\nI expect that its output is not either.",
"time": "17:22",
"topic": "Click! is a CA-Clipper and Xbase++ source code reformatter",
"username": "James Bott"
}
] | Click! is a CA-Clipper and Xbase++ source code reformatter |
[
{
"date": "2006-03-20",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Can I implement a function when clicking on the top of a column in a TsBrowse.\nIf so, how can I initate that?\n\nIn Windows apps you can click on the top of a column and it changes its sequence in alphabetical order f.i.\n\nI use TsBrowse with great pleasure in all my apps.\n\nThanks for a reply.\n\nJules\n[/b]",
"time": "14:42",
"topic": "Clicking on a TsBrowse Column, can it execute a Function?",
"username": "Jules de Pierre"
}
] | Clicking on a TsBrowse Column, can it execute a Function? |
[
{
"date": "2006-03-20",
"forum": "FiveWin for Harbour/xHarbour",
"text": "oBrw:aActions := { {||msgstop('col 1')}, {||msgstop('col 2')}, {||msgstop('col 3')}, ... }",
"time": "17:46",
"topic": "Clicking on a TsBrowse Column, can it execute a Function?",
"username": "tnhoe"
}
] | Clicking on a TsBrowse Column, can it execute a Function? |
[
{
"date": "2006-03-20",
"forum": "FiveWin for Harbour/xHarbour",
"text": "TNHOE,\n\nThanks for respnding,\nCan you give more detailed info?\nWhere should I place the command: oBrW:aActions\nHow could the Array look like ,example\n\nShould the function: msgstop('col 1') define the order of records ?\n\nThanks again.\n\nJules",
"time": "21:16",
"topic": "Clicking on a TsBrowse Column, can it execute a Function?",
"username": "Jules de Pierre"
}
] | Clicking on a TsBrowse Column, can it execute a Function? |
[
{
"date": "2006-03-21",
"forum": "FiveWin for Harbour/xHarbour",
"text": "select('invoice') // fields: invoice,date,custcode\n\nREDEFINE BROWSE oBrw ALIAS \"invoice\" ID 101 OF oDlg\n\noBrw:LoadFields( .T. ) // load all fields from dbf\n\noBrw:aActions:={ {|| fCol('1') },{|| fCol('2') },{|| fCol('3') } }\n\n:\n:\n\nreturn .t.\n\n\n// Your user defined function below,\n\nfunction fCol(cX)\n\nmsginfo('Header Column clicked : '+cX)\n\nselect('invoice')\ndo case\ncase cX='1'\n set order to tag invoice\ncase cX='2'\n set order to tag date\ncase cX='3'\n set order to tag custcode\nendcase\noBrw:refresh()\n\nreturn .t.",
"time": "01:20",
"topic": "Clicking on a TsBrowse Column, can it execute a Function?",
"username": "tnhoe"
}
] | Clicking on a TsBrowse Column, can it execute a Function? |
[
{
"date": "2007-03-04",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Hi Everybody,\n\nI am starting to look into client / server solutions for my app.\nI know that ADS will work but it's very expensive.\n\n\nAre there any opensource database servers out there?\n\n\nThanks,\n\nJeff",
"time": "22:47",
"topic": "Client / Server",
"username": "Jeff Barnes"
}
] | Client / Server |
[
{
"date": "2007-03-05",
"forum": "FiveWin for Harbour/xHarbour",
"text": "<!-- w --><a class=\"postlink\" href=\"http://www.firebirdsql.org\">www.firebirdsql.org</a><!-- w -->\n<!-- w --><a class=\"postlink\" href=\"http://www.postgresql.org\">www.postgresql.org</a><!-- w -->",
"time": "02:16",
"topic": "Client / Server",
"username": "hua"
}
] | Client / Server |
[
{
"date": "2007-03-05",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Jeff:\n\nIn my personal experience you have to take in account several issues regarding moving to client / server.\n\nDuring the last 10 years I've done over 100 installations of ADS, and I also have developed some SQL based applications, all with FiveWin since version 1.92.\n\nBoth, SQL based databases and ADS have their advantages and disadvantages.\n\nI personally advice to my customers to use ADS if they already have a huge ammount of information in DBF format, believe or not, for economical reasons.\n\nSQL databases may be less expensive, even free, but you always get what you pay for, personally I've done some applications with MySQL, SQL Server, Informix and Oracle, from my point of view, the best databases are not the free ones, but the ones that have a cost, my choice: Informix, if you want something \"payable\" SQL Server would be a good choice.\n\nWhy ADS could be less expensive ? well in terms of time, giving your application client / server technology, is almost inmediatly, just install ADS, make some adaptation to your code, and done !, you can make a basic migration to client / server in one or two days, the most of my customers do it in a weekend, so they can be back to work the very next monday.\n\nADS have a bunch of features, transactions, Optimized filters, Internet Access, it takes some extra time to be \"full\" up and running with ADS but not more than a month, in the meantime you can keep working without stoping your business.\n\nSQLs Databases are a good choice if you are starting a new project, they can be Open Source, free or you have to pay for them, but please notice that beside of the economic issues, there's a big investment you have to do in time.\n\nFrist of all, you have to make a complete redesign of your database in order to get the most of the new sql based database, the BIGGEST mistake programmers do when moving to SQL is to copy the DBF data structures into the SQL tables, please notice that the SQL model is quite different to the DBF model, SQL model has ENOURMOUS advantages over the DBF model such security, referential integrity, relations, triggers, stored procedures, etc so you have to invest at least one month or two just designing the database, also you have to have tools for designing, again, some are free, some you have to pay for them, but trying to go SQL without a good Entity relation diagram or a data design tool, can be a suicide in long time.\n\nOnce you have your database designed, you have to invest time reprogramming all your data access inside your program.\n\nForget about RDD based tools, the Xbase model for accesing data is very defective, you will notice it once you have discover the SQL world with all its features. Sorry to say guys but it's true, using USE... REPLACE or stuff like that having a SQL behind, is like to kill pigeons with cannonballs.\n\nThe best choice is to use ADO for accesing data, the ADO model is very similar to Xbase model, you will feel very comfotable with it, but the sucess using ADO is based in a good database design. My best advice: you are making a CLIENT / SERVER application, so let the SERVER work !!!!!, the best approach in order to minimize the programming changes is to use Stored Procedures.\n\nIt will take about two months more to do the reprogramming for data access.\n\nAnd finally, you have to make the migration of the current data to the new SQL database, setting up it and fine tunning it may take you another month.\n\nIn terms of money, you have to spend between 5 to 7 months (not less) to have ready your application running under SQL client / server.\n\nRemember... the sucess here is all based on the database design, I have customers that didn't make a good database design from the begining, they never tested the \"server\" part, and took them more than two years to move to SQL client / server, they finally made it, but they still have problems of speed and performance due to a defective database design and because they never tested the application with a real server, never tested the internet access, they let the client make the dirty job, not the server, and never made test with big ammounts of data.",
"time": "06:50",
"topic": "Client / Server",
"username": "R.F."
}
] | Client / Server |
[
{
"date": "2007-03-05",
"forum": "FiveWin for Harbour/xHarbour",
"text": "My point of view:\n\nI use Firebird for 2 or 3 years with Delphi and Fivewin.\nAbout FW, I used it with a modified FW ODBC class and I never had problem. Since last year I use FW + xHB comercial + SQLRDD and work perfect.\n\nRegards,\nMaurilio",
"time": "15:12",
"topic": "Client / Server",
"username": "Maurilio Viana"
}
] | Client / Server |
[
{
"date": "2007-03-05",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Eu estou usando MySQL por mais de 3 anos e o unico problema que tenho quando uso WinXP, se o usuario desligar o Servidor ..corrompe as tabelas.\n\nO FireBird acontece isso ?",
"time": "21:57",
"topic": "Client / Server",
"username": "Ari"
}
] | Client / Server |
[
{
"date": "2007-03-06",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Ari,\n\nExistem muitas situações em que se corrompe bancos de dados, com o Firebird não é diferente, entretanto é mais seguro que os DBFs (não sei comparar com relação ao MySQL...).\nNo guia de referência do FB, há uma lista de coisas que *podem* corromper o BD, como desligar o servidor no meio de uma transação, copiar o arquivo com ele em uso, dentre outras situações...\nFelizmente nunca tive o desprazer de ver um arquivo FB corrompido, pois é um problema recuperar qualquer DB relacional corrompido. Quando ocorre de desligar o servidor por um motivo ou outro (queda de energia, por exemplo, e o mesmo não tenha nobreak), eu sempre passo um utilitário pra verificar se esta tudo OK...\nMas há casos em que nem fico sabendo e o BD continua lá funcionando. Mas seguro morreu de velho.\n\n[ ]'s\nMaurilio",
"time": "12:12",
"topic": "Client / Server",
"username": "Maurilio Viana"
}
] | Client / Server |
[
{
"date": "2008-08-14",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Hi all\r\n\r\nBecause I need my application to run reasonably efficiently across a VPN I need to move to a client server architecture. That seemed to mean that I would have to move to an SQL based solution. That should be quite possible but whilst I can use SQL and have done so in the past (but not from xBase) I don't like its fundamental architecture. So I have been trying to think of an alternative. (I also looked into getting fast data connections but the cost here was prohibitive.)\r\n\r\nWhilst its early days I am quite excited about the prospect of getting the performance I need in a client server architecture but using xBase both ends. I have started with some socket code and written queries to be run on the server at the request of the client and the results returned. I was concerned about the format in which to transmit the data. My initial thought was to use xml - although that involves quite some overhead both in terms of the volume of data to be transmitted as well as encoding and decoding.\r\n\r\nBut then I hit upon using a multi level array and using HB_Serialize() to encode in binary form and HB_Deserialize() to decode it. And its working very nicely! Furthermore by returning property name property value pairs in an array (actually a sub array of the return array), given that my classes have actual properties rather than simulated ones I should be able to simply call __ObjSetValueList() to update all single value properties in my calling (client) object. (This last bit has not been tested in my socket programs but is a technique I am already successfully using.)\r\n\r\nCurrently the server has a QUERY class from which I derive a class for a particular query. This may not be the best architecture. I have to look at whether QUERY should be subclassed into single record type queries and list type queries. Also whether or not particular queries should be sub classes or parameterised objects. Also if a QUERY object should be able to call other queries and incorporate their data in its return.\r\n\r\nI don't know if anyone else is interested in pursuing such an approach but if so I'm more than happy to share ideas, code whatever. My code is developed on a Linux platform but should run with little or no change on a Windows platform.\r\n\r\nRegards\r\nxProgrammer",
"time": "03:33",
"topic": "Client Server Database Access the xBase Way",
"username": "xProgrammer"
}
] | Client Server Database Access the xBase Way |
[
{
"date": "2008-08-14",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Doug,\r\n\r\nYou may check if there is a Linux version of Leto db server:\r\n\r\n<!-- m --><a class=\"postlink\" href=\"http://sourceforge.net/projects/letodb\">http://sourceforge.net/projects/letodb</a><!-- m -->",
"time": "08:21",
"topic": "Client Server Database Access the xBase Way",
"username": "Antonio Linares"
}
] | Client Server Database Access the xBase Way |
[
{
"date": "2008-08-14",
"forum": "FiveWin for Harbour/xHarbour",
"text": "It seems as there is a Linux version:\r\n\r\n<!-- m --><a class=\"postlink\" href=\"http://letodb.cvs.sourceforge.net/letodb/letodb/source/server/\">http://letodb.cvs.sourceforge.net/letod ... ce/server/</a><!-- m -->",
"time": "08:22",
"topic": "Client Server Database Access the xBase Way",
"username": "Antonio Linares"
}
] | Client Server Database Access the xBase Way |
[
{
"date": "2008-08-14",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Hi Antonio\r\n\r\nThanks for the link. Interesting, but not really what I want (I think). From my experiments to date I think I can do what I want to do without needing any C code and in a way that integrates very nicely into my application architecture. My impression is that leto passes data by position which is a little on the dangerous side in my opinion.\r\n\r\nI'll try to explain a bit more what I want to do and then I had better get back to trying to do it.\r\n\r\nLets say you want to let the user pick a patient from a grid of patients with a given name. To get this information in a typical xBase application you might have code along the following lines:\r\n\r\n[code:30r79jol] ::oDBF:SetOrder( 2 ) \n llSuccess := ::oDBF:Seek( ::sSearch )\n ASIZE( ::aKey, 0 )\n ASIZE( ::aFName, 0 )\n ASIZE( ::aGName, 0 )\n ASIZE( ::aGender, 0 )\n ASIZE( ::aDOB, 0 )\n DO WHILE llSuccess\n ::nFound += 1\n AADD( ::aKey, PT_KEY )\n AADD( ::aFName, PT_NMFAMLY )\n AADD( ::aGName, PT_NMGIVEN )\n AADD( ::aGender, PT_GENDER )\n AADD( ::aDOB, DTOC( STOD( PT_DOB ) ) ))\n ::oDBF:Skip( 1 )\n IF ::oDBF:EOF()\n llSuccess := .F.\n ELSE\n lcTest := UPPER( PT_NMFAMLY + PT_NMGIVEN )\n IF lcTest <> ::sSearch\n llSuccess := .F.\n ENDIF\n ENDIF\n ENDDO[/code:30r79jol]\n\nThis runs very nicely co0nnected to a LAN. However if you are running across a lower speed data connection between sites it can be rather slow. In my case it might take around 1 second per returned patient rather than a fraction of a second even if 100 patients are returned.\n\nThe problem is not that the code is inefficient per se, it's just that \n\n1. more data has to be transmitted / received, and\n\n2. that is done piecemeal rather than in aggregate.\n\nSo you could use an SQL based data base back end. Your code might look more like:\n\n[code:30r79jol]oQuery := SQL_QUERY():New()\nsQueryString :='SELECT PT_KEY AS sKey, PT_NMFAMLY AS sNmFamly, PT_NMGIVEN AS sNmGiven, PT_DOB as sDOB, PT_GENDER AS cGender FROM PT_PATIENT WHERE PT_NMFAMLY EQUALS \"' + ::sSearch + '\"'\noQuery:sSelect := sQueryString\nllSuccess := oQuery:Execute()[/code:30r79jol]\n\nPlease pardon me if my SQL is incorrect - I haven't used SQL for a few years now. Also note that the above SQL statement above is not quite equivalent in that it doesn't allow for optionally including given name.\n\nWhilst this approach is intrinsically less efficient (the SQL statement has to be interpreted) in practice it may or may not be more efficient locally but across a lower speed connection it should be much much faster. For the reasons given above which have all to do with where code is executed / the data transmission requirements and nothing to with SQL per se.\n\nSo if we can run the xBase code on the computer that has the database, or on one with a fast communications channel to it, we will get similar speed benefits.\n\nBut with sockets that's not hard to do!\n\nJust for illustration consider modifying the first code example along these lines:\n\n[code:30r79jol] ::oDBF:SetOrder( 2 ) \n llSuccess := ::oDBF:Seek( ::sSearch )\n ASIZE( ::aRESULTS[1], 0 )\n ASIZE( ::aRESULTS[2], 0 )\n ASIZE( ::aRESULTS[3], 0 )\n ASIZE( ::aRESULTS[4], 0 )\n ASIZE( ::aRESULTS[5], 0 )\n DO WHILE llSuccess\n ::nFound += 1\n AADD( ::aRESULTS[1], PT_KEY )\n AADD( ::aRESULTS[2], PT_NMFAMLY )\n AADD( ::aRESULTS[3], PT_NMGIVEN )\n AADD( ::aRESULTS[4], PT_GENDER )\n AADD( ::aRESULTS[5], DTOC( STOD( PT_DOB ) ) ))\n ::oDBF:Skip( 1 )\n IF ::oDBF:EOF()\n llSuccess := .F.\n ELSE\n lcTest := UPPER( PT_NMFAMLY + PT_NMGIVEN )\n IF lcTest <> ::sSearch\n llSuccess := .F.\n ENDIF\n ENDIF\n ENDDO[/code:30r79jol]\n\nNow we have a result set in ::aRESULTS which we can binary encode with\n\n[/code]sEncoded := HB_Serialize( ::aRESULTS )[/code]\r\n\r\nand transmitted back to our client and decoded with HB_DeSerialize().\r\n\r\nEffectively we can use the same coding techniques but split where the code is executed between client and server.\r\n\r\nPlease note that we can improve greatly on the above and also that we need to transmit also success / failure /error type information. Also we can use a QUERY class on the server, effectively pre-compile our queries, cut down substantially on the amount of code that needs to be written etc.\r\n\r\nRegards\r\nxProgrammer",
"time": "23:25",
"topic": "Client Server Database Access the xBase Way",
"username": "xProgrammer"
}
] | Client Server Database Access the xBase Way |
[
{
"date": "2008-08-14",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Doug,\r\n\r\nyes, I see what you mean. \r\n\r\nIt seems a sort of SQL running on the server side that just returns the result and minimizes the network traffic.",
"time": "23:32",
"topic": "Client Server Database Access the xBase Way",
"username": "Antonio Linares"
}
] | Client Server Database Access the xBase Way |
[
{
"date": "2008-08-15",
"forum": "FiveWin for Harbour/xHarbour",
"text": "xProgrammer\r\n\r\nxHarbour and Harbour has a wonderful class from Win32ole and it is a very easy way to connect to any Sql database with your FWH and xBase Code.\r\n\r\nI wrote ( some time ago ) an ADO thread explaining the usage and syntax using ADO.\r\n\r\n<!-- m --><a class=\"postlink\" href=\"http://forums.fivetechsoft.com/viewtopic.php?t=6691&highlight=ado\">http://forums.fivetechsoft.com/viewtopi ... hlight=ado</a><!-- m -->\r\n\r\nFor the past year .. I have done nothing but MS Sql server\\Ado and Antonio has even done a lot of work with the free adordd.\r\n\r\nHave a look at the link .. you can compile a single executable and use MS Sql server, connect without any client side drivers and NO odbc .. ADO uses the native 'sqloledb' Win32 built into every Windows operating system from Win98 through Vista SP1 ..\r\n\r\nRick Lipkin",
"time": "00:00",
"topic": "Client Server Database Access the xBase Way",
"username": "Rick Lipkin"
}
] | Client Server Database Access the xBase Way |
[
{
"date": "2008-08-15",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Rick,\r\n\r\nDoug just work on Linux using FiveLinux. No ADO there as far as I know, though he may use ODBC or (DLLs equivalents for) MySQL, etc.",
"time": "01:01",
"topic": "Client Server Database Access the xBase Way",
"username": "Antonio Linares"
}
] | Client Server Database Access the xBase Way |
[
{
"date": "2008-08-15",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio\r\n\r\nI kinda thought he was talking about Linux .. just curious .. if you could get the connection string for Linux and Sql server and figure out the client support... it seems that your could use the same syntax and Harbour or xHarbour's win32ole class ??\r\n\r\nNot a Linux person here so I am no expert .. <!-- s:cry: --><img src=\"{SMILIES_PATH}/icon_cry.gif\" alt=\":cry:\" title=\"Crying or Very sad\" /><!-- s:cry: --> \r\n\r\nRick",
"time": "01:54",
"topic": "Client Server Database Access the xBase Way",
"username": "Rick Lipkin"
}
] | Client Server Database Access the xBase Way |
[
{
"date": "2008-08-15",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Hi Rick\r\n\r\nYes Linux kind of precludes that approach although I could use mySQL or PostrgeSQL or even DB2. I do have some reservations about the SQL approach although I have used it quite heavily (Microsoft SQL Server and Sybase) in the past. I like the idea of pretty much using the type of xBase code you might write anyway but splitting it in two and running it client server mode (which is what I need) and not having to go the SQL route. When I was using SQL Server there was a serious hole in the product which Microsoft never fixed whilst I was watching - you could only get back the (system generated) key of the most recent insert - so if your transaction involved more than 1, eg if a trigger was fired, you had problems and the Microsoft workaround was horrible. I attended a Microsoft developer briefing where we were promised it would be fixed in the next release - but it wasn't in the subsequent releases I saw. Probably fixed by now. For my money SQL Server is way overpriced, has flaws and is non portable. Plus I like being master of my own destiny to the extent I can. Having said that I am happy to pay for something like FiveWin (well more FiveLinux in my case) where there is some real support.\r\n\r\nI guess I have sort of wandered off the topic a bit! I put the topic here because I thought some others might be interested in the approach I am taking. But I'm quite happy to push on regardless. In fact to date the journey has been rather exciting. Does that make me strange? Probably. But I can live with that.\r\n\r\nHappy coding\r\n\r\nDoug",
"time": "03:44",
"topic": "Client Server Database Access the xBase Way",
"username": "xProgrammer"
}
] | Client Server Database Access the xBase Way |
[
{
"date": "2008-08-15",
"forum": "FiveWin for Harbour/xHarbour",
"text": "[quote=\"Rick Lipkin\":31ixbgy0]...connect without any client side drivers and NO odbc .. ADO uses the native 'sqloledb' Win32 built into every Windows operating system from Win98 through Vista SP1 ..\nRick Lipkin[/quote:31ixbgy0]\r\n\r\nRick, does the above statement applies to any SQL server or it's just true for MS SQL server?",
"time": "04:06",
"topic": "Client Server Database Access the xBase Way",
"username": "hua"
}
] | Client Server Database Access the xBase Way |
[
{
"date": "2008-08-15",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Rick,\r\n\r\n> it seems that your could use the same syntax and Harbour or xHarbour's win32ole class ?? \r\n\r\nWe don't know if there is an OleAuto clone for Linux.\r\n\r\nAlso I don't know if ADO has been cloned in Linux",
"time": "09:07",
"topic": "Client Server Database Access the xBase Way",
"username": "Antonio Linares"
}
] | Client Server Database Access the xBase Way |
[
{
"date": "2008-08-15",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Hua\r\n\r\nSince Microsoft makes Sql Server .. it stands to reason they would build into their pc operating systems a native way to connect .. and they do !! .. 'sqloledb' .. and there is NO need for odbc .. no client needed at all !!\r\n\r\nHowever, you will need a client for dB2, Oracle or any other sql database .. \r\n\r\nRick",
"time": "13:55",
"topic": "Client Server Database Access the xBase Way",
"username": "Rick Lipkin"
}
] | Client Server Database Access the xBase Way |
[
{
"date": "2008-08-19",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Hi all\r\n\r\nIt may be far from perfect but I have client server database access with xBase both ends - backend is xHarbour, front end is xHarbour / FiveLinux. Back end is successfully returning lists of records, individual records and updating records. Next step is to support inserts.\r\n\r\nHappy programming\r\n\r\nxProgrammer",
"time": "03:46",
"topic": "Client Server Database Access the xBase Way",
"username": "xProgrammer"
}
] | Client Server Database Access the xBase Way |
[
{
"date": "2008-08-19",
"forum": "FiveWin for Harbour/xHarbour",
"text": "[quote=\"Rick Lipkin\":279j3nu3]Hua\n\nSince Microsoft makes Sql Server .. it stands to reason they would build into their pc operating systems a native way to connect .. and they do !! .. 'sqloledb' .. and there is NO need for odbc .. no client needed at all !!\n\nHowever, you will need a client for dB2, Oracle or any other sql database .. \n\nRick[/quote:279j3nu3]\r\n\r\nThanks for the clarification Rick.",
"time": "04:26",
"topic": "Client Server Database Access the xBase Way",
"username": "hua"
}
] | Client Server Database Access the xBase Way |
[
{
"date": "2008-08-19",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Doug,\r\n\r\nExcellent! <!-- s:-) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":-)\" title=\"Smile\" /><!-- s:-) -->\r\n\r\nCould you provide us some more tech details about it ? As far as I understand it, you are using sockets and you have built a server using Harbour (console mode).\r\n\r\nHave you tested it against multiple clients simultaneously ? Are you using threads ?",
"time": "07:30",
"topic": "Client Server Database Access the xBase Way",
"username": "Antonio Linares"
}
] | Client Server Database Access the xBase Way |
[
{
"date": "2008-08-19",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Hi Antonio\r\n\r\nHappy to share details, code etc but in a hurry to get to an appointment at present. Also would like to clean up code a bit.\r\n\r\nI am using sockets. Backend is xHarbour text mode. Front end is xHarbour / Five Linux GUI. Data is transmitted in binary (HB_Serialize()) format in an array (of arrays etc as required). This includes variable names, parameters etc. For single record type queries object properties can be updated by a single call __ObjSetValueList. I haven't had to write a single line of C. Although I intend using threads I am just using a single thread model at this stage. Can just have separate copies listening on separate ports until I do threads.\r\n\r\nWill give more details soon.\r\n\r\nRegards\r\n\r\nDoug",
"time": "08:07",
"topic": "Client Server Database Access the xBase Way",
"username": "xProgrammer"
}
] | Client Server Database Access the xBase Way |
[
{
"date": "2008-08-19",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Hi Antonio\r\n\r\nBefore I present actual code (in the posts to follow) I should provide the following by way of explanation.\r\n\r\nWhilst this code is functional in the sense that I am using it in an application it is very much work in progress. The code is not claimed to be complete, neat, robust or optimised.\r\n\r\nAlso please note that the code has been written to meet my needs and not as a general \"library\" in any sense. Along the way I have had to make many design decisions where there were many alternatives which may suit you better.\r\n\r\nWhy would you bother going client-server with xBase? In my case the answer is simple. I need better performance across a VPN than I can achieve with conventional xBase code. The alternative is to use a third party data base back end such as mySQL, PostrgeSQL, or if you want to pay for the privilege Advantage DataBase Server, Sybase or SQLServer.\r\n\r\nThose options will in general give you more than my option will, the extent of those extras depending upon your choice. Features such as transaction control, roll forward / roll back, ad hoc queries / reports and management tools.\r\n\r\nAt this stage all I have set out to do is to write a data base back end to do reads, updates and inserts. \r\n\r\nRegards\r\nxProgrammer",
"time": "23:09",
"topic": "Client Server Database Access the xBase Way",
"username": "xProgrammer"
}
] | Client Server Database Access the xBase Way |
[
{
"date": "2008-08-19",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Hi Antonio\r\n\r\nI am using sockets to communicate between the GUI application front end (the client) and the data base back end (the server). I started with the sample code for the INet....() xHarbour functions to get a feel for socket programs. But there were quite a few changes required to get what I wanted.\r\n\r\nSince the front end application obviously needs to communicate with the data base back end from many different points in the code I put together a basic sockets class. The current version is as follows:\r\n\r\n[code:3s7ei5cz]CLASS TSocket\n\nCLASSDATA lInitialised INIT .F.\nDATA sIPAddress\nDATA iPortNumber\nDATA pSocket\nDATA lConnected\nDATA cData\n\nMETHOD New() CONSTRUCTOR\nMETHOD SetIP( sIPAddress )\nMETHOD SetPort( iPortNumber )\nMETHOD Connect()\nMETHOD Send( cMessage )\nMETHOD Receive()\nMETHOD Close()\nMETHOD SendReceive( cMessage )\nMETHOD CleanUp()\n\nENDCLASS\n\nMETHOD New() CLASS TSocket\n\n::sIPAddress := \"127.0.0.1\"\n::iPortNumber := 1800\nIF !::lInitialised\n INetInit()\n ::lInitialised := .T.\nENDIF\n\nRETURN self\n\nMETHOD SetIP( sIPAddress ) CLASS TSocket\n\n::sIPAddress := sIPAddress\n\nRETURN nil\n\n\nMETHOD SetPort( iPortNumber ) CLASS TSocket\n\n::iPortNumber := iPortNumber\n\nRETURN nil\n\n\nMETHOD Connect() CLASS TSocket\n\nlOK := .T.\nTRY\n ::pSocket := INetConnect( ::sIPAddress, 1800 )\nCATCH\n MsgInfo( \"Unable to connect to data server\" )\n lOK := .F.\nEND\n\nIF INetErrorCode( ::pSocket ) <> 0\n ? \"Socket error:\", INetErrorDesc( ::pSocket )\n INetCleanUp()\n lOK := .F.\n // QUIT\nENDIF\n\nIF lOK \n ::lConnected := .T.\n ELSE\n ::lConnected := .F.\nENDIF\n\nRETURN lOK\n\n\nMETHOD Send( cMessage ) CLASS TSocket\n\nINetSend( ::pSocket, cMessage )\n\nRETURN nil\n\n\nMETHOD Receive() CLASS TSocket\n\nLOCAL cBuffer\nLOCAL nBytes\n\n::cData := \"\"\nnBytes := 1\nDO WHILE nBytes > 0\n cBuffer := Space( 1024 )\n nBytes := INetRecv( ::pSocket, @cBuffer )\n ::cData += Left( cBuffer, nBytes )\nENDDO\n\nRETURN nil\n\n\nMETHOD Close() CLASS TSocket\n\nINetClose( ::pSocket )\n\nRETURN nil\n\n\nMETHOD SendReceive( cMessage ) CLASS TSocket\n\n::Send( cMessage )\n::Receive()\n::Close()\n\nRETURN ::cData\n\n\nMETHOD CleanUp() CLASS TSocket\n\nRETURN InetCleanUp()[/code:3s7ei5cz]\r\n\r\nThere are some further possible developments that would simplify using this class but they wouldn't really fit into a fairly generic TSocket class so I will probably end up creating a sub class of TSocket enhanced to suit the particular needs of communicating with the data base back end.\r\n\r\nRegards\r\nxProgrammer",
"time": "23:33",
"topic": "Client Server Database Access the xBase Way",
"username": "xProgrammer"
}
] | Client Server Database Access the xBase Way |
[
{
"date": "2008-08-20",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Hi Antonio\r\n\r\nThe front end application needs to set up communication as follows:\r\n\r\n[code:3qr32fzl]oSocket := TSocket():New()\noSocket:SetIP( sIPAddress )\noSocket:SetPort( 1800 )[/code:3qr32fzl]\n\nCurrently my database queries are identified by numbers set in defines as follows:\n\n[code:3qr32fzl]#define query_PT_LIST_BY_NAME 1\n#define query_PT_BY_KEY 2\n#define query_PT_WRITE 3\netc.....[/code:3qr32fzl]\n\nSending a query to the data base back end is done as follows:\n\n[code:3qr32fzl] oSocket:Connect()\n aREQUEST[1] := query_PT_LIST_BY_NAME\n aREQUEST[2] := Array( 1 )\n aREQUEST[2][1] := ::sSearch\n oSocket:Send( HB_Serialize( aREQUEST) )[/code:3qr32fzl]\n\nA few words of explanation are required here. I am using arrays to communicate between the client and the server. The array is then serialized for transmission to the server where the process is reversed. The same method is used in reverse for the server's response. The parameter(s) are passed in the second element of the passed array.\n\nThe above code is requesting a list of patients with a name matching the value in ::sSearch.\n\nThe return is handled by the following code:\n\n[code:3qr32fzl] oSocket:Receive()\n oSocket:Close()\n aTranslated := HB_Deserialize( oSocket:cData )\n aSTATUS := aTranslated[1]\n aOUTPUT := aTranslated[2][/code:3qr32fzl]\n\naSTATUS will contain success / failure information. aOUTPUT contains the returned data. At the present time the format of aOUPUT is as follows:\n\naOUTPUT[1] contains a list of variables returned (currently not used), the values themselves are contained in aOUTPUT[2] through aOUTPUT[n+1]. So in this case the data returned can be most easily used as follows:\n\n[code:3qr32fzl] iList := LEN( aLIST[2] )\n ::aKey := aLIST[2]\n ::aFName := aLIST[3]\n ::aGName := aLIST[4]\n ::aDOB := aLIST[5]\n ::aGender := aLIST[6][/code:3qr32fzl]\n\nPerhaps easier to follow is a query that returns a single record. Here is the code to get the data for a single patient record with key \n\n[code:3qr32fzl] LOCAL aREQUEST\n oSocket:Connect()\n aREQUEST := ARRAY( 2 )\n aREQUEST[1] := query_PT_BY_KEY\n aREQUEST[2] := Array( 1 )\n aREQUEST[2][1] := ::sKey\n oSocket:Send( HB_Serialize( aREQUEST) ) \n oSocket:Receive()\n oSocket:Close()\n aTranslated := HB_Deserialize( oSocket:cData )\n aSTATUS := aTranslated[1]\n aOUTPUT := aTranslated[2]\n __ObjSetValueList( self, aOUTPUT )\n ::dDOB := SToD( ::sDOB )[/code:3qr32fzl]\n\nNote that aTranslated[2] contains the data in the following format:\n\n[code:3qr32fzl]{ { <variable-name-1>, <variable-1-value> }, { <variable-name-2>, <variable-2-value> }, ............. { <variable-name-n>, <variable-n-value> } }[/code:3qr32fzl]\r\n\r\nThat is convenient because we can use __ObjSetValueList() to put the values into the calling object.\r\n\r\nI'll explain more in subsequent posts, but I have to get back to programming or I'll get in trouble so bye for now.\r\n\r\nRegards\r\nxProgrammer",
"time": "00:40",
"topic": "Client Server Database Access the xBase Way",
"username": "xProgrammer"
}
] | Client Server Database Access the xBase Way |
[
{
"date": "2008-08-20",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Hi Doug,\r\n\r\n[quote=\"xProgrammer\":2tmvty5r]\nI guess I have sort of wandered off the topic a bit! I put the topic here because I thought some others might be interested in the approach I am taking. But I'm quite happy to push on regardless. In fact to date the journey has been rather exciting. Does that make me strange? Probably. But I can live with that.\n[/quote:2tmvty5r]\r\n\r\nWhatever you (or anyone else) can share is appreciated Doug <!-- s:D --><img src=\"{SMILIES_PATH}/icon_biggrin.gif\" alt=\":D\" title=\"Very Happy\" /><!-- s:D --> Nowadays there's no books, magazines, etc that can help me increase my knowledge of programming using FWH+[x]Harbour to the expert level yet. The only major source of knowledge is this forum.\r\n\r\nOn a completely different matter I wish we had a book for FWH similar to Clipper Developers Guide book where the best methods to tackle different issues are experly disected and explained.",
"time": "03:15",
"topic": "Client Server Database Access the xBase Way",
"username": "hua"
}
] | Client Server Database Access the xBase Way |
[
{
"date": "2008-08-20",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Hi Antonio\r\n\r\nI've just done my first performance test across my VPN and I'm very pleased to say that its fast. Still more development to do but its going well.\r\n\r\nRegards\r\nxProgrammer",
"time": "03:58",
"topic": "Client Server Database Access the xBase Way",
"username": "xProgrammer"
}
] | Client Server Database Access the xBase Way |
[
{
"date": "2008-08-21",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Hi Antonio\r\n\r\nThe data base server back end is very much a work in progress but it is functional. Quite a few features need to be added such as error handling, links to other tables, automatic allocation of primary keys etc.\r\n\r\nAlso please note that I have made a number of design decisions that suit my purposes. Some of these make the code slightly more complicated but they give me what I need.\r\n\r\nThere are really two types of queries - those that will ever only return a single record or fail and those that will return 0 through many records. The first type might be a read, an update or an insert. The second type will be a read.\r\n\r\nI have created a base TData Class and two subclasses, namely TSingleData and TListData. Current versions are as follows:\r\n\r\n[code:tdbpw1oi]CLASS TData\n\nDATA iWorkArea\nDATA aPROPERTIES\nDATA iProperties\nDATA aOUTPUT\nDATA aLIST\nDATA lFound\nDATA iRecord\nDATA sName\n\nMETHOD New() CONSTRUCTOR\n\nENDCLASS\n\nMETHOD New() CLASS TData\n\nRETURN self\n\n\nCLASS TListData FROM TData\n\nMETHOD New() CONSTRUCTOR\nMETHOD SetUp()\nMETHOD ClearData()\nMETHOD ReadRecord()\nMETHOD IndexRead()\n\nENDCLASS\n\nMETHOD New( iWorkArea, aProperties, sName ) CLASS TListData\n\n::iWorkArea := iWorkArea\n::aPROPERTIES := aProperties\nIF PCount() > 2\n ::sName := sName\n ELSE\n ::sName := \"\"\nENDIF\n::SetUp()\n\nRETURN self\n\nMETHOD SetUp() CLASS TListData\n\nLOCAL ii\nLOCAL aTHIS\n\nSELECT ( ::iWorkArea )\n::iProperties := LEN( ::aPROPERTIES )\nIF lVerbose\n ?\n ? \"Setting Up List Data \", ::sName, \" property count \", LTRIM( STR( ::iProperties ) )\nENDIF\n::aLIST := Array( ::iProperties + 1 )\n::aLIST[1] := ARRAY( ::iProperties )\nFOR ii = 1 TO ::iProperties\n ::aLIST[1][ii] := ::aPROPERTIES[ii][2]\n ::aPROPERTIES[ii][3] := FieldPos( ::aPROPERTIES[ii][1] )\n IF lVerbose\n ? \"Field \", ::aPROPERTIES[ii][1], \" found at \", ::aPROPERTIES[ii][3], \" returned as \", ::aPROPERTIES[ii][2]\n ENDIF\n ::aLIST[ii + 1] := ARRAY( 0 )\nNEXT\n\nRETURN nil\n\nMETHOD IndexRead( iOrder, sSearch, bCompare ) CLASS TListData\n\nLOCAL vTest\n\nSELECT ( ::iWorkArea )\n::ClearData()\nSET ORDER TO ( iOrder )\nSEEK sSearch\n::lFound := FOUND()\nIF ::lFound \n lLoop := .T.\n DO WHILE lLoop\n IF lVerbose\n ? \"Found \", sSearch, \" at record \", RecNo(), \" in \", ::sName\n ENDIF\n ::ReadRecord()\n SKIP\n IF EOF()\n lLoop := .F.\n IF lVerbose\n ? \"End of file reached in \", ::sName\n ENDIF\n ELSE\n vTest := Eval( bCompare )\n IF vTest <> sSearch\n lLoop := .F.\n IF lVerbose\n ? \"No match at record \", RecNo(), \" in \", ::sName\n ENDIF\n ENDIF\n ENDIF\n ENDDO\n ELSE\n IF lVerbose\n ? \"Failed to find \", sSearch, \" in \", ::sName\n ENDIF\nENDIF\n\nRETURN nil\n\nMETHOD ClearData() CLASS TListData\n\nLOCAL ii \nFOR ii = 2 TO ::iProperties + 1\n ASize( ::aLIST[ii], 0 )\nNEXT\n\nRETURN nil\n\nMETHOD ReadRecord() CLASS TListData\n\nSELECT ( ::iWorkArea )\n\nFOR ii = 1 TO ::iProperties\n cDataType := FieldType( ::aProperties[ii][3] )\n DO CASE\n CASE cDataType = \"D\"\n AAdd( ::aLIST[ii + 1], STOD( FieldGet( ::aPROPERTIES[ii][3] ) ) )\n OTHERWISE\n AAdd( ::aLIST[ii + 1], FieldGet( ::aPROPERTIES[ii][3] ) )\n ENDCASE\n IF lVerbose\n ? ::aLIST[1][ii], \" = \", ::aLIST[ii + 1][Len( ::aLIST[ii + 1] )]\n ENDIF\nNEXT\n\nRETURN nil\n\n\n\nCLASS TSingleData FROM TData\n\nMETHOD New() CONSTRUCTOR\nMETHOD SetUp()\nMETHOD ReadRecord()\nMETHOD KeyRead()\nMETHOD Write()\nMETHOD WriteRecord()\n\nENDCLASS\n\nMETHOD New( iWorkArea, aProperties, iKeyAllocator, sName ) CLASS TSingleData\n\n::iWorkArea := iWorkArea\n::aPROPERTIES := aProperties\nIF PCount() > 3\n ::sName := sName\n ELSE\n ::sName := \"\"\nENDIF\n::SetUp()\n\nRETURN self\n\n\nMETHOD Setup() CLASS TSingleData\n\nLOCAL ii\nLOCAL aTHIS\n\nSELECT ( ::iWorkArea )\n::iProperties := LEN( ::aPROPERTIES )\nIF lVerbose\n ? \"Setting Up Single Data \", ::sName, \" property count \", LTRIM( STR( ::iProperties ) )\nENDIF\n::aOUTPUT := ARRAY( ::iProperties )\nFOR ii = 1 TO ::iProperties\n aTHIS := Array( 2 )\n aTHIS[1] := ::aPROPERTIES[ii][2]\n ::aOUTPUT[ii] := aTHIS\n ::aPROPERTIES[ii][3] := FieldPos( ::aPROPERTIES[ii][1] )\n IF lVerbose\n ? \"Field \", ::aPROPERTIES[ii][1], \" found at position \", ::aPROPERTIES[ii][3], \" returned as \", ::aPROPERTIES[ii][2]\n ENDIF\nNEXT\n\nRETURN nil\n\nMETHOD ReadRecord() CLASS TSingleData\n\nSELECT ( ::iWorkArea )\nFOR ii = 1 TO ::iProperties\n ::aOUTPUT[ii][2] := FieldGet( ::aPROPERTIES[ii][3] )\n ? ::aOUTPUT[ii][1], \" = \", ::aOUTPUT[ii][2]\nNEXT\n\nRETURN nil\n\nMETHOD KeyRead( iOrder, sKey ) CLASS TSingleData\n\nSELECT ( ::iWorkArea )\nSET ORDER TO ( iOrder )\nSEEK sKey\n::lFound := FOUND()\nIF ::lFound\n IF lVerbose\n ? \"Found \", sKey, \" at \", RecNo(), \" in \", ::sName\n ENDIF\n ::iRecord := RecNo()\n ::ReadRecord()\n aRESPONSE[2] := ::aOUTPUT\n ELSE\n IF lVerbose\n ? \"ERROR: Failed to find \", sKey, \" in \", ::sName\n ENDIF\nENDIF\n\nRETURN nil\n\nMETHOD Write( iOrder, aRESPONSE, sKey ) CLASS TSingleData\n\nSELECT ( ::iWorkArea )\nSET ORDER TO ( iOrder )\n\nIF aRESPONSE[1][2] = \"[\"\n ? \"Insert Required\"\n APPEND BLANK\n aRESPONSE[1][2] := \"999999999999001\"\n ELSE\n ? \"Update Required\"\n SEEK sKey\n ::lFound := FOUND()\n IF ::lFound\n ? \"Record Found\"\n ::WriteRecord( aRESPONSE )\n ELSE\n ? \"ERROR: Unable to locate record for update\"\n ENDIF\nENDIF\n\nRETURN nil\n\nMETHOD WriteRecord( aOUTPUT ) CLASS TSingleData\n\nLOCAL ii\nLOCAL iPosition\n\nFOR ii = 1 TO LEN( aOUTPUT )\n iPosition := FieldPos( aOUTPUT[ii][1] ) \n IF iPosition > 0\n FieldPut( iPosition, aOUTPUT[ii][2] ) \n ENDIF\nNEXT\n\nRETURN nil[/code:tdbpw1oi]\r\n\r\nAs you can see TSingleData:Write() will handle both update and insert operations but the code for insert has not yet been completed.\r\n\r\n::aPROPERTIES is an array holding the details of what fields are to be returned and what the variable name to be used is equivalent to SELECT <field> AS <variable>. In the ::SetUp() function field positions are determined from the field names and used thereafter. Also an array is built up with the variable names ready for the values to be inserted at query time and returned to the client.\r\n\r\nYou can run the server in verbose mode (lVerbose := .T.) and see it in operation.\r\n\r\nRegards\r\nxProgrammer",
"time": "00:24",
"topic": "Client Server Database Access the xBase Way",
"username": "xProgrammer"
}
] | Client Server Database Access the xBase Way |
[
{
"date": "2008-08-21",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Hi Antonio\r\n\r\nDefining the queries is easy (if a little long winded given that I am returning variable names which aren't field names). For example:\r\n\r\n[code:3lmlrhmg] oPT_BY_KEY := TSingleData():New( 1, { { \"PT_KEY\", \"sKey\", 0 }, { \"PT_NMFAMLY\", \"sNmFamly\", 0 }, { \"PT_NMGIVEN\", \"sNmGiven\", 0 }, ;\n { \"PT_NMOTHER\", \"sNmOther\", 0 }, { \"PT_NMPREV\", \"sNmPrev\", 0 }, { \"PT_NMPREF\", \"sNmPref\", 0 }, { \"PT_NMTITLE\", \"sNmTitle\", 0 }, ;\n { \"PT_DOB\", \"sDOB\", 0 }, { \"PT_GENDER\", \"cGender\", 0 }, { \"PT_ADLINE1\", \"sAdLine1\", 0 }, { \"PT_ADLINE2\", \"sAdLine2\", 0 }, ;\n { \"PT_ADSUBRB\", \"sAdSubrb\", 0 }, { \"PT_ADSTATE\", \"sAdState\", 0 }, { \"PT_ADPCODE\", \"sAdPCode\", 0 }, { \"PT_ADCNTRY\", \"sAdCntry\", 0 }, ;\n { \"PT_PHHOME\", \"sPhHome\", 0 }, { \"PT_PHWORK\", \"sPhWork\", 0 }, { \"PT_PHMOB\", \"sPhMob\", 0 }, { \"PT_PHFAX\", \"sPhFax\", 0 }, ;\n { \"PT_EMAIL\", \"sEmail\", 0 }, { \"PT_MEDIC\", \"sMedic\", 0 }, { \"PT_MEDPOS\", \"sMedPos\", 0 }, { \"PT_VETAFF\", \"sVetAff\", 0 }, ;\n { \"PT_ACTIVE\", \"cActive\", 0 }, { \"PT_LUBY\", \"sLUBy\", 0 }, { \"PT_LUWHEN\", \"sLUWhen\", 0 }, { \"PT_LUACTN\", \"cLUActn\", 0 } }, ;\n 1, \"Patient by Key\" )\n oPT_LIST_BY_NAME := TListData():New( 1, { { \"PT_KEY\", \"sKey\", 0 }, { \"PT_NMFAMLY\", \"sNmFamly\", 0 }, { \"PT_NMGIVEN\", \"sNmGiven\", 0 }, ;\n { \"PT_DOB\", \"dDOB\", 0 }, { \"PT_GENDER\", \"cGender\", 0 } }, \"Patient List by Name\" )\n oPF_LIST_BY_PT_KEY := TListData():New( 3, { { \"PF_KEY\", \"aKey\", 0 }, { \"PF_FLKEY\", \"aFLKey\", 0 }, { \"PF_FLKEY\", \"aFLName\", -1, 2, 1 }, ;\n { \"PF_DTFIRST\", \"aDtFirst\", 0 }, { \"PF_DTLAST\", \"aDtLast\", 0 }, { \"PF_CLOSED\", \"aClosed\", 0 } }, \"Patient File List by Patient Key\")[/code:3lmlrhmg]\n\nNote that the first parameter is the WorkArea to use (my code assumes that all files are opened up by the data base server on startup). Then follows an array of fields to return in the format { { <field-name>, <variable-name>, 0 }, .... }. The third element will (in most cases) be updated by the SetUp function to the field's position in the table. For return values that are something other than the value of a field there are further options available which I can explain in the future. Fot TSingleData:New() the next parameter is an offset into the primary key allocator (yet to be included). The final parameter is a name to be used when in verbose mode.\n\nDefining how to process a particular request is pretty easy. Currently I am using a CASE statement but I may need to use a more efficient method as the number of possible requests increases.\n\n[code:3lmlrhmg] aREQUEST := HB_Deserialize( cData )\n IF lVerbose\n ? \"Received request number: \", aREQUEST[1]\n ENDIF\n iSelection := aREQUEST[1]\n DO CASE\n CASE iSelection = query_PT_LIST_BY_NAME\n oPT_LIST_BY_NAME:IndexRead( 2, aREQUEST[2][1], { | | UPPER( PT_NMFAMLY + PT_NMGIVEN ) } )\n CASE iSelection = query_PT_BY_KEY\n oPT_BY_KEY:KeyRead( 1, aREQUEST[2][1] ) \n aRESPONSE[2] := oPT_BY_KEY:aOUTPUT\n CASE iSelection = query_PT_WRITE\n oPT_BY_KEY:Write( 1, aREQUEST[2], aREQUEST[2][1][2] )\n CASE iSelection := query_PF_LIST_BY_PT_KEY\n oPF_BY_PT_KEY:Read( 2, aREQUEST[2][1] )\n OTHERWISE\n // error handling required here\n ENDCASE\n IF lVerbose\n ? \"Press [Ctl-C] to quit\"\n ENDIF[/code:3lmlrhmg]\r\n\r\nPretty straight forward. A few words of explanation. TListData:IndexRead() takes the following parameters:\r\niOrder - to set the controlling index\r\nsSearch - the value to seek\r\nbCompare - a code block to evaluate to see if subsequent records match sSearch. \r\n\r\nRegards\r\nxProgrammer",
"time": "00:46",
"topic": "Client Server Database Access the xBase Way",
"username": "xProgrammer"
}
] | Client Server Database Access the xBase Way |
[
{
"date": "2008-08-21",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Doug,\r\n\r\nmany thanks for your explanations, very interesting <!-- s:-) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":-)\" title=\"Smile\" /><!-- s:-) -->",
"time": "07:38",
"topic": "Client Server Database Access the xBase Way",
"username": "Antonio Linares"
}
] | Client Server Database Access the xBase Way |
[
{
"date": "2008-08-21",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Hi Antonio\r\n\r\nThe current code for the server main loop is:\r\n\r\n[code:9m7umqrp] INetInit()\n // listen on port 1800\n pServer := INetServer( 1800 )\n INetSetTimeout( pServer, 500 )\n ? \"Server up and ready for requests\", pServer\n ? \"Press [Ctl-C] to quit\"\n lContinue := .T.\n DO WHILE lContinue\n // wait for incoming connection requests\n pClient := INetAccept( pServer )\n IF INetErrorCode( pServer ) == 0\n // process client request \n // possibly in a future version in a separate thread\n ServeClient( pClient )\n ENDIF\n ENDDO\n // WaitForThreads() would go here in a threded version\n // close socket and cleanup memory\n INetClose( pServer )\n INetCleanup()[/code:9m7umqrp]\r\n\r\nPlease note that this does not use threads so it would be a case of one instance per remote user. Some restructuring of code would be required (I think) for a threaded version.\r\n\r\nThe server now supports returning record numbers and fields from a \"foreign\" file by following a foreign key all just using an extension of the current parameter arrays.\r\n\r\nRegards\r\nxProgrammer",
"time": "12:33",
"topic": "Client Server Database Access the xBase Way",
"username": "xProgrammer"
}
] | Client Server Database Access the xBase Way |
[
{
"date": "2008-08-21",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Hi Antonio\r\n\r\nThis is very much an ongoing exercise. I have simplified the process of executing a query from the client (GUI application) with the following little class TQuery:\r\n\r\n[code:23to7xqx]CLASS TQuery\n\nDATA lSuccess\nDATA aREQUEST\nDATA aTranslated\n\nMETHOD New() CONSTRUCTOR\nMETHOD Execute()\n\nENDCLASS\n\nMETHOD New() CLASS TQuery\n\n::aREQUEST := Array( 2 )\n\nRETURN self\n\nMETHOD Execute( iQuery, aParameters) CLASS TQuery\n\n::aREQUEST[1] := iQuery\n::aREQUEST[2] := aParameters\noSocket:Connect()\noSocket:Send( HB_Serialize( ::aREQUEST) ) \noSocket:Receive()\noSocket:Close()\n::aTranslated := HB_Deserialize( oSocket:cData )\n// For now\n::lSuccess := .T.\n\nRETURN ::lSuccess[/code:23to7xqx]\n\nThis class needs to be extended to handle errors, give an opportunity to retry updates where records are locked etc.\n\nSo now for example to get a list of patients with a given name the application does:\n\n[code:23to7xqx] oQuery:Execute( query_PT_LIST_BY_NAME, { ::sSearch } )\n aSTATUS := oQuery:aTranslated[1]\n aLIST := oQuery:aTranslated[2][/code:23to7xqx]\r\n\r\nA later version should have TQuery:Execute() returning a meaningful status. It should also check that the return value is an array with at least two elements.\r\n\r\nRegards\r\nxProgrammer",
"time": "12:53",
"topic": "Client Server Database Access the xBase Way",
"username": "xProgrammer"
}
] | Client Server Database Access the xBase Way |
[
{
"date": "2008-08-23",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Hi Antonio\r\n\r\nWork on the xBase data server continues. Code is much better organised on the server end with a TServerQueryClass that will be responsible for gathering error information as well as the communication process. Structre is nice and flexible this way so that multiple queries can be handled in the one round trip. Thus, for example, you can not only retrieve the data needed for a particular object you can also get all the options that will be needed to populate list-boxes etc that may be part of the screen. TServerQuery has done away with the DO CASE and is using an array of function pointers. The current code for TServerQuery is:\r\n\r\n[code:2n8ta0ev]\nCLASS TServerQuery\n\nDATA iErrorLevel\nDATA aErrors\nDATA aResponse\nDATA aRequest\n\nMETHOD New()\nMETHOD Request( pClient )\nMETHOD FlagError( iErrorLevel, iErrorNumber )\n\nENDCLASS\n\nMETHOD New()\n\n::aErrors := Array( 0 )\n\nRETURN self\n\nMETHOD Request( pClient ) CLASS TServerQuery\n\nLOCAL cBuffer\nLOCAL nBytes\nLOCAL cData \nLOCAL aOUTPUT := ARRAY( 0 )\nLOCAL aSTATUS := ARRAY( 3 )\n\n\n::iErrorLevel := 0\nASize( ::aErrors, 0 )\n::aResponse := Array( 3 )\n? \"Serving:\", INetAddress( pClient )\ncData := \"\"\nlReceiving := .T.\nINetSetTimeout( pClient, 100 ) \nDO WHILE lReceiving\n cBuffer := Space( 4096 )\n nBytes := INetRecv( pClient, @cBuffer )\n ? \"Bytes received:\", nBytes\n IF nBytes < 1\n lReceiving := .F.\n ELSE\n cData += Left( cBuffer, nBytes )\n ENDIF\nENDDO\n::aREQUEST := HB_Deserialize( cData )\nIF lVerbose\n ? \"Received request number: \", ::aREQUEST[1] \nENDIF\naSTATUS[1] := 0\niSelection := ::aREQUEST[1]\nHB_Exec( aCompiled[iSelection], nil )\n\n\n\n IF lVerbose\n ? \"Press [Ctl-C] to quit\"\n ENDIF\n aSTATUS[1] := ::iErrorLevel\n aSTATUS[2] := 1\n aSTATUS[3] := \"\"\n ::aRESPONSE[1] := aSTATUS\n cData := HB_Serialize( ::aRESPONSE )\n INetSend( pClient, cData )\n\n\nRETURN nil\n\nMETHOD FlagError( iErrorLevel, iErrorNumber ) CLASS TServerQuery\n\n::iErrorLevel := MAX( ::iErrorLevel, iErrorLevel )\nIF PCount() > 1\n AAdd( ::aErrors, iErrorNumber )\nENDIF\n\nRETURN ni\n[/code:2n8ta0ev]\r\n\r\nCode for the individual queries is:\r\n\r\n[code]\r\nFUNCTION GetPatientListByName() \r\n\r\noPT_LIST_BY_NAME:IndexRead( 2, oQuery:aREQUEST[2][1], { | | UPPER( PT_NMFAMLY + PT_NMGIVEN ) } )\r\noQuery:aRESPONSE[2] := oPT_LIST_BY_NAME:aLIST\r\n\r\nRETURN nil\r\n\r\nFUNCTION GetPatientDataByKey()\r\n\r\noPT_BY_KEY:KeyRead( 1, oQuery:aREQUEST[2][1] ) \r\noQuery:aRESPONSE[2] := oPT_BY_KEY:aOUTPUT\r\n\r\nRETURN nil\r\n\r\nFUNCTION WritePatientData()\r\n\r\noPT_BY_KEY:Write( 1, oQuery:aREQUEST[2], oQuery:aREQUEST[2][1][2] )\r\n\r\nRETURN nil\r\n\r\nFUNCTION GetPatientFileListByPatientKey()\r\n\r\noPF_LIST_BY_PT_KEY:IndexRead( 2, oQuery:aREQUEST[2][1], { | | PF_PTKEY } )\r\noQuery:aRESPONSE[2] := oPF_LIST_BY_PT_KEY:aLIST\r\n\r\nRETURN nil\r\n\r\nFUNCTION GetPatientFileDataByKey()\r\n\r\noPF_BY_KEY:KeyRead( 1, oQuery:aREQUEST[2][1] )\r\noQuery:aRESPONSE[2] := oPF_BY_KEY:aOUTPUT\r\noFL_LIST:ReadAll( nil )\r\noQuery:aRESPONSE[3] := oFL_LIST:aLIST\r\n\r\nRETURN nil\r\n\r\nFUNCTION GetFileLocationList()\r\n\r\noFL_LIST:ReadAll( nil )\r\noQuery:aRESPONSE[2] := oFL_LIST:aLIST\r\n\r\nRETURN nil\r\n\r\nFUNCTION WritePatientFileData()\r\n\r\noPF_BY_KEY:Write( 1, oQuery:aREQUEST[2], oQuery:aREQUEST[2][1][2] )\r\n\r\nRETURN nil[code]\r\n\r\nNote that aCompiled is set up as follows:\r\n\r\n [code] PUBLIC aCompiled := Array( 7 )\r\n aCompiled[1] := ( @GetPatientListByName() )\r\n aCompiled[2] := ( @GetPatientDataByKey() )\r\n aCompiled[3] := ( @WritePatientData() )\r\n aCompiled[4] := ( @GetPatientFileListByPatientKey() )\r\n aCompiled[5] := ( @GetPatientFileDataByKey() )\r\n aCompiled[6] := ( @GetFileLocationList() )\r\n aCompiled[7] := ( @WritePatientFileData() ])[/code]\r\n\r\nThe other main piece of setting up the queries is \r\n\r\n[code]\r\n // Patient by Key\r\n oPT_BY_KEY := TSingleData():New( wa_PT_PATIENT, { { \"PT_KEY\", \"sKey\", 0 }, { \"PT_NMFAMLY\", \"sNmFamly\", 0 }, { \"PT_NMGIVEN\", \"sNmGiven\", 0 }, ;\r\n { \"PT_NMOTHER\", \"sNmOther\", 0 }, { \"PT_NMPREV\", \"sNmPrev\", 0 }, { \"PT_NMPREF\", \"sNmPref\", 0 }, { \"PT_NMTITLE\", \"sNmTitle\", 0 }, ;\r\n { \"PT_DOB\", \"sDOB\", 0 }, { \"PT_GENDER\", \"cGender\", 0 }, { \"PT_ADLINE1\", \"sAdLine1\", 0 }, { \"PT_ADLINE2\", \"sAdLine2\", 0 }, ;\r\n { \"PT_ADSUBRB\", \"sAdSubrb\", 0 }, { \"PT_ADSTATE\", \"sAdState\", 0 }, { \"PT_ADPCODE\", \"sAdPCode\", 0 }, { \"PT_ADCNTRY\", \"sAdCntry\", 0 }, ;\r\n { \"PT_PHHOME\", \"sPhHome\", 0 }, { \"PT_PHWORK\", \"sPhWork\", 0 }, { \"PT_PHMOB\", \"sPhMob\", 0 }, { \"PT_PHFAX\", \"sPhFax\", 0 }, ;\r\n { \"PT_EMAIL\", \"sEmail\", 0 }, { \"PT_MEDIC\", \"sMedic\", 0 }, { \"PT_MEDPOS\", \"sMedPos\", 0 }, { \"PT_VETAFF\", \"sVetAff\", 0 }, ;\r\n { \"PT_ACTIVE\", \"cActive\", 0 }, { \"PT_LUBY\", \"sLUBy\", 0 }, { \"PT_LUWHEN\", \"sLUWhen\", 0 }, { \"PT_LUACTN\", \"cLUActn\", 0 } }, ;\r\n 1, \"Patient by Key\" )\r\n\r\n // Patient List by Name\r\n oPT_LIST_BY_NAME := TListData():New( wa_PT_PATIENT, { { \"PT_KEY\", \"sKey\", 0 }, { \"PT_NMFAMLY\", \"sNmFamly\", 0 }, { \"PT_NMGIVEN\", \"sNmGiven\", 0 }, ;\r\n { \"PT_DOB\", \"dDOB\", 0 }, { \"PT_GENDER\", \"cGender\", 0 } }, \"Patient List by Name\" )\r\n\r\n // Patient File List by Patient Key\r\n oPF_LIST_BY_PT_KEY := TListData():New( wa_PF_PATIENTFILE, { { \"PF_KEY\", \"aKey\", 0 }, { \"PF_FLKEY\", \"aFLKey\", 0 }, ;\r\n { \"PF_FLKEY\", \"aFLName\", -2, 2, 1, \"FL_NAME\" }, { \"PF_DTFIRST\", \"aDtFirst\", 0 }, { \"PF_DTLAST\", \"aDtLast\", 0 }, ;\r\n { \"PF_CLOSED\", \"aClosed\", 0 } }, \"Patient File List by Patient Key\")\r\n\r\n // Patient File by Key\r\n oPF_BY_KEY := TSingleData():New( wa_PF_PATIENTFILE, { { \"PF_KEY\", \"sKey\", 0 }, { \"PF_FLKEY\", \"sFLKey\", 0 }, ;\r\n { \"PF_FLKEY\", \"sFLName\", -1, 2, 1, \"FL_NAME\" }, { \"PF_DTFIRST\", \"sDtFirst\", 0 }, { \"PF_DTLAST\", \"sDtLast\", 0 }, ;\r\n { \"PF_CLOSED\", \"cClosed\", 0 }, { \"PF_ACTIVE\", \"cActive\", 0 }, { \"PF_LUBY\", \"sLUBy\", 0 }, { \"PF_LUWHEN\", \"sLUWhen\", 0 }, ;\r\n { \"PF_LUACTN\", \"cLUActn\", 0 } }, 3, \"Patient File by Key\")\r\n // File Location List\r\n oFL_LIST := TListData():New( wa_FL_FILELOCATION, { { \"FL_KEY\", \"aFLKey\", 0 }, { \"FL_NAME\", \"aFLName\", 0 } }, \"File Locations List\" )\r\n[/code]\r\n\r\nNote that these objects may be used by more than 1 query, eg for reading a record and for updating or inserting it.",
"time": "12:03",
"topic": "Client Server Database Access the xBase Way",
"username": "xProgrammer"
}
] | Client Server Database Access the xBase Way |
[
{
"date": "2008-08-23",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Doug,\r\n\r\nVery interesting work, thanks for sharing it <!-- s:-) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":-)\" title=\"Smile\" /><!-- s:-) -->\r\n\r\nHow do you control that the socket connection is active ?",
"time": "12:32",
"topic": "Client Server Database Access the xBase Way",
"username": "Antonio Linares"
}
] | Client Server Database Access the xBase Way |
[
{
"date": "2008-08-23",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Hi Antonio\r\n\r\nThe data base back end server runs the following loop to see if there is an incoming request:\r\n\r\n[code:2uu4cias] ?\n ? \"Setting up sockets\"\n INetInit()\n // listen on port 1800\n pServer := INetServer( 1800 )\n INetSetTimeout( pServer, 500 )\n ? \"Server up and ready for requests\", pServer\n ? \"Press [Ctl-C] to quit\"\n lContinue := .T.\n DO WHILE lContinue\n // wait for incoming connection requests\n pClient := INetAccept( pServer )\n IF INetErrorCode( pServer ) == 0\n // process client request \n // possibly in a future version in a separate thread\n //ServeClient( pClient )\n oQuery:Request( pClient )\n ENDIF\n ENDDO\n // WaitForThreads() would go here in a threaded version\n // close socket and cleanup memory\n INetClose( pServer )\n INetCleanup()\nRETURN[/code:2uu4cias]\r\n\r\nCurrently there is no exit from the loop. I would have coded in {Ctl-C] as an exit with an InKey() function call but [Ctl-C] terminates the application without Inkey() returning anyhow as a text based application under Linux. I don't know if that might cause longer term issues. Maybe I should code in an alternative?\r\n\r\nRegards\r\nDoug\r\n(xProgrammer)",
"time": "23:55",
"topic": "Client Server Database Access the xBase Way",
"username": "xProgrammer"
}
] | Client Server Database Access the xBase Way |
[
{
"date": "2008-08-24",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Hey Doug,\r\n\r\nIs this not what LetoDB does?\r\n\r\nPatrick",
"time": "11:08",
"topic": "Client Server Database Access the xBase Way",
"username": "Patrick Mast"
}
] | Client Server Database Access the xBase Way |
[
{
"date": "2008-08-24",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Hi Patrick\r\n\r\nThanks for your interest. I don't profess to know that much about letoDB - indeed I really only became aware of this when Antonio responded to my first posting in this thread. I did look at it briefly and my impression was\r\n\r\n1. that it was written in C and therefore much harder for me to understand / modify whatever, whereas I felt I could do it all in (x)Harbour - and now have pretty much proved that.\r\n\r\n2. that it passed data by position which I don't like and didn't fit as well into my architecture as I would have liked. Getting back an array which can be used to update all data properties of a class in a single call is pretty magical!\r\n\r\nI use FiveLinux because of the level of support that Antonio provides - I wouldn't expect the same of letoDB. Just getting letoDB working and modifying it to suit me would probably take more time than writing what I have.\r\n\r\nI may well be misguided in the above judgments, but that is why I have done what I have done.\r\n\r\nI also want to be able to run the application in a local mode. I should be able to simply set a flag so that the communication via sockets is disabled and both components are handled by the one executable. (Of course you could always have both client and server on the one machine but why not just enable stitching them together.)\r\n\r\nOne side benefit of what I have done is it has provided the trigger for developing generic code for doing data lookups in various ways. And of course this way the data layer is much more OO style than is possible with anything based on SQL.\r\n\r\nRegards\r\nDoug",
"time": "13:28",
"topic": "Client Server Database Access the xBase Way",
"username": "xProgrammer"
}
] | Client Server Database Access the xBase Way |
[
{
"date": "2008-08-24",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Hey Doug,\r\n\r\nOk! It's good to see this being done in pure [x]Harbour code yes. So, please go ahead and show us all what [x]Harbour is capable of doing.\r\n\r\nGraet job!\r\n\r\nPatrick",
"time": "13:44",
"topic": "Client Server Database Access the xBase Way",
"username": "Patrick Mast"
}
] | Client Server Database Access the xBase Way |
[
{
"date": "2008-08-24",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Hi Patrick\r\n\r\nThanks for your comments. I have found this to be quite an exciting project. I just wish I could work on it full-time. But the progress has been very pleasing. Across my VPN I am seeing something like a 30 fold speed increase for queries involving fairly sizable lists. The code has been basically \"functional\" for a few days now but I keep adding little features and I need to do more on error handling, retries etc. And I have been restructuring it so its easier to support many different queries and queries of different types. I do have to add support for inserts - but that's really only a matter of porting my primary key allocation code as I am already handling updates just fine. All without a single line of C. I have found xHarbour to be a great development environment.\r\n\r\nRegards\r\nDoug\r\nxProgrammer",
"time": "13:58",
"topic": "Client Server Database Access the xBase Way",
"username": "xProgrammer"
}
] | Client Server Database Access the xBase Way |
[
{
"date": "2009-04-27",
"forum": "FiveWin for Harbour/xHarbour",
"text": "First of all, many regards to all old friends! \nI \"know\" many of you since the FW version 1.92 \nI'we been too bussy and didn't visit forums much... Such is life.\nBut, it's nice to \"see\" old faces here again <!-- s:) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":)\" title=\"Smile\" /><!-- s:) -->\nI hope you're all up and running <!-- s:) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":)\" title=\"Smile\" /><!-- s:) -->\n\nNow, about some interesting issue Doug started:\n(I spoted this issue today and am sorry I didn't find it eralier..)\n\nHello Doug,\n\nA very interesting work.\nIt does almost exactly what I am doing for years by now. And I have no time to make it more widely usefull in all my later apps. But what I have done 5 years ago works up to now perfectly. And all written in xHArbour/Fivewin (Server) and xHArbour/Fivewin on client side. It is a part of one of my apps - a Payroll software.\nWe should really expand this kind of functionality\nUsing Sockets.\n\nLet me explain.\n\n1. We have clients which pays us every year the certain license fee. Each client has his data written in a Hardware dongle, the identification data is a number ID.\n\n2. On our company server, we have a complete database system which we use to control the clients (add a new, change the data for the existing clients, change the number of Employees allowed for each, change the licenses expiration dates and many other elements...\nAlso on the server, the xHarbour/Fivewin program is running all the time 24/7, listening to defined port. The small dialog shows the status and if administrator wants to check, he can see messages about who is connecting and when. Also we have a log system which is writen into DBF on server, we review later.\n\n3. The client has a menu option where they can for example \"Update their license\".\nThe clients program take the data from a Dongle, construct the string which contains all necessary data and send it automaticaly through the defined port, to the company server, wehere we have a xHarbour program listening on the same port number. There we can define the license expiration date and some other data for exact client.\n\n4. When the request come to the defined port on the server side, the server side program check the string and check the validity of the client ID (does it exists at all). Then it checks into the databases the validity of the request (is client active for example) and then takes the license expiration date from the DBF, among some other data. Send it back to the Client.\nIf the client paid for his license update, the server program also extends the expiration date to the given period (1 year in our case) If the cient didn't paid for his update, the apropriate message is sent back to them.\nAt the same the log is appended to the DBF and we can later see who and when tconnected, also seen unsuccessfull logs etc..\n\n5. The client program reads what came from server and if there is no error and all data valid, the new expiration date is written into the DOngle and from then on the client has updated his license automaticaly.\n\nThis is simplified scenario.\nAfter all these years I decided to rewrite our WebPayrol application to use this kind of logic and have client nicely work in a perfect Fivewin environment (with all whistless and bells) at the same time connection to the server will be done per request where the server program will maintain the data and send them back to the client....\nMuch nicer than any WEB aplication...\n\nThere is much we can do using socket, indeed... Doug is absolutelly right. This way I can avoid having SQL of any kind and no additional programs (servers) installed.\nWe have a few hundred clients which contact our server very often from all parts of USA and we never had any problem because of their concurent accesing the server program\n\nRegards\nBoris\nBelgrade, Serbia",
"time": "21:05",
"topic": "Client Server Database Access the xBase Way",
"username": "codemaker"
}
] | Client Server Database Access the xBase Way |
[
{
"date": "2009-04-28",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Hello Boris\n\nGreetings from Australia. Very pleased to read your comments. Code has been working reliably for me for many months now. My server and clients are all Linux but recently I needed to be able to access some data generated and stored on a Windows PC and I could use almost exactly the same code recompiled for Windows.\n\nTo date I have avoided using threads. I only have a need for 10 clients at present so I have 10 copies of the server software running each listening on a separate port. Not the most elegant solution but it got me up running fast and has been 100 per cent reliable. Expanding functionality of my software has taken precedence over learning to write threaded code.\n\nIf people are interested I am happy to share what I have learned to date.\n\nRegards\n\nDoug (xProgrammer)",
"time": "13:07",
"topic": "Client Server Database Access the xBase Way",
"username": "xProgrammer"
}
] | Client Server Database Access the xBase Way |
[
{
"date": "2009-04-28",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Hi Doug,\n\nJust a question, why are you using 10 separate EXEs listening to a different ports?\nAny specific reason for that?\n\nI have only one EXE running on server, listening to one port.\nAll clients (a few hundreds) send requests to this one port. All these years we didn't encounter any problem with such approach.\nAll clients have different ID which is transfered to this server EXE (among a bunch of other data) and the EXE properly opens the needed data to allow client to expand their license key...\n\nOne thing I have to check.\nThe time which passes after the client issues the request for license extension.\nAfter they do this, the prorgam opens the connection to some IP address and to a specific port.\nThen, the EXE on server does the job very fast and returns the needed information back.\nThis time is not a \"lighten\" speed and I am not sure how will this reflect to a WEB application which I intend to design, using the port aproach this time (instead a regular HTTP requests, as it works now)\nEach license updating process lasts about 10-15 seconds which seams to be unacceptable for WEB aplication to change data, I am affraid...\nI realised that the most of this time is spent on connection to server through the gioven port number...\nI don't know if this connection time can be shortened somehow..\n\nRegards\nBoris",
"time": "16:27",
"topic": "Client Server Database Access the xBase Way",
"username": "codemaker"
}
] | Client Server Database Access the xBase Way |
[
{
"date": "2009-04-28",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Hi Boris\n\nYes, I am currently running 10 copies of my executable on the server each listening on a different port. I know its not very elegant and is not extremely scalable but I wanted to get up and running and it works. Threaded code would be the answer and indeed the code is designed to go threaded but I haven't had the time to learn how to write threaded code and test it for reliability. The response time is excellent, miniscule on the server, the only delay being on the client end ensuring that the servers response has been received completely. That is set to around 0.5 seconds which isn't an issue. (there may well be a more elegant and efficient solutoin here too - currently looping with a timeout) The reason for multiple copies of the server code is that I wanted to be certain that there was no problem with two clients making a request of the server simultaneously. Having said that whilst testing in development stage I didn't actually simulate a problem with two clients accessing a single server code. Hopefully one day I will get the time to play with threaded code and write a better server. My server has no GUI, it just outputs text to the console and is OS agnostic - ie the same code runs under Linux and Windows. To compile under Windows I just have to change the source to have CR-LF's.\n\nWhen I get a chance I'll put up some of my code and maybe we and others can discuss improving and / or generalising it.\n\nRegards\n\nDoug (xProgrammer)",
"time": "22:32",
"topic": "Client Server Database Access the xBase Way",
"username": "xProgrammer"
}
] | Client Server Database Access the xBase Way |
[
{
"date": "2009-04-29",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Hi all\n\nI just thought I should add that this technique can be used for many different purposes other than just database access. Pretty much anytime you want a process performed on another computer (or the same computer for that matter) with (optionally) information returned to the originating computer. And it can be between different operating systems.\n\nxProgrammer",
"time": "10:12",
"topic": "Client Server Database Access the xBase Way",
"username": "xProgrammer"
}
] | Client Server Database Access the xBase Way |
[
{
"date": "2009-04-30",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Hi Doug\n[quote:15lxc6oz]If people are interested I am happy to share what I have learned to date.[/quote:15lxc6oz] \n\nI am very interested in this thread. I find interesting and i would like to learn on the topic. Can you send me some funtional example of connection and the way of processing the petitions? Some contact email to speak ?\n\nRegards.\nC.",
"time": "07:18",
"topic": "Client Server Database Access the xBase Way",
"username": "Carles"
}
] | Client Server Database Access the xBase Way |
[
{
"date": "2009-05-11",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Hi Carles\n\nI have meant to post a reply here for many days now but have been very busy with upgrades, visitors etc. I want to reuse this technique for another project and will post here shortly, probably in a new thread. Sorry its taking so long but I want to review and possibly neaten up my code.\n\nRegards\nDoug",
"time": "14:12",
"topic": "Client Server Database Access the xBase Way",
"username": "xProgrammer"
}
] | Client Server Database Access the xBase Way |
[
{
"date": "2012-05-09",
"forum": "FiveWin for Harbour/xHarbour",
"text": "For many years I have been using ADS with my application, and I really didn't intend to change. I have been a reseller, and each year I have sold several licenses. Last year I apparently did not sell enough, and I'm not willing to pay an \"annual fee\", so I'm likely needing an alternative.\n\nCurrently my application is written with xHarbour ( .com ), using the ADS drivers, and FWH. I do want to stay with DBF's. At this point, converting all of my clients to another data format, and rewritting the application, is just not reasonable.\n\nMy clients usually have 2 to 5 workstations, but some may have 10 to 20.\n\n1) Using DBFCDX is fine for small peer to peer operations, but how stable is it for larger systems ( and what is the reasonable limit ?)\n2) Are there reliable alternatives for DBF Client Server ?\n\nPlease don't suggest Terminal Services. That is not an alternative at this time.\n\nOther input would be appreciated. Thanks.\n\nTim",
"time": "18:39",
"topic": "Client Server options",
"username": "TimStone"
}
] | Client Server options |
[
{
"date": "2012-05-09",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Tim\n\nI have used ADS for many years while I was in State government, however I was persuaded to re-write my applications to run on Sql Server and I have never looked back.\n\n<!-- m --><a class=\"postlink\" href=\"http://fivetechsoft.com/wiki/doku.php?id=ado-related_stuffs&rev=1216796127\">http://fivetechsoft.com/wiki/doku.php?i ... 1216796127</a><!-- m -->\n\nI know that is not the answer you are looking for, but Microsoft has for the past few years offered ( free ) Sql Server Express which would be ideal for 10-20 people running on a dedicated server.\n\n<!-- m --><a class=\"postlink\" href=\"http://www.microsoft.com/sqlserver/en/us/editions/2012-editions/express.aspx\">http://www.microsoft.com/sqlserver/en/u ... press.aspx</a><!-- m -->\n\nAbove is the link to the MS Sql Express website and the Express database is absolutely free to use... but you will need to re-write all your database calls using ADO ( sqloledb ). Another nice 'gift' MS has provided is there is no need to install a SQL client as it comes standard on all versions of Windows at least through Windows 8.\n\nI will mention, that Microsoft has stated it may phase out or 'diminish' the ADO client after Windows 8, using instead ODBC which I think is a step backward <!-- s:( --><img src=\"{SMILIES_PATH}/icon_sad.gif\" alt=\":(\" title=\"Sad\" /><!-- s:( --> <!-- s:( --><img src=\"{SMILIES_PATH}/icon_sad.gif\" alt=\":(\" title=\"Sad\" /><!-- s:( --> , in favor of its dot net framework.\n\nFor now, if it were me, I would stay with ADS ... ADO is very similar to the tData class you are already using so the concept of using classes and methods for data manipulation should already be very familiar to you if you want to make the switch.\n\nRick Lipkin",
"time": "20:37",
"topic": "Client Server options",
"username": "Rick Lipkin"
}
] | Client Server options |
[
{
"date": "2012-05-09",
"forum": "FiveWin for Harbour/xHarbour",
"text": "> Please don't suggest Terminal Services. That is not an alternative at this time.\n\nHello Tim,\n\nalthough you want here it I think it is the way to go. Why don’t you consider using TS.\n\nBest regards,\nOtto",
"time": "21:23",
"topic": "Client Server options",
"username": "Otto"
}
] | Client Server options |
[
{
"date": "2012-05-09",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Otto\n\nIf I recall from my MS System Administrator days .. you need to buy Microsoft TS licenses to run on your server for the number of clients you intend to connect ??\n\nRick Lipkin",
"time": "21:33",
"topic": "Client Server options",
"username": "Rick Lipkin"
}
] | Client Server options |
[
{
"date": "2012-05-09",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Yes, you do need licenses for TS and it does not solve the Client/Server vs direct data issues.\nI have 40+ users using direct/non client server data. It works pretty well except sometimes you have to reindex. When you have 40+ users, each one responsible for updating the index, you will eventually have a problem with a computer or network connection failure that breaks the index.\n\nYou might look at Apollo and it does have an RDD in xHarbour Commercial. Apollo was written by the original Six driver author. I have not used it so I can't comment on it.\n[url:86u9a4ps]http://www.apollodb.com/apollo_server.asp[/url:86u9a4ps]",
"time": "22:24",
"topic": "Client Server options",
"username": "Gale FORd"
}
] | Client Server options |
[
{
"date": "2012-05-09",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Hello Gale,\nhow does a \" computer or network connection failure \" effect a program running in a RemoteDesktop session.\nYou reconnect and you are exactly at the same state as before the failure.\n\n\nBest regards,\nOtto",
"time": "22:42",
"topic": "Client Server options",
"username": "Otto"
}
] | Client Server options |
[
{
"date": "2012-05-09",
"forum": "FiveWin for Harbour/xHarbour",
"text": "OK ... Here are my thoughts on all of these viewpoints:\n\n1) ADS may not be a future option if I can't sell the software. Such a move signals to me that some people \"in charge\" are making changes in their plans, which might include dumping the ADS division ( its now owned by a much larger company with other interests ).\n\n2) Rich, I do understand the idea of a move to SQL. I actually considered it for my next version since I already have it in play for anything developed with Microsoft tools. I did some research last week to see if I could find a program to convert .dbf to current SQL files, and I hit a dead end. In years past, that was available, but it doesn't appear there is anything current. Also, if I move to SQL, I have to manually go to every user and perform the importing of data from their old system to the new one. Also, I have avoided SQL because in the past, there was huge bloat, and I found the size of the database was about 6 times that of a DBF. I'm not opposed to using SQL ( and it actually could resolve some other issues ), but the data conversion is my main issue.\n\n3) Otto, my clients use a lot of programs, and they simply don't take the time to understand their systems. Connectivity issues cause them stress, but it happens, then I have to clean it up. I'm thinking I don't want to open up the whole new avenue of Terminal Services.\n\n4) I did consider Apollo in the early days, but they were mired in indecision about what they were going to do. I don't hear much about them any longer.\n\nTim",
"time": "22:42",
"topic": "Client Server options",
"username": "TimStone"
}
] | Client Server options |
[
{
"date": "2012-05-09",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Otto,\nI think we are talking about 2 different things here. Client Server vs Direct is one issue with TS vs Lan another.\nUsing Direct dbf access, each user is responsible for updating the index regardless if they are on TS or local lan. \nIn TS if a session is terminated (I do not mean disconnected), a session locks up, a TS server computer failure, network failure (on TS Server), you have the possibility of an index issue.",
"time": "23:36",
"topic": "Client Server options",
"username": "Gale FORd"
}
] | Client Server options |
[
{
"date": "2012-05-10",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Tim , are you see Tdolphin from daniel?",
"time": "02:35",
"topic": "Client Server options",
"username": "norberto"
}
] | Client Server options |
[
{
"date": "2012-05-10",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Dear Tim,\n\nJust my 2cents..\n\nIf you have the budget, Stay with ADS.. the server/local are both stable and very easy to administer and in such a tiny footprint works great with [x]Harbour too.\n\nIf you want it free, like most of us, prepare for the future by converting .dbf to mysql or similar.. change coding to SQL..\nAt least on my side, I already started some transitions.. it is inevitable. \n\nThere is no gentle dentist..",
"time": "03:19",
"topic": "Client Server options",
"username": "fraxzi"
}
] | Client Server options |
[
{
"date": "2012-05-10",
"forum": "FiveWin for Harbour/xHarbour",
"text": "take a look LetoDb:\n<!-- m --><a class=\"postlink\" href=\"http://sourceforge.net/projects/letodb/\">http://sourceforge.net/projects/letodb/</a><!-- m -->\n<!-- m --><a class=\"postlink\" href=\"http://www.pctoledo.com.br/forum/viewtopic.php?f=42&t=8167\">http://www.pctoledo.com.br/forum/viewto ... =42&t=8167</a><!-- m -->\n<!-- m --><a class=\"postlink\" href=\"http://itamarlins.blogspot.com.br/2010/02/letodb-e-viael.html\">http://itamarlins.blogspot.com.br/2010/ ... viael.html</a><!-- m -->",
"time": "04:35",
"topic": "Client Server options",
"username": "sygecom"
}
] | Client Server options |
[
{
"date": "2012-05-10",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Gale, \n>It works pretty well except sometimes you have to reindex. \nI reindex directly from server (connected in TS) \nIt's 10 times faster than from a client\n\n>When you have 40+ users, each one responsible for updating the index, you will eventually have a >problem with a computer or network connection failure that breaks the index.\n\nthese problems happen very rarely, if network devices are certified\nhappened with the old clipper + blinker over coaxial cables and Netware\n\nIt would be nice an engine light and free\n\nBut Just a question to Tim: is it true that ADS only write and read is directly from client?",
"time": "08:07",
"topic": "Client Server options",
"username": "MarcoBoschi"
}
] | Client Server options |
[
{
"date": "2012-05-10",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Norberto,\n\nthank you for your post.\n\nI will check your concerns about TS. \n\nFirst I would like to tell you that some years ago I converted all my programs to VB.net, SQL and some to keep it compatible with dbf to \nApollo. To use Apollo from VB is very similar to CLIPPER code. But the database is not as complete as the build in CDX and as far as I know no longer in development. The new product is VISTA DB.\n\nBut I am happy to be back with all my programs to FIVEWIN, (x)Harbour and DBF.\n\nSecond my programs are for small companies. \nThe profession “SQL Administrator” is for me warning enough. I never ever heard of a DBF-Administrator as a profession.\nIf you need a professional to set up a SQL server it is complicated for my purpose and it was (SQL 2000, SQL 2003, SQL ...). \n\n[quote:ms4zj3ri]I think we are talking about 2 different things here. Client Server vs Direct is one issue with TS vs Lan another.\nUsing Direct dbf access, each user is responsible for updating the index regardless if they are on TS or local lan.[/quote:ms4zj3ri]\nIf you assume that the coding is done well this should not be a problem in any case.\n\nI will simulate this situations later and let you know what happen.\n-In TS if a session is terminated (I do not mean disconnected), a session locks up,\n-a TS server computer failure,\n-network failure (on TS Server), you have the possibility of an index issue.\n\n--------------------------------------\n\nAnd if you need remote access over Internet I made the expiriences that client/server is not as stable as TS and not as fast.\nTo send the changes of the screens is faster than the data.\nNext\nRemote Access Protocol and technique are developing very fast fastest of all.\n\nYou are device (Apple, Linux, Android, … ) independent.\n\n\nBest regards,\nOtto",
"time": "11:40",
"topic": "Client Server options",
"username": "Otto"
}
] | Client Server options |
[
{
"date": "2012-05-10",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Hello Tim,\n\n[quote:3qmsbf20]3) Otto, my clients use a lot of programs, and they simply don't take the time to understand their systems. Connectivity issues cause them stress, but it happens, then I have to clean it up. I'm thinking I don't want to open up the whole new avenue of Terminal Services.\n[/quote:3qmsbf20]\nHave you seen and tried our RDP-Manager we posted on this forum.\n\n>Connectivity issues cause them stress, but it happens\nIf this happens the result is the same if you have a CLIENT/SERVER solution or if you work remote.\n\nIf you have RDP you can take another device and run the application from there.\n\n\n\nBest regards,\nOtto\n\nBTW, have you ever tried my AutoCode editor?",
"time": "11:48",
"topic": "Client Server options",
"username": "Otto"
}
] | Client Server options |
[
{
"date": "2012-05-10",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Otto,\nThanks for the interest. I still think TS/Citrix is a good way to provide remote operations. We use it in my company also. \nYou can still have TS/Citrix and Client Server at the same time. That is my point, it is 2 different things.\n\nWhen you get a lot of people browsing and updating the data at the same time in direct access mode, there is a tremendous amount of file locks on the index file (.cdx). Every time you perform a skip with an active index it has to lock the entire index file before it completes the skip. The more users you have the longer it takes to resolve the contentions. This increases the time window when a problem with a computer or TS session could affect the update of the index.\nWhen it is completely client server it does not have to do this.",
"time": "15:56",
"topic": "Client Server options",
"username": "Gale FORd"
}
] | Client Server options |
[
{
"date": "2012-05-10",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Lots of good input here. I appreciate all the comments.\n\nFor now ( the next year ) I have been able to resolve the issue involving ADS. That gives me some time to work out alternatives. For now, I have code developed over many years ( updated and refined of course ) that I want to continue to offer in the marketplace. Because it uses ADS for multi-user, thats a good way to keep it.\n\nThere is a \"new game in Town\" called oData. It promises to change everything, and Microsoft has embraced it in a big way, making it integral to their new tool versions! \n\nI still have one open question. Does anyone know of a program that can take current .dbf files and create a Datebase in SQL and import those existing files as tables ? There were some in the past for older versions of SQL, but I have not seen anything on the current versions.\n\nTim",
"time": "17:34",
"topic": "Client Server options",
"username": "TimStone"
}
] | Client Server options |
[
{
"date": "2012-05-10",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Tim:\n\n[quote:3j41a7cn]\nI still have one open question. Does anyone know of a program that can take current .dbf files and create a Datebase in SQL and import those existing files as tables ?\n[/quote:3j41a7cn]\nSearch for dbf2sql\n\nRegards",
"time": "17:40",
"topic": "Client Server options",
"username": "Armando"
}
] | Client Server options |
[
{
"date": "2012-05-10",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Hello Tim,\n\nBTW, have you ever tried my AutoCode editor?\n\nBest regards,\nOtto",
"time": "20:05",
"topic": "Client Server options",
"username": "Otto"
}
] | Client Server options |
[
{
"date": "2012-05-10",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Otto,\n\nNot yet ... but I have been following the thread on it. \n\nI think I'm swimming in a sea of \"ToDo\" tasks, and there are sharks out here !\n\nTim",
"time": "20:26",
"topic": "Client Server options",
"username": "TimStone"
}
] | Client Server options |
[
{
"date": "2012-05-10",
"forum": "FiveWin for Harbour/xHarbour",
"text": "HEllo Tim,\n\nthank you for your answer. \nPresent demo expires by 30 April you have to download the new demo which is extended till 31 May.\nAdded syntax for METROPANEL and METROBUTTON.\n\n[url:142j28os]http://www.atzwanger-software.com/fw/ACD5DEMO.Zip[/url:142j28os]\n\nBest regards,\nOtto",
"time": "20:38",
"topic": "Client Server options",
"username": "Otto"
}
] | Client Server options |
[
{
"date": "2012-05-11",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Tim: this is that you are looking for\n<!-- m --><a class=\"postlink\" href=\"http://www.easyfrom.net\">http://www.easyfrom.net</a><!-- m -->\n\nBest regards Ruben Fernandez\n(sorry for my English)",
"time": "05:59",
"topic": "Client Server options",
"username": "RuFerSo"
}
] | Client Server options |
[
{
"date": "2012-05-12",
"forum": "FiveWin for Harbour/xHarbour",
"text": "[quote=\"Armando\":318klmsp]Tim:\n\n[quote:318klmsp]\nI still have one open question. Does anyone know of a program that can take current .dbf files and create a Datebase in SQL and import those existing files as tables ?\n[/quote:318klmsp]\nSearch for dbf2sql\n\nRegards[/quote:318klmsp]\n\nTim,\n\nYou can download at <!-- m --><a class=\"postlink\" href=\"http://www.tkinformidia.net/dbf2sql-3.0.zip\">http://www.tkinformidia.net/dbf2sql-3.0.zip</a><!-- m -->. It iport DBFs into MySQL or PostgreSQL databases.",
"time": "15:11",
"topic": "Client Server options",
"username": "Kleyber"
}
] | Client Server options |
[
{
"date": "2012-05-12",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Tim\n\nI do not think it is a good idea to import automatically dbf to sql , Table creation is fairly easy in sql and doing this will allow probably to review tables, set the primary key etc...\n\nI have converted part of our dbfs to sql , it was straight and easy, here is a sample of a table creation, you will see it is not complicated. In order to load dbfs into sql tables i use php generated directly from my fivewin programs.\n\nIf you need help, let me know . \nBelow is a sample of a table creation\n\nHth\n\nRichard\n\n[code=fw:3kzmevv6]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br />CREATE TABLE prospect <br /><span style=\"color: #000000;\">(</span><br /> idprospect INT AUTO_INCREMENT, <br /> nom varchar<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">40</span><span style=\"color: #000000;\">)</span>,<br /> prenom varchar<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">20</span><span style=\"color: #000000;\">)</span>,<br /> email varchar<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">80</span><span style=\"color: #000000;\">)</span>,<br /> tel varchar<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">10</span><span style=\"color: #000000;\">)</span>,<br /> fax varchar<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">10</span><span style=\"color: #000000;\">)</span>, <br /> mobile varchar<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">10</span><span style=\"color: #000000;\">)</span>,<br /> adresse varchar<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">40</span><span style=\"color: #000000;\">)</span>, <br /> adresse2 varchar<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">40</span><span style=\"color: #000000;\">)</span>, <br /> postal varchar<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">05</span><span style=\"color: #000000;\">)</span>,<br />ville varchar<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">40</span><span style=\"color: #000000;\">)</span>, <br />logiciel INT<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">02</span><span style=\"color: #000000;\">)</span>, <br />tlogiciel varchar<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">12</span><span style=\"color: #000000;\">)</span>, <br />origine varchar<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">01</span><span style=\"color: #000000;\">)</span>, <br />datecreation DATETIME, <br />comment <span style=\"color: #0000ff;\">text</span>,<br />PRIMARY KEY <span style=\"color: #000000;\">(</span>idprospect<span style=\"color: #000000;\">)</span> <br /> <span style=\"color: #000000;\">)</span>;<br /><br /> </div>[/code:3kzmevv6]",
"time": "16:29",
"topic": "Client Server options",
"username": "Richard Chidiak"
}
] | Client Server options |
[
{
"date": "2012-05-12",
"forum": "FiveWin for Harbour/xHarbour",
"text": "I've read this topic and got a question. \nHow can we make the code that use several database such as DBF/MySql/MS-SQL without code modification?\nWe will void the problem, If we can select the Database Driver and all code will support it.\n\nAnyway, I've been coding with DBFCDX for many years and got some problem.\nIt is not only point of index problem for file sharing but it is the weak point of large table also. I heard many gossip from my competition's sales that my program is really old fashion and some of IT guys said my program cannot handle the big database and stable for 50 workstations. It is suitable for 3-5 workstation. It is an idea from whom has not seen the program yet and customer will not look for us anymore (if they trust is voice).\n\nI think the database is not the direct point of the problem. You must see the feature, coding (how much bug) and the error handle. If you program has not a problem with database but the feature are so boring and not useful. What is your choice? BUT IF THE CUSTOMER don't see the demonstration of my program because they heard my program is old fashion and not client-server. IT IS MORE IMPORTANT. \n\nNow I use ADS for a year but the weak point is not free and big cost for a big site also. Free MS-SQL Express/MySql is a good choice also, if we can make the same code with all compatible with the ADS too.\n\nMy idea and thanks for read.\nDutch",
"time": "23:55",
"topic": "Client Server options",
"username": "dutch"
}
] | Client Server options |
[
{
"date": "2012-05-14",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Dutch\n\nADS makes a SQLOLEDB client that will accept all the ADO code you use to be able to connect to any RDBS be it Sql Server, Oracle, dB2, MS Access.\n\n<!-- m --><a class=\"postlink\" href=\"http://www.connectionstrings.com/sybase-advantage\">http://www.connectionstrings.com/sybase-advantage</a><!-- m -->\n\n[code=fw:2vzhzb9p]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br />Provider=Advantage OLE DB Provider;User <span style=\"color: #0000ff;\">ID</span>=adssys;Data Source=MyDataDictionaryPath;Advantage <span style=\"color: #00C800;\">Server</span> Type=ADS_REMOTE_SERVER;<br /> </div>[/code:2vzhzb9p]\n\nAll you have to do is to change your connection string to match your Database .. ADO is a standard MS class and you can tap into that with Harbour and xHarbour.\n\n<!-- m --><a class=\"postlink\" href=\"http://wiki.fivetechsoft.com/doku.php?id=ado-related_stuffs\">http://wiki.fivetechsoft.com/doku.php?i ... ted_stuffs</a><!-- m -->\n\nRick Lipkin",
"time": "13:44",
"topic": "Client Server options",
"username": "Rick Lipkin"
}
] | Client Server options |
[
{
"date": "2012-05-22",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Hi, Tim;\n\nToo bad I was away and did not see this thread before.\n\n#1. I don't think you could ever have an issue with the re-seller license for ADS in North America. That's a very solvable problem. \n\n#2. Sybase -now SAP would be crazy to kill the golden egg chicken. You have no idea how profitable ADS division is.\n\n#3. No remote connection will give you triggers, FIPS compliant encryption, data security (no need to share or expose a directory to users), extended field types, event messaging, oData exposure, and the list goes on and on. Whenever you hear people compare ADS client-server technology to remote apps, they just don't understand the advantages of using triggers, RI rules, field constraints....\n\n#4. ADS can actually help you learn and eventually master SQL just as you now master ISAM -one step at a time, and without totally stoping your dev cycle.\n\nJust my 4 cents.\n\nBTW- you should make plans to come to the next ADS Summit at Boise. I guarantee you will never regret it. I encourage any N. America harbour developer to come. It is well worth your time.\n\n\nReinaldo.",
"time": "23:25",
"topic": "Client Server options",
"username": "reinaldocrespo"
}
] | Client Server options |
[
{
"date": "2012-05-22",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Renaldo,\n\nI wanted to stay with ADS but they were not thinking well. They finally decided to \"extend\" me for one more year. In that time I will be releasing a new update that expands my marketplace at least 10 fold, and that should make sales of their product take off.\n\nTim",
"time": "23:33",
"topic": "Client Server options",
"username": "TimStone"
}
] | Client Server options |
[
{
"date": "2012-05-22",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Reinaldo,\nmaybe I miss something. \n1. Can you please tell me why I should share or expose a directory to users using RDP.\n\n2. I can't imagine how client server could be more stable as working locally (RDP) on the server if you use a WLAN connection and for example a mobile device like a PDA.\n3. How could the transfer of data ever be as quick as sending only the changed pixels of the screen?\nBest regards,\nOtto",
"time": "23:49",
"topic": "Client Server options",
"username": "Otto"
}
] | Client Server options |
[
{
"date": "2012-05-23",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Otto;\n\nYou are missing the point by so much, it ain't worth explaining.\n\nGo work with SQL for a few years. Then come back and we'll talk about it.\n\n\n\nReinaldo.",
"time": "00:58",
"topic": "Client Server options",
"username": "reinaldocrespo"
}
] | Client Server options |
[
{
"date": "2012-05-23",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Reinaldo,\nPlease excuse but I mend with missing in case of RDP. \nSure I know SQL. I have worked with SQL server for years. And I also tried ADS myself. And I think I also saw your video on the ADS homepage.\nI don’t know how big the networks of Tim’s customers base are. I felt that his customers are like mines small companies. Therefore I suggested RDP as a solution for him.\nIt is now nearly over a year that I made my decision to go with my installations the RDP way and there are still questions I have how to organize best the workflow.\nBut times are changing and for my business ( up to 5 concurrent users) RDP offers a very good solution.\nRDP advances rapidly. And Windows Server 2012 offers much more possibilities.\n\nI post here a part from a paper which encourage me and confirmed my resolution:\n\nYou are aware of the limitations of DBFCDX in multi user environment. They are required to provide applications to be used by more clients and also over internet. That is the reason to look for alternatives.\n\nUpto 5/6 users DBFCDX is okay. Actually this limit depends on how data intensive and how large are the data tables.\n\nIn my view this should not affect WinHotel because the size of DBFs is small and most importantly you are relying more on remote desktop. Performance penalties are very minimum. DBFCDX should serve the purpose with adequate dependability.\n\nQuick review of other alternatives:\n\n1. ADS. This is costly. Some of our developers are taking ADS partnership and selling ADS along with their application. They get price of application as well as margin from ADS for sale of ADS products.\n\n PROS: Rock solid. No index maintenance is needed. Takes full advantage of both ISAM (for browses) and porting legacy code and at the same time SQL of RDMS with the great power for complex queries. Calculations are done on the server and only summary comes to server reducing network traffic and also highly improves speeds. \n Free from the limitations of DBFCDX, importantly size. Better performance with more concurrent users and larger tables.\n CONS: Cost\n Porting problems from legacy ciode ( few but there are issues)\n To take full advantage of SQL we need to recode.\n\n2. SQL/RDMS like MySql or its replacements\n PROS: FREE\n Rock solid databases and limited or no maintenance like ADS \n Good performace with unlimited concurrent connections and with very large tables\n Advantage of using SQL for complex queries / jobs\n CONS Time taken to port the legacy code\n Change from RDD kind of programming\n\nMy Opinion:\nConverting WinHotel to any other RDBMS is now a very big task. Conversion times will be very high/\nConversion to ADS is less time consuming, but it COSTS more to your clients and the benefits may not worth the effort and price.\nAs it is DBFCDX appears to be quite adequate for the purpose.\n\n[b:6rqkna9d]Why is thin client and remote desktop computing getting so much attention these days? What are some of the business factors that have changed within recent years to make these applications desirable?\n[/b:6rqkna9d][url:6rqkna9d]http://enterprisefeatures.com/2011/04/frequently-asked-thin-computing-questions-faq/[/url:6rqkna9d]\n\nBest regards,\nOtto",
"time": "07:19",
"topic": "Client Server options",
"username": "Otto"
}
] | Client Server options |
[
{
"date": "2012-05-23",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Otto;\n\nYou are still missing the point. You are looking for a black cat on a dark black room. The problem is that there is no black cat. So keep searching...\n\nStop comparing RDP vs SQL. I use both. It is not one or the other. ADS DD gives you triggers, stored procedures, save points with roll back transactions, sql syntax, ISAM, event messaging between server and workstation, data security, zero corruption, real client-server. RDP gives you... well just that, remote desktop. See, oranges and bicycles don't compare and don't need to be pinned one against the other.\n\nAgain, you can't miss what you don't know. If the dark room feels comfortable to you, then stay there.\n\n\nReinaldo.",
"time": "13:42",
"topic": "Client Server options",
"username": "reinaldocrespo"
}
] | Client Server options |
[
{
"date": "2012-05-23",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Hi,\n\nThe ideal option would be SQLRDD, so you deliver .exe file and that accesses an SQL server.\n\nAIS is quite slow via Internet, but SQL is not.\n\nAnd in local mode you set to DBFCDX.",
"time": "13:49",
"topic": "Client Server options",
"username": "lucasdebeltran"
}
] | Client Server options |
[
{
"date": "2012-05-23",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Lucas;\n\nIf you want to compare speed of ADS vs MS-SQL via an Internet connection, then you need to compare similar technologies. If you access .dbfs via PHP using the ADS php driver, then it is every bit as fast as accessing any SQL via php. If you access DBFS via .net driver then it is every bit as fast as any SQL being accessed via the .net.\n\nThe problem here is you are trying to xbrowse a dbf over an internet connection. What makes it slow is that xbrowse wasn't designed to be fast over an internet connection. If you want to browse data over internet, then try php, pyton, or any .net such as ASP. Bear in mind that you can't even try to xbrowse any other SQL over an internet connection.\n\nTry PHP + ADS php extension to work with your .dbfs. It is simple and FAST!\n\nIf you want to stay with win32 apps to access your .dbfs via internet, then try to avoid xbrowsing the whole dbf. Maybe browse result sets produced by SQL?\n\n\nReinaldo.",
"time": "14:01",
"topic": "Client Server options",
"username": "reinaldocrespo"
}
] | Client Server options |
[
{
"date": "2012-05-23",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Reinaldo,\n\nUsing AIS over Internet in normal dbf operations (APPEND, DELETE, LOCATE, SEEK, etc) is not as fast as TDophin and MySQL.\n\nxBrowsing is very slow. Even creating a SQL querry and loading into an array.\n\nBut xBrowsing with TDoplphin is very fast.\n\nSo ADS should improve performance. I they do that, ADS would be the best choice and it will worth it. But not at mean time, I am afraid.",
"time": "14:46",
"topic": "Client Server options",
"username": "lucasdebeltran"
}
] | Client Server options |
[
{
"date": "2012-05-23",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Lucas;\n\nPlease share a small self contained sample using xbrowse with tdolphin over an internet connection. Perhaps you have some test data on your server that I can test? I would really like to see it working. So far I've been using php to access .dbf data over internet connections and only use AIS with FIPS encryption for data replication between servers.\n\nYou can write to me email reinaldo.crespo on gmail. Thank you.\n\nReinaldo.",
"time": "15:05",
"topic": "Client Server options",
"username": "reinaldocrespo"
}
] | Client Server options |
[
{
"date": "2012-05-23",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Lucas;\n\nPerhaps you can do a test for me. Compare browsing a .dbf table using AIS from Arc32 vs. browsing a table using tdolphin over the same internet connection. Is Tdolphin using ADO?",
"time": "15:10",
"topic": "Client Server options",
"username": "reinaldocrespo"
}
] | Client Server options |
[
{
"date": "2012-05-23",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Lucas\n\nIf you are using MS Sql Server make sure you use the Local Cache option when you create your ADO recordset object. This allows your data to be cached on the client rather than thrashing over the internet.\n\nThis is only applicable to OLEDB providers that support ADO. ( sql server, oracle, db2 ) \n\nRick Lipkin\n\n[code=fw:231qkyk5]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br />oRsUser := TOleAuto<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span>:<span style=\"color: #00C800;\">New</span><span style=\"color: #000000;\">(</span> <span style=\"color: #ff0000;\">\"ADODB.Recordset\"</span> <span style=\"color: #000000;\">)</span><br />oRsUser:<span style=\"color: #000000;\">CursorType</span> := <span style=\"color: #000000;\">1</span> <span style=\"color: #B900B9;\">// opendkeyset</span><br />oRsUser:<span style=\"color: #000000;\">CursorLocation</span> := <span style=\"color: #000000;\">3</span> <span style=\"color: #B900B9;\">// local cache</span><br />oRsUser:<span style=\"color: #000000;\">LockType</span> := <span style=\"color: #000000;\">3</span> <span style=\"color: #B900B9;\">// lockoportunistic</span><br /><br />cSQL := <span style=\"color: #ff0000;\">\"SELECT * FROM EMPLOYEES\"</span><br /><span style=\"color: #00C800;\">TRY</span><br /> oRsUser:<span style=\"color: #000000;\">Open</span><span style=\"color: #000000;\">(</span> cSQL, xCONNECT <span style=\"color: #000000;\">)</span><br />CATCH oErr<br /> <span style=\"color: #0000ff;\">MsgInfo</span><span style=\"color: #000000;\">(</span> <span style=\"color: #ff0000;\">\"Error in Opening EMPLOYEES table here\"</span> <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00C800;\">RETURN</span><span style=\"color: #000000;\">(</span>.F.<span style=\"color: #000000;\">)</span><br />END <span style=\"color: #00C800;\">TRY</span><br /> </div>[/code:231qkyk5]",
"time": "15:24",
"topic": "Client Server options",
"username": "Rick Lipkin"
}
] | Client Server options |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.