messages
listlengths 1
1
| topic
stringlengths 2
60
|
|---|---|
[
{
"date": "2015-04-03",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio,\n\n[quote:30kd32cw]seek whatever = select * from .... where (seek expression)[/quote:30kd32cw]\n\nWhy don't you create a new RecordSet for this seek ?\n\nThis way, the original RecordSet remains intact.",
"time": "22:18",
"topic": "ADO RDD xHarbour",
"username": "Antonio Linares"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-04",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio,\n\nThe name of the index in the array is the name of the tag of the struct index file right?\n\nYes.\n\nThis approach didn't foresee to keep the struct file name index and it might not be needed.\nYou simply ask for the orders (tags) right?\n\nYes.\n\nThe struct file name itself is not needed ?\n\nYes.\n\nThe only thing we need is to open all indexes with the table if SET AUTO OPEN is true and place the current order accordingly to SET AUTORDER. Right?\n\nYes.\n\n\nLet´s see it better with a sample:\n\nSo, if SET AUTOPEN is ON, after a USE .... command the indexes should be opened, i. e. calling ADORDD SET INDEX TO TAG1, TAG2, TAG3, TAG4, TAG5... going over the items from ListIndex(nOption) for such table.\n\nFor instance, if we define at ListIndex those indexes for table CUSTOMER:\n\n[code=fw:15it8rqn]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /><span style=\"color: #00C800;\">LOCAL</span> a := <span style=\"color: #000000;\">{</span> <span style=\"color: #000000;\">{</span> <span style=\"color: #ff0000;\">\"CUSTOMER\"</span>, <span style=\"color: #000000;\">{</span><span style=\"color: #ff0000;\">\"CUSTOMER1\"</span>, <span style=\"color: #ff0000;\">\"NAME\"</span><span style=\"color: #000000;\">}</span> ,;<br /> <span style=\"color: #000000;\">{</span><span style=\"color: #ff0000;\">\"CUSTOMER2\"</span>, <span style=\"color: #ff0000;\">\"NAME\"</span>, <span style=\"color: #ff0000;\">\"WHERE CITY = 'Barcelona' \"</span><span style=\"color: #000000;\">}</span> ,;<br /> <span style=\"color: #000000;\">{</span><span style=\"color: #ff0000;\">\"LUCAS\"</span>, <span style=\"color: #ff0000;\">\"STREET\"</span>, <span style=\"color: #ff0000;\">\"WHERE NOTES = 'varis' \"</span><span style=\"color: #000000;\">}</span> ,;<br /> <span style=\"color: #000000;\">}</span> <span style=\"color: #000000;\">}</span><br /> </div>[/code:15it8rqn]\n\n\nSo, if I do:\n\n[code=fw:15it8rqn]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br />SET AUTOPEN <span style=\"color: #0000ff;\">ON</span><br /><br />USE access.mdb VIA <span style=\"color: #ff0000;\">\"ADORDD\"</span> TABLE <span style=\"color: #ff0000;\">\"CUSTOMER\"</span> ACCESS <span style=\"color: #00C800;\">NEW</span> <span style=\"color: #0000ff;\">ALIAS</span> <span style=\"color: #ff0000;\">\"CUSTOMER\"</span><br /> </div>[/code:15it8rqn]\n\nADORDD should call\n\nSET INDEX TO CUSTOMER1, CUSTOMER2, LUCAS\n\nby itself.\n\nThank you.",
"time": "07:55",
"topic": "ADO RDD xHarbour",
"username": "lucasdebeltran"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-04",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Lucas,\n\nIts done also taking in account autoorder setting.\n\nIll post a new version asap\n\nThanks for the info.",
"time": "09:16",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-04",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Thank you Antonio, there is no rush.\n\nI would like to ask you how I define such indexes with functions and conditions. For instance:\n\n\n[code=fw:1q9pcrp4]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><span style=\"color: #0000ff;\">INDEX</span> <span style=\"color: #0000ff;\">ON</span> FIELD->FSERIE + StrZero <span style=\"color: #000000;\">(</span> FIELD->FNUMERO, <span style=\"color: #000000;\">20</span> <span style=\"color: #000000;\">)</span> TAG CAB<br /><br /><span style=\"color: #0000ff;\">INDEX</span> <span style=\"color: #0000ff;\">ON</span> FIELD->FNUMERO TAG ALB <span style=\"color: #00C800;\">FOR</span> FIELD->FP != <span style=\"color: #ff0000;\">\"S\"</span><br /><br /><span style=\"color: #0000ff;\">INDEX</span> <span style=\"color: #0000ff;\">ON</span> FIELD->TIPDOC TAG AUXILIAR3 <span style=\"color: #00C800;\">FOR</span> !EMPTY<span style=\"color: #000000;\">(</span> FIELD->TIPDOC <span style=\"color: #000000;\">)</span><br /><br /><span style=\"color: #0000ff;\">INDEX</span> <span style=\"color: #0000ff;\">ON</span> DTOS<span style=\"color: #000000;\">(</span> FIELD->FECHA <span style=\"color: #000000;\">)</span> TAG CARTERA3 <span style=\"color: #00C800;\">FOR</span> FIELD->COBRO = <span style=\"color: #000000;\">0</span></div>[/code:1q9pcrp4]\n\nThank you.",
"time": "20:44",
"topic": "ADO RDD xHarbour",
"username": "lucasdebeltran"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-04",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Lucas,\n\n[quote=\"lucasdebeltran\":2gwx4at7]Thank you Antonio, there is no rush.\n\nI would like to ask you how I define such indexes with functions and conditions. For instance:\n\n[code=fw:2gwx4at7]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><span style=\"color: #0000ff;\">INDEX</span> <span style=\"color: #0000ff;\">ON</span> FIELD->FSERIE + StrZero <span style=\"color: #000000;\">(</span> FIELD->FNUMERO, <span style=\"color: #000000;\">20</span> <span style=\"color: #000000;\">)</span> TAG CAB<br /><br /><span style=\"color: #0000ff;\">INDEX</span> <span style=\"color: #0000ff;\">ON</span> FIELD->FNUMERO TAG ALB <span style=\"color: #00C800;\">FOR</span> FIELD->FP != <span style=\"color: #ff0000;\">\"S\"</span><br /><br /><span style=\"color: #0000ff;\">INDEX</span> <span style=\"color: #0000ff;\">ON</span> FIELD->TIPDOC TAG AUXILIAR3 <span style=\"color: #00C800;\">FOR</span> !EMPTY<span style=\"color: #000000;\">(</span> FIELD->TIPDOC <span style=\"color: #000000;\">)</span><br /><br /><span style=\"color: #0000ff;\">INDEX</span> <span style=\"color: #0000ff;\">ON</span> DTOS<span style=\"color: #000000;\">(</span> FIELD->FECHA <span style=\"color: #000000;\">)</span> TAG CARTERA3 <span style=\"color: #00C800;\">FOR</span> FIELD->COBRO = <span style=\"color: #000000;\">0</span></div>[/code:2gwx4at7]\n\nThank you.[/quote:2gwx4at7]\n\n[code=fw:2gwx4at7]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /><span style=\"color: #000000;\">{</span>....<br /><span style=\"color: #000000;\">{</span><span style=\"color: #ff0000;\">\"CAB\"</span>,<span style=\"color: #000000;\">{</span><span style=\"color: #ff0000;\">\"FSERIE,NUMERO\"</span><span style=\"color: #000000;\">}</span><span style=\"color: #000000;\">}</span> <span style=\"color: #B900B9;\">//I dont know strzero </span><br /><span style=\"color: #000000;\">{</span><span style=\"color: #ff0000;\">\"ALB\"</span>,<span style=\"color: #000000;\">{</span><span style=\"color: #ff0000;\">\"FNUMERO\"</span><span style=\"color: #000000;\">}</span>,<span style=\"color: #000000;\">{</span><span style=\"color: #ff0000;\">\"WHERE FP != 'S' \"</span><span style=\"color: #000000;\">}</span><span style=\"color: #000000;\">}</span> <span style=\"color: #B900B9;\">//!= depends on your DB it might only accepts <></span><br /><span style=\"color: #000000;\">{</span><span style=\"color: #ff0000;\">\"AUXILIAR3\"</span>,<span style=\"color: #000000;\">{</span><span style=\"color: #ff0000;\">\"TIPODOC\"</span><span style=\"color: #000000;\">}</span>,<span style=\"color: #000000;\">{</span><span style=\"color: #ff0000;\">\"WHERE TIPODOC != NULL\"</span><span style=\"color: #000000;\">}</span><span style=\"color: #000000;\">}</span> <br /><span style=\"color: #000000;\">{</span><span style=\"color: #ff0000;\">\"CARTEIRA3\"</span>,<span style=\"color: #000000;\">{</span><span style=\"color: #ff0000;\">\"FECHA\"</span><span style=\"color: #000000;\">}</span>,<span style=\"color: #000000;\">{</span><span style=\"color: #ff0000;\">\"WHERE COBRO = 0 \"</span><span style=\"color: #000000;\">}</span><span style=\"color: #000000;\">}</span> <span style=\"color: #000000;\">}</span><br /> </div>[/code:2gwx4at7]\n\nYou can use on the condition ele of the array any sql statement permitted by your server.\nConversion functions in the index field ele are not needed in SQL.\nPlease remember that Indexes are truly only selects, Seeks and Locates with more than one field on the expression also.\n\nThe problem I have to start solve on Monday is Seeks and child related tables with the expression corresponding to multiple fields for a way to reset the previous recordset as soon as the result from these are not needed anymore. \nPlease remember that in these conditions you keep that tables with those selects.\n\nPlease try it yourself.\n\nOpen table\nOpen index\nbrowse()\nnRec := recno()\nseek x (expr = 2 or more fields)\nbrowse()\ngo to nRec\n\nSee what I mean?",
"time": "21:16",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-05",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Thank you Antonio.\n\nHave you looked at arrayrdd source, SQLRDD rdd source or Mediator SQL RDD from <!-- w --><a class=\"postlink\" href=\"http://www.otc.pl?\">www.otc.pl?</a><!-- w -->.\n\nIt may help. \n\nAlso, if you use find for seek?. I think in ADO indexes are fine for showing the data ordered by a field, but they are not so important for searching and speed as they are in DBF.",
"time": "09:49",
"topic": "ADO RDD xHarbour",
"username": "lucasdebeltran"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-05",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio,\n\nDbCreate() working:\n\n[code=fw:28owrdr1]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /><br /><span style=\"color: #00C800;\">STATIC</span> <span style=\"color: #00C800;\">FUNCTION</span> ADO_CREATE<span style=\"color: #000000;\">(</span> nWA, aOpenInfo <span style=\"color: #000000;\">)</span><br /><br /><br /> <span style=\"color: #00C800;\">TRY</span><br /> <span style=\"color: #00C800;\">IF</span> Lower<span style=\"color: #000000;\">(</span> <span style=\"color: #0000ff;\">Right</span><span style=\"color: #000000;\">(</span> cDataBase, <span style=\"color: #000000;\">4</span> <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span> == <span style=\"color: #ff0000;\">\".fdb\"</span><br /> oConnection:<span style=\"color: #000000;\">Execute</span><span style=\"color: #000000;\">(</span> <span style=\"color: #ff0000;\">\"CREATE TABLE \"</span> + cTableName + <span style=\"color: #ff0000;\">\" (\"</span> + StrTran<span style=\"color: #000000;\">(</span> StrTran<span style=\"color: #000000;\">(</span> aWAData<span style=\"color: #000000;\">[</span> WA_SQLSTRUCT <span style=\"color: #000000;\">]</span>, <span style=\"color: #ff0000;\">\"[\"</span>, <span style=\"color: #ff0000;\">'\"'</span> <span style=\"color: #000000;\">)</span>, <span style=\"color: #ff0000;\">\"]\"</span>, <span style=\"color: #ff0000;\">'\"'</span> <span style=\"color: #000000;\">)</span> + <span style=\"color: #ff0000;\">\")\"</span> <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00C800;\">ELSE</span><br /><br /> <span style=\"color: #B900B9;\">//oConnection:Execute( \"CREATE TABLE [\" + cTableName + \"] (\" + aWAData[ WA_SQLSTRUCT ] + \")\" )</span><br /><br /> N := FW_AdoCreateTableSQL<span style=\"color: #000000;\">(</span> cTableName, aWAData<span style=\"color: #000000;\">[</span> WA_SQLSTRUCT <span style=\"color: #000000;\">]</span>, oConnection, .T. <span style=\"color: #000000;\">)</span><br /> oConnection:<span style=\"color: #000000;\">Execute</span><span style=\"color: #000000;\">(</span> N <span style=\"color: #000000;\">)</span><br /><br /> <span style=\"color: #00C800;\">ENDIF</span><br /> CATCH<br /> oError := ErrorNew<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /> oError:<span style=\"color: #000000;\">GenCode</span> := EG_CREATE<br /> oError:<span style=\"color: #000000;\">SubCode</span> := <span style=\"color: #000000;\">1004</span><br /> oError:<span style=\"color: #000000;\">Description</span> := hb_langErrMsg<span style=\"color: #000000;\">(</span> EG_CREATE <span style=\"color: #000000;\">)</span> + <span style=\"color: #ff0000;\">\" (\"</span> + ;<br /> hb_langErrMsg<span style=\"color: #000000;\">(</span> EG_UNSUPPORTED <span style=\"color: #000000;\">)</span> + <span style=\"color: #ff0000;\">\")\"</span><br /> oError:<span style=\"color: #000000;\">FileName</span> := aOpenInfo<span style=\"color: #000000;\">[</span> UR_OI_NAME <span style=\"color: #000000;\">]</span><br /> oError:<span style=\"color: #000000;\">CanDefault</span> := .T.<br /><br /> <span style=\"color: #00C800;\">FOR</span> n := <span style=\"color: #000000;\">0</span> <span style=\"color: #0000ff;\">TO</span> oConnection:<span style=\"color: #000000;\">Errors</span>:<span style=\"color: #0000ff;\">Count</span> - <span style=\"color: #000000;\">1</span><br /> oError:<span style=\"color: #000000;\">Description</span> += oConnection:<span style=\"color: #000000;\">Errors</span><span style=\"color: #000000;\">(</span> n <span style=\"color: #000000;\">)</span>:<span style=\"color: #000000;\">Description</span><br /> <span style=\"color: #00C800;\">NEXT</span><br /><br /> UR_SUPER_ERROR<span style=\"color: #000000;\">(</span> nWA, oError <span style=\"color: #000000;\">)</span><br /> END<br /><br /> oConnection:<span style=\"color: #000000;\">Close</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /><br /> <span style=\"color: #00C800;\">RETURN</span> HB_SUCCESS<br /><br /><br /><br /><span style=\"color: #00C800;\">STATIC</span> <span style=\"color: #00C800;\">FUNCTION</span> ADO_CREATEFIELDS<span style=\"color: #000000;\">(</span> nWA, aStruct <span style=\"color: #000000;\">)</span><br /><br /> <span style=\"color: #00C800;\">LOCAL</span> aWAData := USRRDD_AREADATA<span style=\"color: #000000;\">(</span> nWA <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00C800;\">LOCAL</span> n<br /><br />aWAData<span style=\"color: #000000;\">[</span> WA_SQLSTRUCT <span style=\"color: #000000;\">]</span> := aStruct<br /><br /><br /><span style=\"color: #B900B9;\">/*<br /> aWAData[ WA_SQLSTRUCT ] := \"\"<br /><br /> FOR n := 1 TO Len( aStruct )<br /> IF n > 1<br /> aWAData[ WA_SQLSTRUCT ] += \", \"<br /> ENDIF<br /> aWAData[ WA_SQLSTRUCT ] += \"[\" + aStruct[ n ][ DBS_NAME ] + \"]\"<br /> DO CASE<br /> CASE aStruct[ n ][ DBS_TYPE ] $ \"C,Character\"<br /> aWAData[ WA_SQLSTRUCT ] += \" CHAR(\" + str( aStruct[ n ][ DBS_LEN ] ) + \") NULL\"<br /><br /> CASE aStruct[ n ][ DBS_TYPE ] == \"V\"<br /> aWAData[ WA_SQLSTRUCT ] += \" VARCHAR(\" + str( aStruct[ n ][ DBS_LEN ] ) + \") NULL\"<br /><br /> CASE aStruct[ n ][ DBS_TYPE ] == \"B\"<br /> aWAData[ WA_SQLSTRUCT ] += \" DOUBLE NULL\"<br /><br /> CASE aStruct[ n ][ DBS_TYPE ] == \"Y\"<br /> aWAData[ WA_SQLSTRUCT ] += \" SMALLINT NULL\"<br /><br /> CASE aStruct[ n ][ DBS_TYPE ] == \"I\"<br /> aWAData[ WA_SQLSTRUCT ] += \" MEDIUMINT NULL\"<br /><br /> CASE aStruct[ n ][ DBS_TYPE ] == \"D\"<br /> aWAData[ WA_SQLSTRUCT ] += \" DATE NULL\"<br /><br /> CASE aStruct[ n ][ DBS_TYPE ] == \"T\"<br /> aWAData[ WA_SQLSTRUCT ] += \" DATETIME NULL\"<br /><br /> CASE aStruct[ n ][ DBS_TYPE ] == \"@\"<br /> aWAData[ WA_SQLSTRUCT ] += \" TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP\"<br /><br /> CASE aStruct[ n ][ DBS_TYPE ] == \"M\"<br /> aWAData[ WA_SQLSTRUCT ] += \" TEXT NULL\"<br /><br /> CASE aStruct[ n ][ DBS_TYPE ] == \"N\"<br /> aWAData[ WA_SQLSTRUCT ] += \" NUMERIC(\" + str( aStruct[ n ][ DBS_LEN ] ) + \")\"<br /><br /> CASE aStruct[ n ][ DBS_TYPE ] == \"L\"<br /> aWAData[ WA_SQLSTRUCT ] += \" LOGICAL\"<br /> ENDCASE<br /> NEXT<br /><br /><br />*/</span><br /><br /><br /> <span style=\"color: #00C800;\">RETURN</span> HB_SUCCESS<br /><br /><br /> </div>[/code:28owrdr1]",
"time": "14:54",
"topic": "ADO RDD xHarbour",
"username": "lucasdebeltran"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-05",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Hello Antonio,\n\nI detected that the changes are not saved to the disk.\n\nHave you checked this?.\n\nThank you.",
"time": "15:34",
"topic": "ADO RDD xHarbour",
"username": "lucasdebeltran"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-05",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Sample to test it:\n\n[code=fw:2as6i00o]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /><br /><span style=\"color: #00C800;\">function</span> Main<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /><br /> <span style=\"color: #00C800;\">local</span> aArray := <span style=\"color: #000000;\">{</span><span style=\"color: #000000;\">}</span><br /><br /><span style=\"color: #B900B9;\">/*<br /> DbCreate( \"test2.mdb;table1\", { { \"FIRST\", \"C\", 30, 0 },;<br /> { \"LAST\", \"C\", 30, 0 },;<br /> { \"AGE\", \"N\", 8, 0 } }, \"ADORDD\" )<br /><br />*/</span><br /> USE test2.mdb VIA <span style=\"color: #ff0000;\">\"ADORDD\"</span> TABLE <span style=\"color: #ff0000;\">\"table1\"</span> <span style=\"color: #00C800;\">NEW</span><br /><br />browse<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /><br /><br /> APPEND BLANK<br /> test2->First := <span style=\"color: #ff0000;\">\"HOMER si no Homer\"</span><br /> test2->Last := <span style=\"color: #ff0000;\">\"Simpson\"</span><br /> test2->Age := <span style=\"color: #000000;\">45</span><br /><br /> APPEND BLANK<br /> test2->First := <span style=\"color: #ff0000;\">\"aaa Lara\"</span><br /> test2->Last := <span style=\"color: #ff0000;\">\"Croft si no\"</span><br /> test2->Age := <span style=\"color: #000000;\">32</span><br /><br /><br /> GO TOP<br /><br /> <span style=\"color: #0000ff;\">xBrowse</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /> DbCloseAll<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /><br /><br /><br /><br /><span style=\"color: #00C800;\">return</span> <span style=\"color: #00C800;\">nil</span><br /><br /> </div>[/code:2as6i00o]",
"time": "15:40",
"topic": "ADO RDD xHarbour",
"username": "lucasdebeltran"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-06",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Lucas, Antonio,\n\n[quote:1pml654a]Have you looked at arrayrdd source, SQLRDD rdd source or Mediator SQL RDD from <!-- w --><a class=\"postlink\" href=\"http://www.otc.pl?\">www.otc.pl?</a><!-- w -->.\n\nIt may help. \n\nAlso, if you use find for seek?. I think in ADO indexes are fine for showing the data ordered by a field, but they are not so important for searching and speed as they are in DBF.[/quote:1pml654a]\n\nI've looked arrayrdd but not the others I don't have the code.\n\nADO_CREATE not started yet.\n\nI'm still struggling with seeks with more than one field in seek expr..\n\nWe have the following alternatives:\n\n1) Select a new set with where clause with fields used in seek expr.\n Pros - Good performance \n Cons - Seek must be reset some how if one needs to access records out of the scope \n of the select. Previous Set could be saved.\n Actual solution in adorddd being tested.\n\n2) ADO Find based on the initial select with a new column = to the fields used in the index expr.\n ex : index expr - field1+field2+field3\n Initial select is then:\n SELECT ctable.*, (field1+field2+field3) AS INDEKEY FROM ctable ORDER BY field1+field2+field3\n This allow us to use ADO Find on the INDEXKEY column and we can even create a ADO index on that \n column Ex indexkey:Optimize := TRUE\n Pros - Don't need any code change in the app.\n Cons - Don't know how performance is\n I'm implementing this to initiate trials.\n\n3) A mixture of both above solutions:\n Instead of use seek in relations create a SELECT with both related areas with the join clause = to the related\n fields and the same new indexkey new column\n Ex:\n SELECT ctable.*, cTable2.*, ctable.(field1+field2+field3) AS INDEKEY FROM ctable,ctable2 LEFT JOIN .... \n ORDER BY field1+field2+field3\n Pros - Don't need any code change in the app. Only one select for the job. Best performance.\n Cons - We need somehow when changing area to ctable2 or address fields in ctable2 to redirected to ctable \n area. Dont know if it is possible.\n\nI'm checking now the solution 2 but I would like to know what is your opinion.\nDo you have any experience using :Find on a Optimize field on a huge table (couple of 100.000) ? Is it fast?",
"time": "08:33",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-06",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio,\n\nIve a problem with bookmarks.\n\nThe value returned by bookmark its a Variant.Ex.\n\nnrecno := oSet:bookmark\n......\ndbgoto(nrecno) = adordd - oSet:Bookmark := nrecno\n\nnRecni it is received in ADO_GOTOID as integer with no decimals and might be any value.\n\nHow can we solve this?\n\nBy the way in adordd in all recno function (RECNO, GOTO etc) tests if there is a field HBRECNO in the table (autoinc) \nIf true it uses the value on that field for all recno operations.\nThis is a optional that assures that will work 100% in all situations under any kind of cursor.",
"time": "08:42",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-06",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio,\n\nDbSeek only supports searching into 1 field.\n\n[quote:3gpgb7jp]DbSeek()\nSearches a value in the controlling index. \nSyntax\nDbSeek( <xValue>, [<lSoftSeek>], [<lFindLast>] ) --> lFound\n\nArguments\n<xValue> \nThe value to search for. Its data type must match the data type of the index expression of the controlling index. \n<lSoftSeek> \nThis optional value defaults to .F. (false) causing the DbSeek() function to position the record pointer at Eof() if <xValue> is not found in the index. When .T. (true) is passed for <lSoftSeek> and <xValue> is not found in the index, the record pointer is positioned on the record with the next higher index value. \n<lFindLast> \n<lFindLast> is only relevant when the database contains multiple records having identical index values. It defaults to .F. (false) causing the DbSeek() function to position the record pointer on the first record found. .T. (true) instructs DbSeek() to position the record pointer on the last of multiple records having the same index value. Return\nDbSeek() returns .T. (true) if <xValue> is found, otherwise .F. (false). \nDescription\nThe DbSeek() function is used to perform fast searches in databases. To accomplish this, the database must be indexed, since DbSeek() searches the value <xValue> in the controlling index, rather than in the database. It operates in the current work area, unless it is used in an aliased expression. \nWhen DbSeek() finds <xValue> in the controlling index, it returns .T. (true) and positions the record pointer to the corresponding record. The parameter <lFindLast> optionally specifies which record to find if there are multiple records having the same index value. By default, the first record is found. If <lFindLast> is .T. (true), DbSeek() positions the record pointer on the last of the records having identical index values. \nAfter a successful search, the function Found() returns .T. (true) until the record pointer is moved again. In addition, both functions, BoF() and EoF() return .F. (false). \nIf the searched value is not found, DbSeek() positions the record pointer on the \"ghost record\" (Lastrec()+\n[/quote:3gpgb7jp]\n\nBut the real problem is that data is not saved!!!. When the program is closed, they are lost!.\n\nThank you very much.",
"time": "15:55",
"topic": "ADO RDD xHarbour",
"username": "lucasdebeltran"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-06",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio,\n\nI don't understand this line:\n\n[quote:mpejbos1]dbgoto(nrecno) = adordd - oSet:Bookmark := nrecno[/quote:mpejbos1]\n\nCould you please explain it ? thanks",
"time": "17:25",
"topic": "ADO RDD xHarbour",
"username": "Antonio Linares"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-06",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Lucas,\n\n[quote:3ug2ae8y]DbSeek only supports searching into 1 field.[/quote:3ug2ae8y]\n\nCan you post the code example and index used? Here seeks more 1 field.\n\n[quote:3ug2ae8y]But the real problem is that data is not saved!!!. When the program is closed, they are lost!.[/quote:3ug2ae8y]\n\nTo us the most important and difficult features are:\n\n1) To have all indexes, record movement, seek, locates and relations emulating 100% ISAM as dbf and ADS.\n\n2) Concurrent access with Transactions.\n\nI dont foresee problems in other features but still not initiated.\n\nAs I told you I'm not looking yet for field replaces ,writes etc.\nIt should work but I really can not tell.\n\nLast version its in trial with transactions!\nPlease check if your version already has transactions. In this case transactions only be flushed with dbcommit.\nWe are trying beginstrans with the first lock and committrans with dbcommit or rollbacktrans with ADOBEGINTRANS(nArea).\n\nCould you please try it?",
"time": "17:32",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-06",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio,\n\n[quote=\"Antonio Linares\":1n5bq4tx]Antonio,\n\nI don't understand this line:\n\n[quote:1n5bq4tx]dbgoto(nrecno) = adordd - oSet:Bookmark := nrecno[/quote:1n5bq4tx]\n\nCould you please explain it ? thanks[/quote:1n5bq4tx]\n\nExample:\n[code=fw:1n5bq4tx]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br />nRec := recno<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span> <span style=\"color: #B900B9;\">// value of bookmark in adordd returned 2.00</span><br />....<br />dbgoto<span style=\"color: #000000;\">(</span>nRec<span style=\"color: #000000;\">)</span> <span style=\"color: #B900B9;\">// value in ado_gotoid() 2 ors:BookMark := nRec you get a bookmark error!</span><br /> </div>[/code:1n5bq4tx]\n\nThis means that the value returned from recno() its correct.\nThen when passing it to dbgoto() it gets to ado_gotoid() in adordd incorrect.\nBookmark does not assure any specific datatype because it depends on the provider.",
"time": "17:41",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-06",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Lucas,\n\nNew version adordd -trial alternative seeks <!-- m --><a class=\"postlink\" href=\"https://github.com/AHFERREIRA/adordd.git\">https://github.com/AHFERREIRA/adordd.git</a><!-- m -->\n\nready : auto open, auto order, relations, record movements (go to, recno, eof, etc), locate and continue, seeks.\n\nSearch for \"experimental phase\" in the code to understand what I m trying to do.\n\nCan you try relations and seeks with a medium size table (> 100.000 records) (both parent and child) on a browse to check performance?\n\nTransactions are automatically called so please dont forget to issue dbcommit after each transaction or data wont be saved.\nIn this trial transacts are initiated in the first lock and ended in the first dbcommit.\n\nThanks",
"time": "21:24",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-07",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Lucas,\n\nIs APPEND BLANK working ?",
"time": "08:33",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-07",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio,\n\nPlease send me addfef.ch.\n\nThanks",
"time": "10:01",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-07",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio,\n\nCan you check what function is calling UR_EXISTS ?",
"time": "10:13",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-07",
"forum": "FiveWin for Harbour/xHarbour",
"text": "[quote=\"AHF\":1tttu0tv]Antonio,\n\nPlease send me addfef.ch.\n\nThanks[/quote:1tttu0tv]\n\nWhere is such file ? I can't find it in Harbour files neither in FWH ones.",
"time": "10:24",
"topic": "ADO RDD xHarbour",
"username": "Antonio Linares"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-07",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio,\n\n[quote=\"AHF\":3265h2ye]Antonio,\n\nCan you check what function is calling UR_EXISTS ?[/quote:3265h2ye]\n\nIn adordd.prg there is:\n\n aADOFunc[ UR_EXISTS ] := @ADO_EXISTS()",
"time": "10:40",
"topic": "ADO RDD xHarbour",
"username": "Antonio Linares"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-07",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio,\n\n[quote:399kncp3]Where is such file ? I can't find it in Harbour files neither in FWH ones.[/quote:399kncp3]\n\nIts mentioned in adofuncs.prg\n\n[quote:399kncp3]In adordd.prg there is:\n\naADOFunc[ UR_EXISTS ] := @ADO_EXISTS()[/quote:399kncp3]\n\nI meant what is the function calling UR_EXISTS ?",
"time": "10:51",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-07",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio,\n\nWhat are these function for?\n\n/* non WorkArea functions */\n\n#define UR_EXIT 95\n#define UR_DROP 96\n#define UR_EXISTS 97\n#define UR_RENAME 98",
"time": "12:00",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-07",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio,\n\nadordd its almost finished and all \"light\" trials seem to be ok Not one line code changed!:D \n\nadordd its prepared to work the dbseek with selects or :find and the final decision will depend on performance.\nIt might compensates the trade off between no code change and speed. We will see.\n\nNow I'm missing information asked in my previous posts.\n\nI'm finishing:\n\nAPPEND FROM and COPY TO to be parse into sql (INSERT INTO ... SELECT FROM.... ) but shouldn't be a problem.\n\nI'm sure that many bugs will be found but we are getting there. <!-- s:D --><img src=\"{SMILIES_PATH}/icon_biggrin.gif\" alt=\":D\" title=\"Very Happy\" /><!-- s:D -->",
"time": "12:13",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-07",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio,\n\nUR_EXIT seems as an EXIT procedure where we can do cleaning if needed.\n\nRegarding the others, dbcmd.c uses them this way:\n[code=fw:ccydbegq]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><span style=\"color: #00C800;\">HB_FUNC</span><span style=\"color: #000000;\">(</span> HB_DBDROP <span style=\"color: #000000;\">)</span><br /><span style=\"color: #000000;\">{</span><br /> LPRDDNODE pRDDNode;<br /> HB_USHORT uiRddID;<br /> HB_ULONG ulConnection;<br /> const char * szDriver;<br /> PHB_ITEM pName;<br /><br /> szDriver = hb_parc<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">3</span> <span style=\"color: #000000;\">)</span>;<br /> <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">(</span> ! szDriver <span style=\"color: #000000;\">)</span> <span style=\"color: #B900B9;\">/* no VIA RDD parameter, use default */</span><br /> <span style=\"color: #000000;\">{</span><br /> szDriver = hb_rddDefaultDrv<span style=\"color: #000000;\">(</span> <span style=\"color: #00C800;\">NULL</span> <span style=\"color: #000000;\">)</span>;<br /> <span style=\"color: #000000;\">}</span><br /> ulConnection = hb_parnl<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">4</span> <span style=\"color: #000000;\">)</span>;<br /><br /> pRDDNode = hb_rddFindNode<span style=\"color: #000000;\">(</span> szDriver, &uiRddID <span style=\"color: #000000;\">)</span>; <span style=\"color: #B900B9;\">/* find the RDDNODE */</span><br /> pName = hb_param<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">1</span>, HB_IT_STRING <span style=\"color: #000000;\">)</span>;<br /><br /> <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">(</span> pRDDNode && pName <span style=\"color: #000000;\">)</span><br /> hb_retl<span style=\"color: #000000;\">(</span> SELF_DROP<span style=\"color: #000000;\">(</span> pRDDNode, pName, hb_param<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">2</span>, HB_IT_STRING <span style=\"color: #000000;\">)</span>,<br /> ulConnection <span style=\"color: #000000;\">)</span> == HB_SUCCESS <span style=\"color: #000000;\">)</span>;<br /> <span style=\"color: #00C800;\">else</span><br /> hb_errRT_DBCMD<span style=\"color: #000000;\">(</span> EG_ARG, EDBCMD_EVAL_BADPARAMETER, <span style=\"color: #00C800;\">NULL</span>, HB_ERR_FUNCNAME <span style=\"color: #000000;\">)</span>;<br /><span style=\"color: #000000;\">}</span><br /><br /><span style=\"color: #00C800;\">HB_FUNC</span><span style=\"color: #000000;\">(</span> HB_DBEXISTS <span style=\"color: #000000;\">)</span><br /><span style=\"color: #000000;\">{</span><br /> LPRDDNODE pRDDNode;<br /> HB_USHORT uiRddID;<br /> HB_ULONG ulConnection;<br /> const char * szDriver;<br /> PHB_ITEM pName;<br /><br /> szDriver = hb_parc<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">3</span> <span style=\"color: #000000;\">)</span>;<br /> <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">(</span> ! szDriver <span style=\"color: #000000;\">)</span> <span style=\"color: #B900B9;\">/* no VIA RDD parameter, use default */</span><br /> szDriver = hb_rddDefaultDrv<span style=\"color: #000000;\">(</span> <span style=\"color: #00C800;\">NULL</span> <span style=\"color: #000000;\">)</span>;<br /><br /> ulConnection = hb_parnl<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">4</span> <span style=\"color: #000000;\">)</span>;<br /><br /> pRDDNode = hb_rddFindNode<span style=\"color: #000000;\">(</span> szDriver, &uiRddID <span style=\"color: #000000;\">)</span>; <span style=\"color: #B900B9;\">/* find the RDD */</span><br /> pName = hb_param<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">1</span>, HB_IT_STRING <span style=\"color: #000000;\">)</span>;<br /><br /> <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">(</span> pRDDNode && pName <span style=\"color: #000000;\">)</span><br /> hb_retl<span style=\"color: #000000;\">(</span> SELF_EXISTS<span style=\"color: #000000;\">(</span> pRDDNode, pName, hb_param<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">2</span>, HB_IT_STRING <span style=\"color: #000000;\">)</span>,<br /> ulConnection <span style=\"color: #000000;\">)</span> == HB_SUCCESS <span style=\"color: #000000;\">)</span>;<br /> <span style=\"color: #00C800;\">else</span><br /> hb_errRT_DBCMD<span style=\"color: #000000;\">(</span> EG_ARG, EDBCMD_EVAL_BADPARAMETER, <span style=\"color: #00C800;\">NULL</span>, HB_ERR_FUNCNAME <span style=\"color: #000000;\">)</span>;<br /><span style=\"color: #000000;\">}</span><br /><br /><span style=\"color: #00C800;\">HB_FUNC</span><span style=\"color: #000000;\">(</span> HB_DBRENAME <span style=\"color: #000000;\">)</span><br /><span style=\"color: #000000;\">{</span><br /> LPRDDNODE pRDDNode;<br /> HB_USHORT uiRddID;<br /> HB_ULONG ulConnection;<br /> const char * szDriver;<br /> PHB_ITEM pTable, pIndex, pNewName;<br /><br /> szDriver = hb_parc<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">4</span> <span style=\"color: #000000;\">)</span>;<br /> <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">(</span> ! szDriver <span style=\"color: #000000;\">)</span> <span style=\"color: #B900B9;\">/* no VIA RDD parameter, use default */</span><br /> szDriver = hb_rddDefaultDrv<span style=\"color: #000000;\">(</span> <span style=\"color: #00C800;\">NULL</span> <span style=\"color: #000000;\">)</span>;<br /><br /> ulConnection = hb_parnl<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">5</span> <span style=\"color: #000000;\">)</span>;<br /><br /> pRDDNode = hb_rddFindNode<span style=\"color: #000000;\">(</span> szDriver, &uiRddID <span style=\"color: #000000;\">)</span>; <span style=\"color: #B900B9;\">/* find the RDDNODE */</span><br /> pTable = hb_param<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">1</span>, HB_IT_STRING <span style=\"color: #000000;\">)</span>;<br /> pIndex = hb_param<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">2</span>, HB_IT_STRING <span style=\"color: #000000;\">)</span>;<br /> pNewName = hb_param<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">3</span>, HB_IT_STRING <span style=\"color: #000000;\">)</span>;<br /> <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">(</span> pIndex && ! pNewName <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #000000;\">{</span><br /> pNewName = pIndex;<br /> pIndex = <span style=\"color: #00C800;\">NULL</span>;<br /> <span style=\"color: #000000;\">}</span><br /><br /> <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">(</span> pRDDNode && pTable && pNewName <span style=\"color: #000000;\">)</span><br /> hb_retl<span style=\"color: #000000;\">(</span> SELF_RENAME<span style=\"color: #000000;\">(</span> pRDDNode, pTable, pIndex, pNewName,<br /> ulConnection <span style=\"color: #000000;\">)</span> == HB_SUCCESS <span style=\"color: #000000;\">)</span>;<br /> <span style=\"color: #00C800;\">else</span><br /> hb_errRT_DBCMD<span style=\"color: #000000;\">(</span> EG_ARG, EDBCMD_EVAL_BADPARAMETER, <span style=\"color: #00C800;\">NULL</span>, HB_ERR_FUNCNAME <span style=\"color: #000000;\">)</span>;<br /><span style=\"color: #000000;\">}</span></div>[/code:ccydbegq]",
"time": "14:46",
"topic": "ADO RDD xHarbour",
"username": "Antonio Linares"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-07",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio,\n\n[quote:owsdlucm]adordd its almost finished and all \"light\" trials seem to be ok Not one line code changed!:D [/quote:owsdlucm]\n\nExcellent! <!-- s:-) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":-)\" title=\"Smile\" /><!-- s:-) -->\n\nThis is the real power of open source cooperative development:\n\nFernando and me started thinking about the importance of an ADO RDD and we started coding it. Later Miguel Marchuet cooperated also, and finally you completed it.\n\nSimply great <!-- s:-) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":-)\" title=\"Smile\" /><!-- s:-) -->",
"time": "14:47",
"topic": "ADO RDD xHarbour",
"username": "Antonio Linares"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-07",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio,\n\nTime to announce it in the Harbour devel and users lists <!-- s;-) --><img src=\"{SMILIES_PATH}/icon_wink.gif\" alt=\";-)\" title=\"Wink\" /><!-- s;-) -->",
"time": "14:50",
"topic": "ADO RDD xHarbour",
"username": "Antonio Linares"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-07",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio,\n\nDoes append blank and replace work?.\n\nIn my tests from last week once the aplication was closed, [b:3jpxuo27]data were lost[/b:3jpxuo27].\n\nAntonio L., please wait to the announcment.\n\nThank you.",
"time": "16:19",
"topic": "ADO RDD xHarbour",
"username": "lucasdebeltran"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-07",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Ahf and others: thanks and congratulations.\nI have saw announcement on xharbour forum but no on harbour forum.\nis adordd harbour/xharbour compatible ? Is it operative in production environment ?\n\nRegards",
"time": "16:33",
"topic": "ADO RDD xHarbour",
"username": "hmpaquito"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-07",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Please, \n\nPut simple test.prg for diferents test, in github.\nI like test under Sql Server and MySql.\n\nRegards.",
"time": "16:44",
"topic": "ADO RDD xHarbour",
"username": "thefull"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-07",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Rafa,\n\n[code=fw:3akovahm]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /><br /><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">\"fivewin.ch\"</span><br /><br /><span style=\"color: #00C800;\">function</span> Main<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /><br /> <span style=\"color: #00C800;\">local</span> aArray := <span style=\"color: #000000;\">{</span><span style=\"color: #000000;\">}</span><br /><br /> <span style=\"color: #00C800;\">if</span> !file<span style=\"color: #000000;\">(</span> <span style=\"color: #ff0000;\">\"test2.mdb )<br /> DbCreate( \"</span>test2.mdb;table1<span style=\"color: #ff0000;\">\", { { \"</span>FIRST<span style=\"color: #ff0000;\">\", \"</span>C<span style=\"color: #ff0000;\">\", 30, 0 },;<br /> { \"</span>LAST<span style=\"color: #ff0000;\">\", \"</span>C<span style=\"color: #ff0000;\">\", 30, 0 },;<br /> { \"</span>AGE<span style=\"color: #ff0000;\">\", \"</span>N<span style=\"color: #ff0000;\">\", 8, 0 } }, \"</span>ADORDD<span style=\"color: #ff0000;\">\" )<br /><br /> endif<br /><br /><br /><br /> USE test2.mdb VIA \"</span>ADORDD<span style=\"color: #ff0000;\">\" TABLE \"</span>table1<span style=\"color: #ff0000;\">\" NEW<br /><br />browse()<br /><br /><br /> APPEND BLANK<br /> test2->First := \"</span>HOMER si no Homer<span style=\"color: #ff0000;\">\"<br /> test2->Last := \"</span>Simpson<span style=\"color: #ff0000;\">\"<br /> test2->Age := 45<br /><br /> APPEND BLANK<br /> test2->First := \"</span>aaa Lara<span style=\"color: #ff0000;\">\"<br /> test2->Last := \"</span>Croft si no<span style=\"color: #ff0000;\">\"<br /> test2->Age := 32<br /><br /><br /> GO TOP<br /><br /> XBROWSER FASTEDIT<br /> DbCloseAll()<br /><br /><br /><br /><br />return nil<br /><br /> <br /><br /><br /></span></div>[/code:3akovahm]",
"time": "16:59",
"topic": "ADO RDD xHarbour",
"username": "lucasdebeltran"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-07",
"forum": "FiveWin for Harbour/xHarbour",
"text": "[quote=\"lucasdebeltran\":1j9uis2r]Antonio,\n\nDoes append blank and replace work?.\n\nIn my tests from last week once the aplication was closed, [b:1j9uis2r]data were lost[/b:1j9uis2r].\n\nAntonio L., please wait to the announcment.\n\nThank you.[/quote:1j9uis2r]\n\nLucas,\nThe problem is with transactions please check adorrd.prg and try inhibiting transactions or try issue dbcommit() and check if it is ok.\n\nReplace Im trying it seems to be ok.\n\n:AddNew() is disrupted not ok anymore! (append)\nThe reason is that in order to enable seek expression like we do normally I had to add one more field to the selects that is INDEXKEY.\n\nex:\nINDEX ON field1+field2+field3 TO xfile\nSET INDEX TO xfile\n\nwhen select\n\nSELECT *.xfile, (field1+field2+field3) AS INDEXKEY ORDER BY field1,field2,field3\nif the cursor is adUseClient INDEXKEY gets indexed by ADO.\n\nThis enable you to seek in any part of the seek key.\n\nDBSEEK( SPACE(LEN(field1))+\"whatever\")\n.or.\nDBSEEK(\"whatever\")\n\nNow because INDEXKEY does not really exists in the table when we call :addnew() we get error.\n\nIm trying to solve it.\nIts an ADO problem because with SQL INSERT works ok.\n\nMay be M Rao or Enrico can give us a hand?",
"time": "17:08",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-07",
"forum": "FiveWin for Harbour/xHarbour",
"text": "[quote=\"hmpaquito\":2dzn4e7i]Ahf and others: thanks and congratulations.\nI have saw announcement on xharbour forum but no on harbour forum.\nis adordd harbour/xharbour compatible ? Is it operative in production environment ?\n\nRegards[/quote:2dzn4e7i]\n\nadordd is harbour/xharbour compatible.\n\nThere are still for sure many bugs but what is most important its to understand if the approach that Im convinced will work with almost or even no code changes in apps.\nHaving as many people as possible trying will help to solve all the issues more rapidly.",
"time": "17:14",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-07",
"forum": "FiveWin for Harbour/xHarbour",
"text": "[quote:3smy6dlw]Having as many people as possible trying will help to solve all the issues more rapidly[/quote:3smy6dlw]\n\n+1",
"time": "17:33",
"topic": "ADO RDD xHarbour",
"username": "Antonio Linares"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-08",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio,\n\n[quote:qv7arj3m]:AddNew() is disrupted not ok anymore! (append)\nThe reason is that in order to enable seek expression like we do normally I had to add one more field to the selects that is INDEXKEY.\nNow because INDEXKEY does not really exists in the table when we call :addnew() we get error.\n\nIm trying to solve it.\nIts an ADO problem because with SQL INSERT works ok.\n\nMay be M Rao, Enrico can give us a hand?[/quote:qv7arj3m]\n\nI cannot find anywhere if this is a ADO limitation or if there is another way to do it!\nWith this would be much easy to adapt it to existing apps.",
"time": "10:23",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-08",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio,\n\nI have emailed Mr. Rao asking for his advice",
"time": "10:39",
"topic": "ADO RDD xHarbour",
"username": "Antonio Linares"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-08",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Buenas, seria bueno quitar todo referente a Fivewin, para que sea más fácil compilar.\nPor ejemplo, \n\n[code=fw:1ez7h47r]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\">#ifndef __XHARBOUR__<br /><br /> #xcommand <span style=\"color: #00C800;\">TRY</span> => BEGIN SEQUENCE WITH <span style=\"color: #000000;\">{</span>| oErr | <span style=\"color: #00C800;\">Break</span><span style=\"color: #000000;\">(</span> oErr <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">}</span><br /> #xcommand CATCH <span style=\"color: #000000;\">[</span><!oErr!><span style=\"color: #000000;\">]</span> => RECOVER <span style=\"color: #000000;\">[</span>USING <oErr><span style=\"color: #000000;\">]</span> <-oErr-><br /> #xcommand FINALLY => ALWAYS<br /> <br /> <span style=\"color: #00D7D7;\">#define</span> UR_FI_FLAGS <span style=\"color: #000000;\">6</span><br /> <span style=\"color: #00D7D7;\">#define</span> UR_FI_STEP <span style=\"color: #000000;\">7</span><br /> <span style=\"color: #00D7D7;\">#define</span> UR_FI_SIZE <span style=\"color: #000000;\">5</span> <span style=\"color: #B900B9;\">// by Lucas for Harbour</span><br /><br /><br />#endif<br /><br /><span style=\"color: #00C800;\">function</span> cValToChar<span style=\"color: #000000;\">(</span> u <span style=\"color: #000000;\">)</span>; <span style=\"color: #00C800;\">return</span> CStr<span style=\"color: #000000;\">(</span> u <span style=\"color: #000000;\">)</span><br /><span style=\"color: #00C800;\">function</span> <span style=\"color: #0000ff;\">MsgInfo</span><span style=\"color: #000000;\">(</span> u <span style=\"color: #000000;\">)</span> ; <span style=\"color: #00C800;\">return</span> Alert<span style=\"color: #000000;\">(</span> u <span style=\"color: #000000;\">)</span><br /><span style=\"color: #00C800;\">function</span> MsgAlert<span style=\"color: #000000;\">(</span> u <span style=\"color: #000000;\">)</span>; <span style=\"color: #00C800;\">return</span> Alert<span style=\"color: #000000;\">(</span> u <span style=\"color: #000000;\">)</span><br /><br /><span style=\"color: #00C800;\">function</span> cFilePath<span style=\"color: #000000;\">(</span> cPathMask <span style=\"color: #000000;\">)</span> <span style=\"color: #B900B9;\">// returns path of a filename</span><br /><br /> <span style=\"color: #00C800;\">local</span> n := RAt<span style=\"color: #000000;\">(</span> <span style=\"color: #ff0000;\">\"<span style=\"color: #000000;\">\\\"</span>, cPathMask ), cDisk<br /><br />return If( n > 0, Upper( Left( cPathMask, n ) ),;<br /> ( cDisk := cFileDisc( cPathMask ) ) + If( ! Empty( cDisk ), \"</span>\\<span style=\"color: #ff0000;\">\", \"</span><span style=\"color: #ff0000;\">\" ) )<br /><br />function cFileNoPath( cPathMask ) <br /><br /> local n := RAt( \"</span>\\<span style=\"color: #ff0000;\">\", cPathMask )<br /><br />return If( n > 0 .and. n < Len( cPathMask ),;<br /> Right( cPathMask, Len( cPathMask ) - n ),;<br /> If( ( n := At( \"</span>:<span style=\"color: #ff0000;\">\", cPathMask ) ) > 0,;<br /> Right( cPathMask, Len( cPathMask ) - n ),;<br /> cPathMask ) )<br /><br />function cFileNoExt( cPathMask ) // returns the filename without ext<br /><br /> local cName := AllTrim( cFileNoPath( cPathMask ) )<br /> local n := RAt( \"</span>.<span style=\"color: #ff0000;\">\", cName )<br /><br />return AllTrim( If( n > 0, Left( cName, n - 1 ), cName ) )<br /><br />function cFileDisc( cPathMask ) // returns drive of the path<br /><br />return If( At( \"</span>:<span style=\"color: #ff0000;\">\", cPathMask ) == 2, ;<br /> Upper( Left( cPathMask, 2 ) ), \"</span><span style=\"color: #ff0000;\">\" )<br /><br />#pragma BEGINDUMP<br />#include <hbapi.h><br /><br />HB_FUNC( LAND )<br />{<br /> hb_retl( ( hb_parnl( 1 ) & hb_parnl( 2 ) ) != 0 );<br />}<br /><br />#pragma ENDDUMP<br /></span></div>[/code:1ez7h47r]\n\n\nLucas, con harbour, en la linea 1621\n\n[code=fw:1ez7h47r]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"> <span style=\"color: #00C800;\">IF</span> TABLES_WITH_FIELD_HB_RECNO <br /> <span style=\"color: #B900B9;\">//create ado index only with adUseClient</span><br /> <span style=\"color: #00C800;\">IF</span> oRecordSet:<span style=\"color: #000000;\">CursorLocation</span> = adUseClient<br /> oRecordSet:<span style=\"color: #000000;\">Fields</span><span style=\"color: #000000;\">(</span> oRecordSet:<span style=\"color: #000000;\">Fields</span>:<span style=\"color: #0000ff;\">Count</span> <span style=\"color: #000000;\">-1</span> <span style=\"color: #000000;\">)</span>:<span style=\"color: #000000;\">Properties</span><span style=\"color: #000000;\">(</span><span style=\"color: #ff0000;\">\"Optimize\"</span><span style=\"color: #000000;\">)</span> := <span style=\"color: #000000;\">1</span> <span style=\"color: #B900B9;\">// AQUI CASCA!!</span><br /> <span style=\"color: #00C800;\">ENDIF</span><br /> <span style=\"color: #00C800;\">ENDIF</span> </div>[/code:1ez7h47r] \n\nEsto es lo que suelta, de momento\n\n[code=fw:1ez7h47r]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\">c:\\adotest>hbmk2 test.hbm<br />Harbour <span style=\"color: #000000;\">3.2</span>.0dev <span style=\"color: #000000;\">(</span>r1411121701<span style=\"color: #000000;\">)</span><br />Copyright <span style=\"color: #000000;\">(</span>c<span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">1999</span><span style=\"color: #000000;\">-2014</span>, http:<span style=\"color: #B900B9;\">//harbour-project.org/</span><br />Compiling <span style=\"color: #ff0000;\">'test.prg'</span>...<br />Lines <span style=\"color: #000000;\">377</span>, Functions/Procedures <span style=\"color: #000000;\">1</span><br />Generating C source output <span style=\"color: #0000ff;\">to</span> <span style=\"color: #ff0000;\">'C:<span style=\"color: #000000;\">\\U</span>sers<span style=\"color: #000000;\">\\r</span>afa<span style=\"color: #000000;\">\\A</span>ppData<span style=\"color: #000000;\">\\L</span>ocal<span style=\"color: #000000;\">\\T</span>emp<span style=\"color: #000000;\">\\h</span>bmk_st8wdm.dir<span style=\"color: #000000;\">\\t</span>est.c'</span>... Done.<br />Compiling <span style=\"color: #ff0000;\">'adordd.prg'</span>...<br />adordd.prg<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">1621</span><span style=\"color: #000000;\">)</span> Error E0022 Invalid lvalue <span style=\"color: #ff0000;\">':'</span></div>[/code:1ez7h47r]\n\nMi hbmk que uso;\n\n[code=fw:1ez7h47r]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\">hbblink.hbc<br />hbwin.hbc<br /><br />-lxhb -lgtwin -lgtwvg -lgtgui -lhbwin -lhbmisc -lhbxpp -lhbct <br />-ic:/programacion/harbour3/include;c:\\programacion\\harbour32\\contrib\\xhb<br /><br />-otest<br />-w0<br />-es1<br />-mt<br /><br />test.prg<br />adordd.prg</div>[/code:1ez7h47r]\n\nDe todas maneras, no funciona el test que me has enviado...\n\nC:\\adotest>test\n\nError WINOLE/1007 No se pudo encontrar el archivo 'C:\\programacion\\pms\\adordd\\test2.mdb'. (0x80004005ft JET Database Engine (DOS Error -2147352567)\nCalled from TOLEAUTO:OPEN(0)\nCalled from ADO_OPEN(232)\nCalled from DBUSEAREA(0)\nCalled from MAIN(18)\n\nMiraré por que no lo crea...\n\nSaludos Cordiales",
"time": "15:03",
"topic": "ADO RDD xHarbour",
"username": "thefull"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-08",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Uy, faltaba meterle un REQUEST HB_GT_WVT_DEFAULT para ver que hace\n\nMe dice que descomente esta linea ???\n\n // cSql := FW_AdoCreateTableSQL( cTableName, aWAData[ WA_SQLSTRUCT ], oConnection, .T. )\n // oConnection:Execute( cSql )\n\n¿ Pero esto depende de Fivewin ?\nSi es así, dejo las pruebas porque no tengo ese codigo o ¿ ese codigo es libre ?\n\nDejo el codigo sin dependencias de FW\n[code=fw:30dx4fv5]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">\"adordd.ch\"</span><br /><br />REQUEST HB_GT_WVT_DEFAULT<br /><br /><span style=\"color: #00C800;\">function</span> Main<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /><br /> <span style=\"color: #00C800;\">local</span> aArray := <span style=\"color: #000000;\">{</span><span style=\"color: #000000;\">}</span><br /><br /> rddsetdefault<span style=\"color: #000000;\">(</span> <span style=\"color: #ff0000;\">'ADORDD'</span> <span style=\"color: #000000;\">)</span> <span style=\"color: #B900B9;\">// Forzamos RDD por defecto de HARBOUR</span><br /><br /> <span style=\"color: #00C800;\">if</span> !file<span style=\"color: #000000;\">(</span> <span style=\"color: #ff0000;\">\"test2.mdb\"</span> <span style=\"color: #000000;\">)</span><br /> DbCreate<span style=\"color: #000000;\">(</span> <span style=\"color: #ff0000;\">\"test2.mdb;table1\"</span>, <span style=\"color: #000000;\">{</span> <span style=\"color: #000000;\">{</span> <span style=\"color: #ff0000;\">\"FIRST\"</span>, <span style=\"color: #ff0000;\">\"C\"</span>, <span style=\"color: #000000;\">30</span>, <span style=\"color: #000000;\">0</span> <span style=\"color: #000000;\">}</span>,;<br /> <span style=\"color: #000000;\">{</span> <span style=\"color: #ff0000;\">\"LAST\"</span>, <span style=\"color: #ff0000;\">\"C\"</span>, <span style=\"color: #000000;\">30</span>, <span style=\"color: #000000;\">0</span> <span style=\"color: #000000;\">}</span>,;<br /> <span style=\"color: #000000;\">{</span> <span style=\"color: #ff0000;\">\"AGE\"</span>, <span style=\"color: #ff0000;\">\"N\"</span>, <span style=\"color: #000000;\">8</span>, <span style=\"color: #000000;\">0</span> <span style=\"color: #000000;\">}</span> <span style=\"color: #000000;\">}</span>, <span style=\"color: #ff0000;\">\"ADORDD\"</span> <span style=\"color: #000000;\">)</span><br /><br /> <span style=\"color: #00C800;\">endif</span><br /><br /><br /><br /> USE test2.mdb VIA <span style=\"color: #ff0000;\">\"ADORDD\"</span> TABLE <span style=\"color: #ff0000;\">\"table1\"</span> <span style=\"color: #00C800;\">NEW</span><br /><br /> browse<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /><br /><br /> APPEND BLANK<br /> test2->First := <span style=\"color: #ff0000;\">\"HOMER si no Homer\"</span><br /> test2->Last := <span style=\"color: #ff0000;\">\"Simpson\"</span><br /> test2->Age := <span style=\"color: #000000;\">45</span><br /><br /> APPEND BLANK<br /> test2->First := <span style=\"color: #ff0000;\">\"aaa Lara\"</span><br /> test2->Last := <span style=\"color: #ff0000;\">\"Croft si no\"</span><br /> test2->Age := <span style=\"color: #000000;\">32</span><br /><br /><br /> GO TOP<br /><br /> browse<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /><br /><span style=\"color: #B900B9;\">// XBROWSER FASTEDIT</span><br /> DbCloseAll<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /><br /><span style=\"color: #00C800;\">return</span> <span style=\"color: #00C800;\">nil</span></div>[/code:30dx4fv5]\n\nSaludos Cordiales",
"time": "15:14",
"topic": "ADO RDD xHarbour",
"username": "thefull"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-08",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio,\n\n[quote=\"AHF\":hi9pr33p]May be M Rao or Enrico can give us a hand?[/quote:hi9pr33p]\n\nI could help but I need a reduced and self-contained sample showing the problem.\n\nEMG",
"time": "15:32",
"topic": "ADO RDD xHarbour",
"username": "Enrico Maria Giordano"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-08",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio,\n\nI cannot find the cause of this error:\n\n[quote:3sm3bidf]\nargumentos <nenhuma>\ndescrição Workarea not in use\nficheiro <nenhuma>\ngenCode 35: EG_NOTABLE\noperação ORDSETFOCUS\nosCode (Não é erro do sistema operativo)\nseverity 2\nsubCode 2001\nsubSystem DBCMD\ntries 0\nStack Calls\nProcedimentos / Metodos (linha)\n===============================\n Chamado de TDMDICHILD:FECHAMDI(558)\n Chamado de (b)ENCOMCLIENTES(207) //ACTIVATE WINDOW ... VALID owmdi1:FechaMdi(obrowse)\n Chamado de TDMDICHILD:END(0)\n Chamado de TDMDICHILD:SYSCOMMAND(0)\n Chamado de TWINDOW:HANDLEEVENT(0)\n Chamado de TDMDICHILD:HANDLEEVENT(0)\n Chamado de _FWH(0)\n Chamado de WINRUN(0)\n Chamado de TMDIFRAME:ACTIVATE(0)\n Chamado de MAIN(74)\n[/quote:3sm3bidf]\n\nThe FechaMdi(obrowse) only closes tables nothing else.\nWhen I close the table = oBrw:calias immediately error.\nThis code works many years ok with other rdds.\n\nDo you have any idea what can cause this error?",
"time": "15:35",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-08",
"forum": "FiveWin for Harbour/xHarbour",
"text": "[quote=\"Enrico Maria Giordano\":1a56wsk8]Antonio,\n\n[quote=\"AHF\":1a56wsk8]May be M Rao or Enrico can give us a hand?[/quote:1a56wsk8]\n\nI could help but I need a reduced and self-contained sample showing the problem.\n\nEMG[/quote:1a56wsk8]\n\nEnrico,\n\nA self contained code its difficult but the problem is:\n\nIn adordd accordingly with the index active the select is like this:\n\nSELECT encclist.*,(NRFACTUR+codcliente+CODIGOPROD+ARMAZEM) as indexkey FROM encclist ORDER BY NRFACTUR,codcliente,codigoprod,armazem\n\nWhere the indexkey is NRFACTUR+codcliente+CODIGOPROD+ARMAZEM.\n\nFrom this recordset we cannot call oRecordSet:AddNew() it gives error.\n\nIf we use instead a recordset ike:\n\nSELECT encclist.* FROM encclist ORDER BY NRFACTUR,codcliente,codigoprod,armazem\n\nThere inst any problem.\n\nIt will be impossible to add rows to the first recordset because of the aliase column?",
"time": "15:44",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-08",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio,\n\n[quote=\"AHF\":a0j5wefs]It will be impossible to add rows to the first recordset because of the aliase column?[/quote:a0j5wefs]\n\nNo, not for the aliased column but for the calculated column.\n\nEMG",
"time": "15:50",
"topic": "ADO RDD xHarbour",
"username": "Enrico Maria Giordano"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-08",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Enrico,\n\nDoes it means we could addnew specifying others columns except the calculated column or not even that.",
"time": "15:54",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-08",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio,\n\n[quote=\"AHF\":1afrr3p3]Enrico,\n\nDoes it means we could addnew specifying others columns except the calculated column or not even that.[/quote:1afrr3p3]\n\nI think that the entire recordset is readonly, but I'm not sure. Please try.\n\nEMG",
"time": "16:00",
"topic": "ADO RDD xHarbour",
"username": "Enrico Maria Giordano"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-08",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Enrico,\n\nThanks. Its read only.\n\nDo you know what can cause this?\n\n[quote:79ds2prc]I cannot find the cause of this error:\n\nQuote:\nargumentos <nenhuma>\ndescrição Workarea not in use\nficheiro <nenhuma>\ngenCode 35: EG_NOTABLE\noperação ORDSETFOCUS\nosCode (Não é erro do sistema operativo)\nseverity 2\nsubCode 2001\nsubSystem DBCMD\ntries 0\nStack Calls\nProcedimentos / Metodos (linha)\n===============================\nChamado de TDMDICHILD:FECHAMDI(558)\nChamado de (b)ENCOMCLIENTES(207) //ACTIVATE WINDOW ... VALID owmdi1:FechaMdi(obrowse)\nChamado de TDMDICHILD:END(0)\nChamado de TDMDICHILD:SYSCOMMAND(0)\nChamado de TWINDOW:HANDLEEVENT(0)\nChamado de TDMDICHILD:HANDLEEVENT(0)\nChamado de _FWH(0)\nChamado de WINRUN(0)\nChamado de TMDIFRAME:ACTIVATE(0)\nChamado de MAIN(74)\n\n\nThe FechaMdi(obrowse) only closes tables nothing else.\nWhen I close the table = oBrw:calias immediately error.\nThis code works many years ok with other rdds.\n\nDo you have any idea what can cause this error?[/quote:79ds2prc]",
"time": "16:14",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-08",
"forum": "FiveWin for Harbour/xHarbour",
"text": "[quote=\"AHF\":3bve0pxg]Antonio,\n\nI cannot find the cause of this error:\n\n[quote:3bve0pxg]\nargumentos <nenhuma>\ndescrição Workarea not in use\nficheiro <nenhuma>\ngenCode 35: EG_NOTABLE\noperação ORDSETFOCUS\nosCode (Não é erro do sistema operativo)\nseverity 2\nsubCode 2001\nsubSystem DBCMD\ntries 0\nStack Calls\nProcedimentos / Metodos (linha)\n===============================\n Chamado de TDMDICHILD:FECHAMDI(558)\n Chamado de (b)ENCOMCLIENTES(207) //ACTIVATE WINDOW ... VALID owmdi1:FechaMdi(obrowse)\n Chamado de TDMDICHILD:END(0)\n Chamado de TDMDICHILD:SYSCOMMAND(0)\n Chamado de TWINDOW:HANDLEEVENT(0)\n Chamado de TDMDICHILD:HANDLEEVENT(0)\n Chamado de _FWH(0)\n Chamado de WINRUN(0)\n Chamado de TMDIFRAME:ACTIVATE(0)\n Chamado de MAIN(74)\n[/quote:3bve0pxg]\n\nThe FechaMdi(obrowse) only closes tables nothing else.\nWhen I close the table = oBrw:calias immediately error.\nThis code works many years ok with other rdds.\n\nDo you have any idea what can cause this error?[/quote:3bve0pxg]\n\nIt seems as the workarea was already closed and after OrdSetFocus() was called",
"time": "17:26",
"topic": "ADO RDD xHarbour",
"username": "Antonio Linares"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-08",
"forum": "FiveWin for Harbour/xHarbour",
"text": "ahf,\n\nYou need to tracer where close nenhuma. Exit procedures, perhaps... timers...\n\nBTW, <nenhuma>, is bad filename, perhaps a sample...\n\n\nregards",
"time": "17:33",
"topic": "ADO RDD xHarbour",
"username": "hmpaquito"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-08",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio,\n\nWhy is subSystem DBCMD ? shouldnt be adordd?\n\nIve tested with msginfo in place I catch the exact point where error occurs and there is nothing there only close table saved in a var of an object.\n\nclose(::encomendas)\n::encomendas := nil\n\nImmediately get error. rdd Dbf or ADS ok for many years.\n\nIll try with debugger.\n\n\n\n\n\n\n\n\n <nenhuma> means none (no file).",
"time": "18:13",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-08",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Dear all,\n\nThe adordd its running quite well in the real world, but I'm still finding many bugs.\n\nThe main problem is accurate record positioning.\nThe only solution I could find is the table with a field AUTOINC HBRECNO.\nI cant find another solution. Any ideas?\n\nThe code its already prepared to both situations but be advise that without this new field can't run exactly the same app code. The adordd can work also with bookmarks if supported otherwise absoluteposition.\n\nPlease remember that changing index order and seeking more than one field in the expression will build a new recordset thus situations like described below are probably impossible without field HBRECNO.\n\nex1\n\nnrec := recno() //actual recordset\nset order to anther order //new recordset\ngo to nrec // only by pure luck it results because nrec refers to previous recordset.\n\nex2\n\nnrec := recno() //actual recordset\nseek \" 123\" // index expression filed1 len(3) field2 len(5) 2 field in seek exp means new recordset with\n where clause.\ndo while ....\n....\n skip\nenddo\nresetseek() //returning to previous recordset\n\ngo to nreg //it might work if we save and restore previous set otherwise it not guaranteed.\n\nBesides this it seems that all navigation,relations, seek, find,adding records and updating through the recordset its close to an end. <!-- s:D --><img src=\"{SMILIES_PATH}/icon_biggrin.gif\" alt=\":D\" title=\"Very Happy\" /><!-- s:D --> \n\nNow my main problem its translate locate expressions like year(field->datedoc) > year(date()).\n\nIll post last version today.",
"time": "18:40",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-08",
"forum": "FiveWin for Harbour/xHarbour",
"text": "New adordd version posted <!-- m --><a class=\"postlink\" href=\"https://github.com/AHFERREIRA/adordd.git\">https://github.com/AHFERREIRA/adordd.git</a><!-- m -->",
"time": "19:22",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-08",
"forum": "FiveWin for Harbour/xHarbour",
"text": "[quote=\"lucasdebeltran\":2uparlvj]Antonio,\n\nDoes append blank and replace work?.\n\nIn my tests from last week once the aplication was closed, [b:2uparlvj]data were lost[/b:2uparlvj].\n\nAntonio L., please wait to the announcment.\n\nThank you.[/quote:2uparlvj]\n\nLucas,\n\ndbappend work and Replaces work ate least here.",
"time": "19:28",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-08",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio,\n\n[quote=\"AHF\"]Antonio,\n\nWhy is subSystem DBCMD ? shouldnt be adordd?[/code]\n\nCan you check is this correct?",
"time": "19:30",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-08",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio,\n\n[quote=\"AHF\":2ncjx2p3]The main problem is accurate record positioning.\nThe only solution I could find is the table with a field AUTOINC HBRECNO.\nI cant find another solution. Any ideas?[/quote:2ncjx2p3]\n\nYes, the only solution is adding an autoincrement field (for record identity). And by the way, it's good practice (if not mandatory) to have it in a SQL table.\n\nEMG",
"time": "20:10",
"topic": "ADO RDD xHarbour",
"username": "Enrico Maria Giordano"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-08",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio,\n\n[quote=\"AHF\":2sg9eaeg]Why is subSystem DBCMD ? shouldnt be adordd?[/quote:2sg9eaeg]\n\nNo, DBCMD is for generic database error.\n\nEMG",
"time": "20:11",
"topic": "ADO RDD xHarbour",
"username": "Enrico Maria Giordano"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-08",
"forum": "FiveWin for Harbour/xHarbour",
"text": "[quote=\"Enrico Maria Giordano\":37rdhqht] \nAnd by the way, it's good practice (if not mandatory) to have it in a SQL table.[/quote:37rdhqht]\n\nEnrico,\n\nWhat do you mean ?",
"time": "21:34",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-08",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio,\n\n[quote=\"AHF\":1qi17ggr][quote=\"Enrico Maria Giordano\":1qi17ggr] \nAnd by the way, it's good practice (if not mandatory) to have it in a SQL table.[/quote:1qi17ggr]\n\nEnrico,\n\nWhat do you mean ?[/quote:1qi17ggr]\n\nYou should have an autoincrement field in each table in a SQL database. It's required for record identity.\n\nEMG",
"time": "22:16",
"topic": "ADO RDD xHarbour",
"username": "Enrico Maria Giordano"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-08",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Enrico,\n\nOk thats what adordd expects.\n\nDo you have the same field name in every table?",
"time": "22:31",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-08",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio,\n\n[quote=\"AHF\":1q69pndn]Enrico,\n\nOk thats what adordd expects.\n\nDo you have the same field name in every table?[/quote:1q69pndn]\n\nThis is your choice. I use \"ID\" but you may prefer \"something\" + tablename so you won't have problems with the queries.\n\nEMG",
"time": "22:43",
"topic": "ADO RDD xHarbour",
"username": "Enrico Maria Giordano"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-09",
"forum": "FiveWin for Harbour/xHarbour",
"text": "[quote:2timkq9p]This is your choice. I use \"ID\" but you may prefer \"something\" + tablename so you won't have problems with the queries.[/quote:2timkq9p]\n\nWhich problems ?\nIMHO Its seems what same field for all tables is a more clear solution. (hbrecno)",
"time": "08:25",
"topic": "ADO RDD xHarbour",
"username": "hmpaquito"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-09",
"forum": "FiveWin for Harbour/xHarbour",
"text": "hmpaquito,\n\nThe problem is that there might be users with some \"id\" autoinc field already in some tables thus adordd should use it and not force them to create a new field.\n\nAntonio,\n\nDo you agree ? Lets give the option to the programmer?\n\nEither a default field name for all tables or a diferent field for each table",
"time": "08:58",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-09",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio,\n\nMaybe the solution is to check if such field with those properties exist and if not, then create hbrecno.\n\nNot sure if both can co exist with no problems.",
"time": "09:00",
"topic": "ADO RDD xHarbour",
"username": "Antonio Linares"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-09",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio,\n\nI think adordd should not be able to create new tables. \nFrom my experience in our clients we cannot. Thats to DBadmin.\nSometimes other apps use the same DB and one cannot alter any struct indexes whatever.\nBesides that there are functions already for that propose so users can work directly with it.\n\nMy approach for adordd would be place in the start of app :\n\n[code=fw:3uuvensq]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /><br />SET ADO TABLES <span style=\"color: #0000ff;\">INDEX</span> LIST <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #000000;\">{</span> <span style=\"color: #000000;\">{</span><span style=\"color: #ff0000;\">\"SECTOR\"</span>,<span style=\"color: #000000;\">{</span><span style=\"color: #ff0000;\">\"SECTOR\"</span>,<span style=\"color: #ff0000;\">\"SECTORES\"</span><span style=\"color: #000000;\">}</span> <span style=\"color: #000000;\">}</span>,;<br /> <span style=\"color: #000000;\">{</span><span style=\"color: #ff0000;\">\"CCLIENTE\"</span>,<span style=\"color: #000000;\">{</span><span style=\"color: #ff0000;\">\"COD_CLI\"</span>,<span style=\"color: #ff0000;\">\"CODCLIENTE\"</span><span style=\"color: #000000;\">}</span>,;<br /> <span style=\"color: #000000;\">{</span><span style=\"color: #ff0000;\">\"CLIENTE\"</span>,<span style=\"color: #ff0000;\">\"NOME\"</span><span style=\"color: #000000;\">}</span>,<span style=\"color: #000000;\">{</span><span style=\"color: #ff0000;\">\"CTEMP2\"</span>,<span style=\"color: #ff0000;\">\"VENDEDOR,SECTOR,CODCLIENTE\"</span><span style=\"color: #000000;\">}</span> <span style=\"color: #000000;\">}</span> <span style=\"color: #000000;\">}</span> <br /> <br /> SET ADO TEMPORAY NAMES <span style=\"color: #0000ff;\">INDEX</span> LIST <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #000000;\">{</span><span style=\"color: #ff0000;\">\"TMP\"</span>,<span style=\"color: #ff0000;\">\"TEMP\"</span><span style=\"color: #000000;\">}</span><br /><br /> SET ADO FIELD RECNO TABLES LIST <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #000000;\">{</span><span style=\"color: #000000;\">{</span><span style=\"color: #ff0000;\">\"ENCCLIST\"</span>,<span style=\"color: #ff0000;\">\"ID\"</span><span style=\"color: #000000;\">}</span>,<span style=\"color: #000000;\">{</span><span style=\"color: #ff0000;\">\"FACTURAS\"</span>,<span style=\"color: #ff0000;\">\"IDRECNO\"</span><span style=\"color: #000000;\">}</span><span style=\"color: #000000;\">}</span><br /><br /> SET ADO <span style=\"color: #00C800;\">DEFAULT</span> FIELD RECNO <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #ff0000;\">\"HBRECNO\"</span><br /><br /> </div>[/code:3uuvensq]\n\nI Think this is flexible enough to allow all situations and not assuming wrong fields.\n\nAgree?",
"time": "09:33",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-09",
"forum": "FiveWin for Harbour/xHarbour",
"text": "ahf,\n\n[quote=\"AHF\":3k0yoaag]\n[code=fw:3k0yoaag]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /><br />SET ADO TABLES <span style=\"color: #0000ff;\">INDEX</span> LIST <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #000000;\">{</span> <span style=\"color: #000000;\">{</span><span style=\"color: #ff0000;\">\"SECTOR\"</span>,<span style=\"color: #000000;\">{</span><span style=\"color: #ff0000;\">\"SECTOR\"</span>,<span style=\"color: #ff0000;\">\"SECTORES\"</span><span style=\"color: #000000;\">}</span> <span style=\"color: #000000;\">}</span>,;<br /> <span style=\"color: #000000;\">{</span><span style=\"color: #ff0000;\">\"CCLIENTE\"</span>,<span style=\"color: #000000;\">{</span><span style=\"color: #ff0000;\">\"COD_CLI\"</span>,<span style=\"color: #ff0000;\">\"CODCLIENTE\"</span><span style=\"color: #000000;\">}</span>,;<br /> <span style=\"color: #000000;\">{</span><span style=\"color: #ff0000;\">\"CLIENTE\"</span>,<span style=\"color: #ff0000;\">\"NOME\"</span><span style=\"color: #000000;\">}</span>,<span style=\"color: #000000;\">{</span><span style=\"color: #ff0000;\">\"CTEMP2\"</span>,<span style=\"color: #ff0000;\">\"VENDEDOR,SECTOR,CODCLIENTE\"</span><span style=\"color: #000000;\">}</span> <span style=\"color: #000000;\">}</span> <span style=\"color: #000000;\">}</span> <br /> <br /> SET ADO FIELD RECNO TABLES LIST <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #000000;\">{</span><span style=\"color: #000000;\">{</span><span style=\"color: #ff0000;\">\"ENCCLIST\"</span>,<span style=\"color: #ff0000;\">\"ID\"</span><span style=\"color: #000000;\">}</span>,<span style=\"color: #000000;\">{</span><span style=\"color: #ff0000;\">\"FACTURAS\"</span>,<span style=\"color: #ff0000;\">\"IDRECNO\"</span><span style=\"color: #000000;\">}</span><span style=\"color: #000000;\">}</span><br /><br /> SET ADO <span style=\"color: #00C800;\">DEFAULT</span> FIELD RECNO <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #ff0000;\">\"HBRECNO\"</span><br /><br /> </div>[/code:3k0yoaag]\n\n[/quote:3k0yoaag]\n\n\nI think these global variables or sets should be configured by database and not by application. An application can open multiple databases.",
"time": "10:28",
"topic": "ADO RDD xHarbour",
"username": "hmpaquito"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-09",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio,\n\n[quote=\"hmpaquito\":1pdv76q0][quote:1pdv76q0]This is your choice. I use \"ID\" but you may prefer \"something\" + tablename so you won't have problems with the queries.[/quote:1pdv76q0]\n\nWhich problems ?\nIMHO Its seems what same field for all tables is a more clear solution. (hbrecno)[/quote:1pdv76q0]\n\nProblem with joins. In a join you can't have field with same name from different tables so you have to use AS clause.\n\nEMG",
"time": "11:02",
"topic": "ADO RDD xHarbour",
"username": "Enrico Maria Giordano"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-09",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Enrico,\n\nThats true. But thats to the DB admin and the app developer to define.\n\nadordd should cover any situation so I think the best way is to let to the developer define those in the previous sets.\n\nWont you agree or do you have a better way?",
"time": "11:10",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-09",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Hello,\n\nI have not been able to test latter versions due to a lack of time.\n\nI think we should use always HBRECNO, as it´s not a common field name like ID, which is the one I use. In fact, SQLRDD from xHarbour.com uses a private field for such purpouses.\n\nI also think ADORDD should be able to create \"tables\", with dbcreate.\n\nIn fact, to achieve the equal behaviour as DBFCDX, index auto open should be present.\n\nAnd the user should [b:14nf5l8x]only do two little changes[/b:14nf5l8x]:\n\nDefine at FUNCTION ListIndex() the indexes. They will be opened with SET INDEX TO INDEX1, INDEX2, INDEX3... if SET AUTOPEN is OFF.\n\nDefine globally with a SetUp ADORDD function the RBDM type (Access, MSSQL, MySQL..), the server, the user name, the password to connect and the database name. \n\nThat´s all.\n\nDbCreate now needs to pass some extra parameeters with ;. Once the above function is created, DBcreate should work as ordinary in DBFCDX:\n\n[code=fw:14nf5l8x]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\">DbCreate<span style=\"color: #000000;\">(</span> <cDatabase> , ;<br /> <aStructure>, ;<br /> <span style=\"color: #000000;\">[</span><cDriver><span style=\"color: #000000;\">]</span> , ;<br /> <span style=\"color: #000000;\">[</span><lNewArea><span style=\"color: #000000;\">]</span> , ;<br /> <span style=\"color: #000000;\">[</span><cAlias><span style=\"color: #000000;\">]</span> <span style=\"color: #000000;\">)</span> --> <span style=\"color: #00C800;\">NIL</span><br /> </div>[/code:14nf5l8x]\n\nThank you.",
"time": "11:12",
"topic": "ADO RDD xHarbour",
"username": "lucasdebeltran"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-09",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Sorry, it´s not working.\n\nTest simple:\n\n[code=fw:2pytclpz]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">\"fivewin.ch\"</span><br /><br /><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">\"adordd<span style=\"color: #000000;\">\\a</span>dordd.ch\"</span><br /><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">\"adordd<span style=\"color: #000000;\">\\a</span>dordd.prg\"</span><br /><br /><br />REQUEST ADORDD<br /><br /><span style=\"color: #00C800;\">function</span> Main<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /><br /> <span style=\"color: #00C800;\">local</span> aArray := <span style=\"color: #000000;\">{</span><span style=\"color: #000000;\">}</span><br /><br /><br /> RDDSETDEFAULT<span style=\"color: #000000;\">(</span> <span style=\"color: #ff0000;\">\"ADORDD\"</span> <span style=\"color: #000000;\">)</span><br /><br /><br /> <span style=\"color: #00C800;\">IF</span> !FILE<span style=\"color: #000000;\">(</span> <span style=\"color: #ff0000;\">\"test2.mdb\"</span> <span style=\"color: #000000;\">)</span><br /><br /> DbCreate<span style=\"color: #000000;\">(</span> <span style=\"color: #ff0000;\">\"test2.mdb;table1\"</span>, <span style=\"color: #000000;\">{</span> <span style=\"color: #000000;\">{</span> <span style=\"color: #ff0000;\">\"FIRST\"</span>, <span style=\"color: #ff0000;\">\"C\"</span>, <span style=\"color: #000000;\">30</span>, <span style=\"color: #000000;\">0</span> <span style=\"color: #000000;\">}</span>,;<br /> <span style=\"color: #000000;\">{</span> <span style=\"color: #ff0000;\">\"LAST\"</span>, <span style=\"color: #ff0000;\">\"C\"</span>, <span style=\"color: #000000;\">30</span>, <span style=\"color: #000000;\">0</span> <span style=\"color: #000000;\">}</span>,;<br /> <span style=\"color: #000000;\">{</span> <span style=\"color: #ff0000;\">\"AGE\"</span>, <span style=\"color: #ff0000;\">\"N\"</span>, <span style=\"color: #000000;\">8</span>, <span style=\"color: #000000;\">0</span> <span style=\"color: #000000;\">}</span> <span style=\"color: #000000;\">}</span>, <span style=\"color: #ff0000;\">\"ADORDD\"</span> <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00C800;\">ENDIF</span><br /><br /><br /> USE test2.mdb VIA <span style=\"color: #ff0000;\">\"ADORDD\"</span> TABLE <span style=\"color: #ff0000;\">\"table1\"</span> <span style=\"color: #00C800;\">NEW</span> <span style=\"color: #0000ff;\">ALIAS</span> <span style=\"color: #ff0000;\">\"TEST2\"</span><br /><br /> XBROWSER FASTEDIT<br /><br /><br /> APPEND BLANK<br /> test2->First := <span style=\"color: #ff0000;\">\"HOMER si no Homer\"</span><br /> test2->Last := <span style=\"color: #ff0000;\">\"Simpson\"</span><br /> test2->Age := <span style=\"color: #000000;\">45</span><br /><br /> APPEND BLANK<br /> test2->First := <span style=\"color: #ff0000;\">\"aaa Lara\"</span><br /> test2->Last := <span style=\"color: #ff0000;\">\"Croft si no\"</span><br /> test2->Age := <span style=\"color: #000000;\">32</span><br /><br /><br /> GO TOP<br /><br /> <span style=\"color: #0000ff;\">xBrowse</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /> DbCloseAll<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /><br /><br /><br /><br /><span style=\"color: #00C800;\">return</span> <span style=\"color: #00C800;\">nil</span><br /><br /><br /> </div>[/code:2pytclpz]",
"time": "11:33",
"topic": "ADO RDD xHarbour",
"username": "lucasdebeltran"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-09",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Lucas,\n\n[quote:38isdix2]I think we should use always HBRECNO, as it´s not a common field name like ID, which is the one I use. In fact, SQLRDD from xHarbour.com uses a private field for such purpouses.\n[/quote:38isdix2]\n\nI choose to give this to the developer. Please see my previous post about SET...\n\n[quote:38isdix2]I also think ADORDD should be able to create \"tables\", with dbcreate.[/quote:38isdix2]\n\n You can.\n\n[quote:38isdix2]In fact, to achieve the equal behaviour as DBFCDX, index auto open should be present.[/quote:38isdix2]\n\nIt is working.\n\n[quote:38isdix2]Define at FUNCTION ListIndex() the indexes. They will be opened with SET INDEX TO INDEX1, INDEX2, INDEX3... if SET AUTOPEN is OFF.[/quote:38isdix2]\n\nAUTO OPEN and SET AUTOORDER should be working.\n\n[quote:38isdix2]Define globally with a SetUp ADORDD function the RBDM type (Access, MSSQL, MySQL..), the server, the user name, the password to connect and the database name. [/quote:38isdix2]\n\nCan you supply code?\n\n[quote:38isdix2]DbCreate now needs to pass some extra parameeters with ;. Once the above function is created, DBcreate should work as ordinary in DBFCDX:[/quote:38isdix2]\n\nWhat do you mean?\n\n[quote:38isdix2]Sorry, it´s not working.\n\nTest simple:\n\nCode:\n\n#include \"fivewin.ch\"\n\n#include \"adordd\\adordd.ch\"\n#include \"adordd\\adordd.prg\"\n[/quote:38isdix2]\n\nWhats the error ? and Whats the version?",
"time": "11:48",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-09",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Hello,\n\nXBROWSER FASTEDIT\n\n[quote:alm8os5u]\nError description: Error BASE/1068 Argument error: array access\n Args:\n [ 1] = U \n [ 2] = N 1\n\nStack Calls\n===========\n Called from: lucas.prg => (b)ADO_INDEXAUTOOPEN( 1269 )\n Called from: => ASCAN( 0 )\n Called from: lucas.prg => ADO_INDEXAUTOOPEN( 1269 )\n Called from: lucas.prg => ADO_OPEN( 382 )\n Called from: => DBUSEAREA( 0 )\n Called from: lucas.prg => MAIN( 31 )\n[/quote:alm8os5u]",
"time": "19:08",
"topic": "ADO RDD xHarbour",
"username": "lucasdebeltran"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-09",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Next, I SET AUTOPEN OFF:\n\n[quote:1aix0ufl]\n\n Error description: Error BASE/1075 Argument error: >\n Args:\n [ 1] = N 1\n [ 2] = C \n\nStack Calls\n===========\n Called from: .\\source\\classes\\DATABASE.PRG => ORDERTAGINFO( 1258 )\n Called from: .\\source\\classes\\XBROWSE.PRG => TXBROWSE:SETRDD( 4135 )\n Called from: .\\source\\classes\\XBROWSE.PRG => XBRWSETDATASOURCE( 13030 )\n Called from: .\\source\\function\\XBROWSER.PRG => XBROWSE( 112 )\n Called from: lucas.prg => MAIN( 35 )\n[/quote:1aix0ufl]",
"time": "19:09",
"topic": "ADO RDD xHarbour",
"username": "lucasdebeltran"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-09",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Lucas,\n\nI dont know the error. Have you check if index table and names are correct\nWas it working in a previous version?\n\n[quote:35vzy7bc]Called from: .\\source\\classes\\DATABASE.PRG => ORDERTAGINFO( 1258 )[/quote:35vzy7bc]\nWhat is that function line doing ?\n\nI hope to post soon today new version that seems to have all these resolved",
"time": "19:36",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-09",
"forum": "FiveWin for Harbour/xHarbour",
"text": "[code=fw:lid93e3o]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><span style=\"color: #00C800;\">function</span> OrderTagInfo<span style=\"color: #000000;\">(</span> aStruct, nCol <span style=\"color: #000000;\">)</span><br /><br /> <span style=\"color: #00C800;\">local</span> nFor, nAt, i, nOrders, aTokens, lCond, aCond, aPos<br /><br /> <span style=\"color: #00C800;\">DEFAULT</span> aStruct := DbStruct<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span>, ;<br /> nCol := DBS_TAG<br /><br /> aCond := Array<span style=\"color: #000000;\">(</span> Len<span style=\"color: #000000;\">(</span> aStruct <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>; AFill<span style=\"color: #000000;\">(</span> aCond, .f. <span style=\"color: #000000;\">)</span><br /> aPos := Array<span style=\"color: #000000;\">(</span> Len<span style=\"color: #000000;\">(</span> aStruct <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>; AFill<span style=\"color: #000000;\">(</span> aPos, <span style=\"color: #000000;\">0</span> <span style=\"color: #000000;\">)</span><br /><br /> <span style=\"color: #00C800;\">for</span> nFor := <span style=\"color: #000000;\">1</span> <span style=\"color: #0000ff;\">to</span> Len<span style=\"color: #000000;\">(</span> aStruct <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00C800;\">if</span> Len<span style=\"color: #000000;\">(</span> aStruct<span style=\"color: #000000;\">[</span> nFor <span style=\"color: #000000;\">]</span> <span style=\"color: #000000;\">)</span> < nCol<br /> ASize<span style=\"color: #000000;\">(</span> aStruct<span style=\"color: #000000;\">[</span> nFor <span style=\"color: #000000;\">]</span>, nCol <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00C800;\">endif</span><br /> <span style=\"color: #00C800;\">next</span> nFor<br /><br /> nOrders := OrdCount<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00C800;\">for</span> nFor := <span style=\"color: #000000;\">1</span> <span style=\"color: #0000ff;\">to</span> nOrders<br /><br /> lCond := ! Empty<span style=\"color: #000000;\">(</span> OrdFor<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span><br /><br /> aTokens := GetTokens<span style=\"color: #000000;\">(</span> OrdKey<span style=\"color: #000000;\">(</span> nFor <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00C800;\">for</span> i := <span style=\"color: #000000;\">1</span> <span style=\"color: #0000ff;\">to</span> Len<span style=\"color: #000000;\">(</span> aTokens <span style=\"color: #000000;\">)</span><br /> nAt := AScan<span style=\"color: #000000;\">(</span> aStruct, <span style=\"color: #000000;\">{</span> |aFld| aFld<span style=\"color: #000000;\">[</span> <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">]</span> == aTokens<span style=\"color: #000000;\">[</span> i <span style=\"color: #000000;\">]</span> <span style=\"color: #000000;\">}</span> <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00C800;\">if</span> nAt > <span style=\"color: #000000;\">0</span><br /> <span style=\"color: #00C800;\">if</span> aStruct<span style=\"color: #000000;\">[</span> nAt <span style=\"color: #000000;\">]</span><span style=\"color: #000000;\">[</span> nCol <span style=\"color: #000000;\">]</span> == <span style=\"color: #00C800;\">nil</span> .or. <span style=\"color: #000000;\">(</span> aCond<span style=\"color: #000000;\">[</span> nAt <span style=\"color: #000000;\">]</span> .and. ! lCond <span style=\"color: #000000;\">)</span> .or. ;<br /> <span style=\"color: #000000;\">(</span> aPos<span style=\"color: #000000;\">[</span> nAt <span style=\"color: #000000;\">]</span> > i <span style=\"color: #000000;\">)</span><br /> aStruct<span style=\"color: #000000;\">[</span> nAt <span style=\"color: #000000;\">]</span><span style=\"color: #000000;\">[</span> nCol <span style=\"color: #000000;\">]</span> := Upper<span style=\"color: #000000;\">(</span> OrdName<span style=\"color: #000000;\">(</span> nFor <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span><br /> aCond<span style=\"color: #000000;\">[</span> nAt <span style=\"color: #000000;\">]</span> := lCond<br /> aPos<span style=\"color: #000000;\">[</span> nAt <span style=\"color: #000000;\">]</span> := i<br /> <span style=\"color: #00C800;\">endif</span><br /> EXIT<br /> <span style=\"color: #00C800;\">endif</span><br /> <span style=\"color: #00C800;\">next</span> i<br /><br /> <span style=\"color: #00C800;\">next</span> nFor<br /><br /><span style=\"color: #00C800;\">return</span> aStruct<br /> </div>[/code:lid93e3o]\n\n\nError is at OrdCount():\n\n nOrders := OrdCount()\n for nFor := 1 to nOrders",
"time": "19:42",
"topic": "ADO RDD xHarbour",
"username": "lucasdebeltran"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-09",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Lucas,\n\nYou dont have open indexes right ?",
"time": "20:28",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-09",
"forum": "FiveWin for Harbour/xHarbour",
"text": "No.",
"time": "20:55",
"topic": "ADO RDD xHarbour",
"username": "lucasdebeltran"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-10",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio, Enrico,\n\nHow can we show or hide deleted records in ADO?\n\nHow can we enforce SET DELETED?",
"time": "10:23",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-10",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio,\n\n[quote=\"AHF\":3hkwsvkt]Antonio, Enrico,\n\nHow can we show or hide deleted records in ADO?\n\nHow can we enforce SET DELETED?[/quote:3hkwsvkt]\n\nAs far as I know, there is no direct support for deleted records in SQL. You have to add a logical field and use it in WHERE clauses, I'm afraid.\n\nEMG",
"time": "10:41",
"topic": "ADO RDD xHarbour",
"username": "Enrico Maria Giordano"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-10",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Perhaps a first version of ADORDD no need to treat the deleted records because generally all have SET DELETED ON at the beginning of our programs",
"time": "10:51",
"topic": "ADO RDD xHarbour",
"username": "hmpaquito"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-10",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Enrico,\n\nIn fact this is not a problem because deleting records in SQL will wipe records off the table and we cannot recover them again. Is this true for all DB Sql ?",
"time": "11:19",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-10",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio,\n\n[quote=\"AHF\":iahikai4]Enrico,\n\nIn fact this is not a problem because deleting records in SQL will wipe records off the table and we cannot recover them again. Is this true for all DB Sql ?[/quote:iahikai4]\n\nI don't know but we have to make it \"database aware\", haven't we?\n\nEMG",
"time": "11:41",
"topic": "ADO RDD xHarbour",
"username": "Enrico Maria Giordano"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-10",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Enrico,\n\nDo you mean mark a record as deleted with truly deleted in SQL using a delete field in the tables?\n\nIn dbf apps we have to pack to clean it and some kind of recycle to recover it when adding records.\nIf we truly delete it nothing else mus be done. Although recall and pack exists in adordd but do nothing.\n\nThe trials we ae running with our app there is no problem but maybe others have a different approach.\n\nIs it worth to do it ? \nWhat do you think ?",
"time": "12:13",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-10",
"forum": "FiveWin for Harbour/xHarbour",
"text": "The only drawback I see is this case:\n\n[code=fw:1ev9mbpo]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\">nRec: = RecNo<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br />DELETE<br /><br />GO nRec <span style=\"color: #B900B9;\">// Ok dbf. ADO Fail</span></div>[/code:1ev9mbpo]\n\n \nMy opinion: will be few occasions or applications that this circumstance. At the moment I do not think it worthwhile to consider it. Perhaps ADORDD v2.00",
"time": "12:30",
"topic": "ADO RDD xHarbour",
"username": "hmpaquito"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-10",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio,\n\n[quote=\"AHF\":ytv53x7p]Enrico,\n\nDo you mean mark a record as deleted with truly deleted in SQL using a delete field in the tables?[/quote:ytv53x7p]\n\nYes.\n\n[quote=\"AHF\":ytv53x7p]In dbf apps we have to pack to clean it and some kind of recycle to recover it when adding records.\nIf we truly delete it nothing else mus be done. Although recall and pack exists in adordd but do nothing.\n\nThe trials we ae running with our app there is no problem but maybe others have a different approach.\n\nIs it worth to do it ? \nWhat do you think ?[/quote:ytv53x7p]\n\nNo, it's not worthwhile. <!-- s:-) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":-)\" title=\"Smile\" /><!-- s:-) -->\n\nEMG",
"time": "12:51",
"topic": "ADO RDD xHarbour",
"username": "Enrico Maria Giordano"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-10",
"forum": "FiveWin for Harbour/xHarbour",
"text": "To All\n\nI think each RDMS handles deleted records a bit differently .. As in all Sql Databases, when a record is Deleted, it just drops off the 'radar' and there is no need to even worry about it or even to 'Recall' it .. I do not even think you can get it back unless you use some sort of 'roll back' technique.\n\nI will say this .. it is obvious with Ms Access, that the size of the database DOES NOT decrease when you have deleted records so they still must be there, but are just not accessible, hence why you have to Compact and Repair the database from time to time. And, my guess when DBA's tune their MS Sql and Oracles of the world, deleted records are purged during that process.\n\nIn any case .. in my experience as a developer with Sql databases .. once a record is deleted, you might as well forget about it and 'Setting Deleted (On or Off )' is irrelevant.\n\nRick Lipkin",
"time": "13:42",
"topic": "ADO RDD xHarbour",
"username": "Rick Lipkin"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-10",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Rick,\n\nThanks for the info.\n\nInside transactions if it fails everything rolled back, but its the only situation I can find where his happens.\n\nAre you trying adordd. All feed back its a great help.\n\nIm trying it for a big app conversion and browses with relations run without any code change except a autoinc field to use for recno().",
"time": "15:14",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-10",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Is possible get library for Borland C 5.5 ? \nToday, direct from Harbour, is imposible make this library.\n\nRegards\n\nO te pago una cerveza si lo consigues... <!-- s;-) --><img src=\"{SMILIES_PATH}/icon_wink.gif\" alt=\";-)\" title=\"Wink\" /><!-- s;-) -->",
"time": "16:02",
"topic": "ADO RDD xHarbour",
"username": "thefull"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-10",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio\n\nI use the ADO Class and methods to create recordsets to manage SQL.. and creating separate recordsets based on the primary key and the foreign key or a single recordset based on inner and outer joins.. not necessarily like we used to with .Dbf.\n\nI am watching this thread with interest.\n\nRick Lipkin",
"time": "17:01",
"topic": "ADO RDD xHarbour",
"username": "Rick Lipkin"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-10",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Rick,\n\nThats the SQL normal way.\n\nUnfortunately we would get only one recordset (joined) and to simulate Dbf behavior and working with already written apps that's not possible because it breaks completely the code.\n\nThus I'm working with true relations issuing SELECTS for each child only if key changes. \nThe speed suffers but its completely acceptable.\nI'm converting a big app and till now in browses didn't need to change a single line of code!\nWe have indexes, scopes, seeks, relations, filters (translated to Selets) using exactly the same app source code. \n\nTake a look at the adordd.\n\nYour comments and ideas would be most welcome.\n\nIll post new version with lot of bugs corrected tomorrow morning.\nThe actual posted version has been much modified and is very outdated.",
"time": "18:18",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-10",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio,\n\n[quote:1g0wrn9i]I'm converting a big app and till now in browses didn't need to change a single line of code![/quote:1g0wrn9i]\n\nWonderful! <!-- s:-) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":-)\" title=\"Smile\" /><!-- s:-) -->",
"time": "20:38",
"topic": "ADO RDD xHarbour",
"username": "Antonio Linares"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-12",
"forum": "FiveWin for Harbour/xHarbour",
"text": "with translate.google.com\n\ngreat initiative\n\n1. They give the ultimate solution database engine ... update with trend data management\n2. For those who have SQLRDD of xharbour.com ... could go with fwh + harbor + ADORDD\n3. Invite colleagues who have some kind of rdd ( mysql , dhs, etc ) ,,, to join efforts towards common product and very comprehensive\n4. Would give an identity to products: Fivewin SQL , fiveTouch and fiveWeb .. excellent working tool\n5. We could think of a contribution to encourage this development , much like the QT project or EasyReport\n\nGreetings ...\n\nJohnson Russi\nColombia",
"time": "17:52",
"topic": "ADO RDD xHarbour",
"username": "russimicro"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-12",
"forum": "FiveWin for Harbour/xHarbour",
"text": "New version of adordd at <!-- m --><a class=\"postlink\" href=\"https://github.com/AHFERREIRA/adordd.git\">https://github.com/AHFERREIRA/adordd.git</a><!-- m -->\n\nPlease help trying it.",
"time": "19:09",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-12",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Hello,\n\nSorry, but it does not work under Harbour. Many warnings and errors when compiling...",
"time": "20:40",
"topic": "ADO RDD xHarbour",
"username": "elvira"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-13",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Elvira,\n\nPlace this at top adordd.prg:\nThis has not been tested by me because I only use xHarbor.\n\n[code][#ifndef __XHARBOUR__\n\n #xcommand TRY => BEGIN SEQUENCE WITH {| oErr | Break( oErr ) }\n #xcommand CATCH [<!oErr!>] => RECOVER [USING <oErr>] <-oErr->\n #xcommand FINALLY => ALWAYS\n \n #include \"fivewin.ch\" // as Harbour does not have TRY / CATCH IF YOU DONT HAVE COMENT THIS LINE\n #define UR_FI_FLAGS 6\n #define UR_FI_STEP 7\n #define UR_FI_SIZE 5 // by Lucas for Harbour\n \n//13.04.15 functions given by thefull to compile with Harbour WITHOUT FIVEWIN\nfunction cValToChar( u ); return CStr( u )\nfunction MsgInfo( u ) ; return Alert( u )\nfunction MsgAlert( u ); return Alert( u )\n\nfunction cFilePath( cPathMask ) // returns path of a filename\n\n local n := RAt( \"\\\", cPathMask ), cDisk\n\nreturn If( n > 0, Upper( Left( cPathMask, n ) ),;\n ( cDisk := cFileDisc( cPathMask ) ) + If( ! Empty( cDisk ), \"\\\", \"\" ) )\n\nfunction cFileNoPath( cPathMask ) \n\n local n := RAt( \"\\\", cPathMask )\n\nreturn If( n > 0 .and. n < Len( cPathMask ),;\n Right( cPathMask, Len( cPathMask ) - n ),;\n If( ( n := At( \":\", cPathMask ) ) > 0,;\n Right( cPathMask, Len( cPathMask ) - n ),;\n cPathMask ) )\n\nfunction cFileNoExt( cPathMask ) // returns the filename without ext\n\n local cName := AllTrim( cFileNoPath( cPathMask ) )\n local n := RAt( \".\", cName )\n\nreturn AllTrim( If( n > 0, Left( cName, n - 1 ), cName ) )\n\nfunction cFileDisc( cPathMask ) // returns drive of the path\n\nreturn If( At( \":\", cPathMask ) == 2, ;\n Upper( Left( cPathMask, 2 ) ), \"\" )\n\n#pragma BEGINDUMP\n#include <hbapi.h>\n\nHB_FUNC( LAND )\n{\n hb_retl( ( hb_parnl( 1 ) & hb_parnl( 2 ) ) != 0 );\n}\n\n#pragma ENDDUMP\n\n#endif\n/code]",
"time": "08:32",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-13",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio, Enrico,Mr Rao,\n\nWe have to decide for a way to go but with a few trials and small tables (30.000 records) its difficult to take an option.\nMay be you have some experience with it.\nThe problem is when we make a seek with more than on field in the seek expression.(locate will be the same):\n\n1) Today's way in adordd\n Opens another record set with where clause for that seek expression\n This becomes the working record set with only the records matching the seek expression.\n When we need to go to a record outside of this scope adordd has to \"guess\" it and return the previous \n working record set.\n This tends to be cumbersome.\n Pros : Very fast.\n One operation only- open new recordset\n Cons: adordd has to do some guessing\n\n2) Another way is to have a new record set with the records matching the seek expression.\n Get the record number (defined autoinc field ) from the new record set accordingly to lsoftseek, lfindlast\n Close the new record set.\n :Find the record number from the new record set in the actual working record set\n Return to normal operation.\n Pros: adordd has nothing to \"guess\", same behavior as dbfs\n In Oracle seems to be very fast in others DB dont know!\n Cons: number of operations :\n Open a new recordset\n Close new recordset\n :Find record in actual working record set\n It will not work without some autoinc field to be used as recno because bookmarks\n are not guarantee to be the same between difference record sets\n\nEX.\n[code=fw:jqoxobx2]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br />nrec := recno<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /><span style=\"color: #00C800;\">if</span> seek <span style=\"color: #ff0000;\">\"whatever whatever2\"</span> <span style=\"color: #B900B9;\">// 2 fields in seek expression // 1) new recordset 2) the same</span><br /> <span style=\"color: #00C800;\">do</span> <span style=\"color: #00C800;\">while</span> seek expression = .t.<br /> ....<br /> skip<br /> <span style=\"color: #00C800;\">enddo</span><br /><span style=\"color: #00C800;\">endif</span><br />go <span style=\"color: #0000ff;\">to</span> nrec <span style=\"color: #B900B9;\">// 1) out of the scope needs to revert to previous record set 2) the same record set :find that record</span><br /> </div>[/code:jqoxobx2]\n\nPersonally I like more option 2 but....\n\nPlease give me your ideas.",
"time": "10:07",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-13",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio,\n\n[quote=\"AHF\":2w5zoo0y]Cons: adordd has to do some guessing[/quote:2w5zoo0y]\n\nPlease explain this point.\n\nEMG",
"time": "10:45",
"topic": "ADO RDD xHarbour",
"username": "Enrico Maria Giordano"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-13",
"forum": "FiveWin for Harbour/xHarbour",
"text": "[quote=\"Enrico Maria Giordano\":ewe90o4k]Antonio,\n\n[quote=\"AHF\":ewe90o4k]Cons: adordd has to do some guessing[/quote:ewe90o4k]\n\nPlease explain this point.\n\nEMG[/quote:ewe90o4k]\n\nEnrico,\n\nIn option 1) adordd creates a new recordset but the nrec saved before the seek it will not exist in the new recordset that becomes the working one.\nThus adordd tries to find that record when go to nrec gets called, if it doesnt reverts to the previous recordset (without where clause seek expression).\nSo adordd guesses if the record its not in the current recordset its in the previous one and restart it.\n\nIn option 2) that problem doesnt exists because the working recordset never changes.\nThe new open recordset with where clause matching the seek expression its only used to extract the record number of the first match and then find it in the working recordset.\nThe working recordset never changes.\n\nThe best way for you to understand is test it:\n\n[code=fw:ewe90o4k]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br />nrec :=recno<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br />seek expression with <span style=\"color: #000000;\">2</span> fields<br />browse<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span> <br />go <span style=\"color: #0000ff;\">to</span> nrec <span style=\"color: #B900B9;\">//error</span><br />set <span style=\"color: #0000ff;\">index</span> <span style=\"color: #0000ff;\">to</span><br />go <span style=\"color: #0000ff;\">to</span> nrec <span style=\"color: #B900B9;\">//ok</span><br />browse<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /> </div>[/code:ewe90o4k]\n\nCan you see the difference?\n\nThe main issue here is performance.\n\nCan you test this with MySql with tables bigger than 100.0000 recs and with cursor adUseClient and adUseServer ?",
"time": "11:17",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-13",
"forum": "FiveWin for Harbour/xHarbour",
"text": "neither the first nor the second option, but both\n\n\nmy proposal:\n\nbasic programming: compatibility mode: 2nd option\n\nadvanced programming: 1st option. New command ADORDD_SEEK",
"time": "11:51",
"topic": "ADO RDD xHarbour",
"username": "hmpaquito"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-13",
"forum": "FiveWin for Harbour/xHarbour",
"text": "[quote=\"hmpaquito\":9o4itq3r]neither the first nor the second option, but both\n\n\nmy proposal:\n\nbasic programming: compatibility mode: 2nd option\n\nadvanced programming: 1st option. New command ADORDD_SEEK[/quote:9o4itq3r]\n\nhmpaquito,\n\nIts a good proposal.\n\nThen we would have :\nADO_SEEK(cExpression) = seek build new recordset\nADO_SEEK() reset to previous recordset\n\nAnd its to the programmer to decide where to pace each.",
"time": "12:24",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-13",
"forum": "FiveWin for Harbour/xHarbour",
"text": "The question remains is :find quick enough to work with in average size tables ( 100.0000 records) in every DB?",
"time": "12:54",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-13",
"forum": "FiveWin for Harbour/xHarbour",
"text": "[quote=\"Rick Lipkin\":1z4cdh54]Antonio\n\nI use the ADO Class and methods to create recordsets to manage SQL.. and creating separate recordsets based on the primary key and the foreign key or a single recordset based on inner and outer joins.. not necessarily like we used to with .Dbf.\n\nI am watching this thread with interest.\n\nRick Lipkin[/quote:1z4cdh54]\n\nRick,\n\nCould you share code for creating separate recordsets based on the primary key and the foreign key ?",
"time": "19:31",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-04-13",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Here are an example .. lets open an Invoice table for [InvoiceNumber] = 354 then open the InvoiceDetail for the foreign key also named [InvoiceNumber]\n\n[code=fw:2x64qiiu]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /><br />Func _Invoice<span style=\"color: #000000;\">(</span>nRepairNumber<span style=\"color: #000000;\">)</span> <span style=\"color: #B900B9;\">// 354</span><br /><br /><span style=\"color: #00C800;\">Local</span> cSql,oRsInvoice,oRsInvoiceDetail,oErr<br /><br />...<br />...<br />..<br /><br />cSql := <span style=\"color: #ff0000;\">\"Select * from [Invoice] where [Invoice Number] = \"</span>+ltrim<span style=\"color: #000000;\">(</span>str<span style=\"color: #000000;\">(</span>nRepairNumber<span style=\"color: #000000;\">)</span><span style=\"color: #000000;\">)</span><br /><br />oRsInvoice := 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 />oRsInvoice:<span style=\"color: #000000;\">CursorType</span> := <span style=\"color: #000000;\">1</span> <span style=\"color: #B900B9;\">// opendkeyset</span><br />oRsInvoice:<span style=\"color: #000000;\">CursorLocation</span> := <span style=\"color: #000000;\">3</span> <span style=\"color: #B900B9;\">// local cache</span><br />oRsInvoice:<span style=\"color: #000000;\">LockType</span> := <span style=\"color: #000000;\">3</span> <span style=\"color: #B900B9;\">// lockoportunistic</span><br /><br /><span style=\"color: #00C800;\">TRY</span><br /> oRsInvoice:<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 INVOICE table\"</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 /><br /><span style=\"color: #00C800;\">If</span> oRsInvoice:<span style=\"color: #000000;\">Eof</span><br /> <span style=\"color: #0000ff;\">Msginfo</span><span style=\"color: #000000;\">(</span> <span style=\"color: #ff0000;\">\"Could not find Invoice \"</span>+trim<span style=\"color: #000000;\">(</span>str<span style=\"color: #000000;\">(</span>nRepairNumber<span style=\"color: #000000;\">)</span><span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span><br /> oRsInvoice:<span style=\"color: #000000;\">CLose</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /> oRsInvoice := <span style=\"color: #00C800;\">nil</span><br /> <span style=\"color: #00C800;\">Return</span><span style=\"color: #000000;\">(</span>.f.<span style=\"color: #000000;\">)</span><br /><span style=\"color: #00C800;\">Endif</span><br /><br /><span style=\"color: #B900B9;\">// open detail table</span><br /><br />cSql := <span style=\"color: #ff0000;\">\"Select * from [InvoiceDetail] where [Invoice Number] = \"</span>+ltrim<span style=\"color: #000000;\">(</span>str<span style=\"color: #000000;\">(</span>nRepairNumber<span style=\"color: #000000;\">)</span><span style=\"color: #000000;\">)</span><br /><br />oRsInvoiceDetail := 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 />oRsInvoiceDetail:<span style=\"color: #000000;\">CursorType</span> := <span style=\"color: #000000;\">1</span> <span style=\"color: #B900B9;\">// opendkeyset</span><br />oRsInvoiceDetail:<span style=\"color: #000000;\">CursorLocation</span> := <span style=\"color: #000000;\">3</span> <span style=\"color: #B900B9;\">// local cache</span><br />oRsInvoiceDetail:<span style=\"color: #000000;\">LockType</span> := <span style=\"color: #000000;\">3</span> <span style=\"color: #B900B9;\">// lockoportunistic</span><br /><br /><span style=\"color: #00C800;\">TRY</span><br /> oRsInvoiceDetail:<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 INVOICEDETAIL table\"</span> <span style=\"color: #000000;\">)</span><br /> oRsInvoice:<span style=\"color: #000000;\">CLose</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /> oRsInvoice := <span style=\"color: #00C800;\">nil</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:2x64qiiu]\n\nThis opens two recordsets you can display anyway you want ..\n\nRick Lipkin\n[img:2x64qiiu]http://i57.tinypic.com/168d9hw.jpg[/img:2x64qiiu]",
"time": "21:28",
"topic": "ADO RDD xHarbour",
"username": "Rick Lipkin"
}
] |
ADO RDD xHarbour
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.