messages
listlengths 1
1
| topic
stringlengths 2
60
|
---|---|
[
{
"date": "2015-08-03",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Welcome back AHF. I am excited to have your expertise available again.\n\nI like the COPY TO example. One concern I have is the HBRECNO field. I presume you need to first create the SQL table with the added HBRECNO field before running your code?\n\nJames",
"time": "16:00",
"topic": "ADO RDD xHarbour",
"username": "James Bott"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-08-03",
"forum": "FiveWin for Harbour/xHarbour",
"text": "James,\n\nNo thats done by adordd.\nIn ado_create the field defined as recno is taken care automatically so you dont need to care about it.\nThe field will be always created with the name defined as default or to that table in adordd sets.\nIf the field is defined already in the dbf structure and not as autoinc field it will be changed accordingly in sql.\n\nI notice that maromano added a new field to be used a deleted record control and I dont know if he added support for it in ado_create. Ill get into it.\n\nResuming every time you create a new sql structure adordd enforces that the recno field its always present you dont need to defined it yourself in the new structure.\nThis is done in:\n\nCopy to\nAppend from\nDbcreate\netc.\n\n\nado_create code\n[code=fw:1mqr3l4m]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /><span style=\"color: #B900B9;\">/*<br /> fix to add HBRECNO if it´s not present // Lucas De Beltran 23.05.2015<br /> cannot be first otherwise copy to changes all fields order and values ahf 23.5.2015<br /> */</span><br /> n := ASCAN<span style=\"color: #000000;\">(</span> aWAData<span style=\"color: #000000;\">[</span> WA_SQLSTRUCT <span style=\"color: #000000;\">]</span>,<span style=\"color: #000000;\">{</span> |x| x<span style=\"color: #000000;\">[</span><span style=\"color: #000000;\">1</span><span style=\"color: #000000;\">]</span> = ADO_GET_FIELD_RECNO<span style=\"color: #000000;\">(</span> aWAData<span style=\"color: #000000;\">[</span> WA_TABLENAME <span style=\"color: #000000;\">]</span> <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">}</span> <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00C800;\">IF</span> n == <span style=\"color: #000000;\">0</span><br /> AADD<span style=\"color: #000000;\">(</span> aWAData<span style=\"color: #000000;\">[</span> WA_SQLSTRUCT <span style=\"color: #000000;\">]</span>, <span style=\"color: #000000;\">{</span> ADO_GET_FIELD_RECNO<span style=\"color: #000000;\">(</span> aWAData<span style=\"color: #000000;\">[</span> WA_TABLENAME <span style=\"color: #000000;\">]</span> <span style=\"color: #000000;\">)</span>, <span style=\"color: #ff0000;\">'+'</span>, <span style=\"color: #000000;\">10</span>, <span style=\"color: #000000;\">0</span> <span style=\"color: #000000;\">}</span> <span style=\"color: #000000;\">)</span><br /><br /> <span style=\"color: #00C800;\">ELSE</span> <span style=\"color: #B900B9;\">//FIX AHF CAN ALREADY EXIST AND NOT TRUE INC FIELD</span><br /> aWAData<span style=\"color: #000000;\">[</span> WA_SQLSTRUCT <span style=\"color: #000000;\">]</span><span style=\"color: #000000;\">[</span>n,<span style=\"color: #000000;\">2</span><span style=\"color: #000000;\">]</span> := <span style=\"color: #ff0000;\">\"+\"</span><br /> aWAData<span style=\"color: #000000;\">[</span> WA_SQLSTRUCT <span style=\"color: #000000;\">]</span><span style=\"color: #000000;\">[</span>n,<span style=\"color: #000000;\">3</span><span style=\"color: #000000;\">]</span> := <span style=\"color: #000000;\">11</span><br /> aWAData<span style=\"color: #000000;\">[</span> WA_SQLSTRUCT <span style=\"color: #000000;\">]</span><span style=\"color: #000000;\">[</span>n,<span style=\"color: #000000;\">4</span><span style=\"color: #000000;\">]</span> := <span style=\"color: #000000;\">0</span><br /><br /> <span style=\"color: #00C800;\">ENDIF</span><br /> </div>[/code:1mqr3l4m]",
"time": "16:49",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-08-03",
"forum": "FiveWin for Harbour/xHarbour",
"text": "AHF,\n\nThanks for that explanation.\n\nI tried your COPY TO method but it still took 16 minutes and 42 seconds. So, it is not significantly faster that APPEND FROM.\n\nI think the speed issue has to do with locking. One reason is that I found that you have to force locking on or the APPEND FROM will crash at some point (unless maybe there are only a very few records). \n\nSET ADO FORCE LOCK ON // must be ON to do APPEND FROM...\n\nMaybe you have some ideas about this?\n\nJames",
"time": "17:14",
"topic": "ADO RDD xHarbour",
"username": "James Bott"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-08-03",
"forum": "FiveWin for Harbour/xHarbour",
"text": "To put this APPEND FROM speed issue in perspective, if you need to import 1 million records it will take:\n\n1000000/26000 = 38 X 18 minutes = 692 minutes/million or 692/60 minutes = 11.5 hours.\n\nIf you rarely need to import records, then this is probably not a big issue. I do know some people on this forum have mentioned having 2 million records in a single DBF, so just to convert the data to SQL could take days.\n\nJames",
"time": "17:25",
"topic": "ADO RDD xHarbour",
"username": "James Bott"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-08-03",
"forum": "FiveWin for Harbour/xHarbour",
"text": "James,\n\n[quote=\"James Bott\":129lf2cw]Speed Test Results\nUsing the new ADORDD and a local drive.\n\nSuccess at last. I have been able to import a large number of records from a DBF into a SQL table in an ACCESS database using the APPEND FROM command.\n\nAppending 26,191 records with 31 fields from a DBF into an ACCESS table: 18 minutes.\n\nAppending the same records from a DBF into a DBF: 1 second\n\nHmm, are all SQL databases that slow?\n\nJames[/quote:129lf2cw]\n\nTo make a comparison, try using mu DBF2SQL and export one or many DBF tables into your SQL tables and see the speed. Of course, DBF2SQL is not using ADORDD, but SQLLIB, but the SQL database can be the same.",
"time": "17:58",
"topic": "ADO RDD xHarbour",
"username": "Kleyber"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-08-03",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Kleyber,\n\nThat may be an option. I downloaded it and will take a look.\n\nI did see this in another message thread, \"It imports DBFs into MySQL or PostgreSQL databases\" and since for testing I am using ACCESS right now it won't be helpful.\n\nI do think the ADORDD issue can be solved. I expect maybe it is doing a COMMIT after adding each record. From my previous experience, this will REALLY slow things down.\n\nRegards,\nJames",
"time": "18:18",
"topic": "ADO RDD xHarbour",
"username": "James Bott"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-08-03",
"forum": "FiveWin for Harbour/xHarbour",
"text": "James:\n\nMaybe it's an Access problem.\n\nWhy not use ADO only\n\nRegards",
"time": "22:48",
"topic": "ADO RDD xHarbour",
"username": "Armando"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-08-03",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Armando,\n\nThanks. I am using both ADO and ADORDD. I am posting the problems I come across so hopefully we can fix them in the ADORDD. If the ADORDD is going to be a drop-in replacement like other RDDs, then everything needs to be working. Otherwise, we need a bunch of IF/THENs in our source code so we can use DBFs or SQL.\n\nAnd yes, getting the DBF data in the SQL database is a separate issue from using existing apps with an SQL database. So we can use whatever means necessary to get the data into the SQL database.\n\nJames",
"time": "23:10",
"topic": "ADO RDD xHarbour",
"username": "James Bott"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-08-04",
"forum": "FiveWin for Harbour/xHarbour",
"text": "I am trying to figure out how to use indexes. Can someone post a simple working example preferably using the Northwind.mdb? This would be very helpful, since I have had no luck getting an index to work.\n\nBelow is what I have been trying to get working. I am trying to index on COUNTRY, but it is not working.\n\nJames\n\n[code=fw:1x2tgmsj]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><span style=\"color: #B900B9;\">/*<br />Purpose: Simple ADORDD test of indexes<br />Author : James Bott<br />Date : 6/30/2015 5:02:35 PM<br /><br />*/</span><br /><br /><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">\"fivewin.ch\"</span><br /><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">\"adordd.ch\"</span><br /><br />REQUEST ADORDD, ADOVERSION<br /><br /><span style=\"color: #00C800;\">FUNCTION</span> Main<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /><br /> RddRegister<span style=\"color: #000000;\">(</span><span style=\"color: #ff0000;\">\"ADORDD\"</span>,<span style=\"color: #000000;\">1</span><span style=\"color: #000000;\">)</span><br /> RddSetDefault<span style=\"color: #000000;\">(</span><span style=\"color: #ff0000;\">\"ADORDD\"</span><span style=\"color: #000000;\">)</span><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;\">\"CUSTOMERS\"</span>,<span style=\"color: #000000;\">{</span><span style=\"color: #ff0000;\">\"CUSTOMERID\"</span>,<span style=\"color: #ff0000;\">\"CUSTOMERID\"</span><span style=\"color: #000000;\">}</span> <span style=\"color: #000000;\">}</span>,;<br /> <span style=\"color: #000000;\">{</span><span style=\"color: #ff0000;\">\"CUSTOMERS\"</span>,<span style=\"color: #000000;\">{</span><span style=\"color: #ff0000;\">\"COUNTRY\"</span>,<span style=\"color: #ff0000;\">\"COUNTRY\"</span><span style=\"color: #000000;\">}</span> <span style=\"color: #000000;\">}</span> <span style=\"color: #000000;\">}</span><br /> <br /> <span style=\"color: #B900B9;\">//SET ADO TEMPORARY NAMES INDEX LIST TO {\"TMP\",\"TEMP\", \"TEMPORARY\" }</span><br /><br /> <span style=\"color: #B900B9;\">//SET ADO DEFAULT RECNO FIELD TO \"HBRECNO\"</span><br /><br /> SET AUTOPEN <span style=\"color: #0000ff;\">ON</span><br /><br /> SET ADO FORCE LOCK OFF <span style=\"color: #B900B9;\">// required</span><br /><br /> SET ADO <span style=\"color: #00C800;\">DEFAULT</span> DATABASE <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #ff0000;\">\"northwind.mdb\"</span> ;<br /> <span style=\"color: #00C800;\">SERVER</span> <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #ff0000;\">\"Microsoft.Jet.OLEDB.4.0\"</span> ;<br /> ENGINE <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #ff0000;\">\"ACCESS\"</span><br /><br /> USE customers<br /> <span style=\"color: #B900B9;\">//INDEX ON FIELD->CUSTOMERID TO CUSTOMERID TAG CUSTID</span><br /> <span style=\"color: #B900B9;\">//index on field->country to country TAG COUNTRY</span><br /> <span style=\"color: #B900B9;\">//set index to country</span><br /> <br /> set order <span style=\"color: #0000ff;\">to</span> <span style=\"color: #ff0000;\">\"country\"</span><br /> go top<br /> <span style=\"color: #0000ff;\">msgInfo</span><span style=\"color: #000000;\">(</span>country<span style=\"color: #000000;\">)</span><br /> <span style=\"color: #B900B9;\">//BROWSE()</span><br /> xbrowser fastedit<br /><br /><span style=\"color: #00C800;\">Return</span> <span style=\"color: #00C800;\">nil</span> <br /><br /><span style=\"color: #B900B9;\">// EOF</span></div>[/code:1x2tgmsj]",
"time": "06:42",
"topic": "ADO RDD xHarbour",
"username": "James Bott"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-08-04",
"forum": "FiveWin for Harbour/xHarbour",
"text": "James,\n\nSET ADO TABLES INDEX LIST TO = expressions used to build queries with ORDER BY clause. Here you can even use sql expressions like ASC DESC CONVERT etc\n\nSET ADODBF TABLES INDEX LIST TO = standard clipper like expressions to enable functions like Indexkey() to work. These are the actual indexes you re using in your app.\n\nYou need to have both defined and in the same order.\n\nIndexes defined in these array do not need to be created!\n\nJust use SET INDEX TO or ORDLISTADD to \"open\" them and then SET ORDER TO or ORDSETFOCUS to activate them.\n\nPlease remember that indexes files dont really exist they are only expressions to be used by adordd in SELECT.. ORDER BY clause.\n\nPlease check the readme.pdf file\n\nIndexes created with INDEX ON are temporary in the sense that when the app is closed they need to be created again as they arent in the SET .. INDEX array.\n\nTry take out the TAG I never tried because I dont use it. TAGs are not needed as files dont really exist.\n\n[code=fw:1xe8dqhx]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br />USE customers<br /><span style=\"color: #0000ff;\">INDEX</span> <span style=\"color: #0000ff;\">ON</span> CUSTOMERID <span style=\"color: #0000ff;\">TO</span> temp1<br /><span style=\"color: #0000ff;\">index</span> <span style=\"color: #0000ff;\">on</span> country <span style=\"color: #0000ff;\">to</span> temp2<br />ordsetfocus<span style=\"color: #000000;\">(</span><span style=\"color: #ff0000;\">\"temp2\"</span><span style=\"color: #000000;\">)</span><br />browse<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br />ordsetfocus<span style=\"color: #000000;\">(</span><span style=\"color: #ff0000;\">\"temp1\"</span><span style=\"color: #000000;\">)</span><br />browse<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br />ordsetfocus<span style=\"color: #000000;\">(</span><span style=\"color: #ff0000;\">\"CUSTOMERID\"</span><span style=\"color: #000000;\">)</span><br />browse<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /> </div>[/code:1xe8dqhx]\n\nDid it work?",
"time": "10:02",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-08-04",
"forum": "FiveWin for Harbour/xHarbour",
"text": "[quote=\"James Bott\":20p6wzbs]Kleyber,\n\nThat may be an option. I downloaded it and will take a look.\n\nI did see this in another message thread, \"It imports DBFs into MySQL or PostgreSQL databases\" and since for testing I am using ACCESS right now it won't be helpful.\n\nI do think the ADORDD issue can be solved. I expect maybe it is doing a COMMIT after adding each record. From my previous experience, this will REALLY slow things down.\n\nRegards,\nJames[/quote:20p6wzbs]\n\nThat's right. DBF2SQL has the option of how many records must be sent before a commit. The default is 250 but it can be changed. The best way to export data from dbf to an sql database is (IMHO) using transactions with a commit after them.",
"time": "13:04",
"topic": "ADO RDD xHarbour",
"username": "Kleyber"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-08-04",
"forum": "FiveWin for Harbour/xHarbour",
"text": "AHF,\n\nOK I tried what I thought you were saying and it still doesn't work. That's why I was asking for a working example, because obviously I still have something wrong. It seems we have to make lots of changes with indexes to use SQL.\n\nBelow is my modified code that is not working.\n\nJames\n\n[code=fw:28hmd29c]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><span style=\"color: #B900B9;\">/*<br />Purpose: Simple ADORDD test of indexes<br />Author : James Bott<br />Date : 6/30/2015 5:02:35 PM<br /><br />*/</span><br /><br /><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">\"fivewin.ch\"</span><br /><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">\"adordd.ch\"</span><br /><br />REQUEST ADORDD, ADOVERSION<br /><br /><span style=\"color: #00C800;\">FUNCTION</span> Main<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /><br /> RddRegister<span style=\"color: #000000;\">(</span><span style=\"color: #ff0000;\">\"ADORDD\"</span>,<span style=\"color: #000000;\">1</span><span style=\"color: #000000;\">)</span><br /> RddSetDefault<span style=\"color: #000000;\">(</span><span style=\"color: #ff0000;\">\"ADORDD\"</span><span style=\"color: #000000;\">)</span><br /><span style=\"color: #B900B9;\">/* <br />SET ADO TABLES INDEX LIST TO = expressions used to build queries with ORDER BY clause. Here you can even use sql expressions like ASC DESC CONVERT etc<br /><br />SET ADODBF TABLES INDEX LIST TO = standard clipper like expressions to enable functions like Indexkey() to work. These are the actual indexes you re using in your app <br />*/</span> <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;\">\"CUSTOMERS\"</span>,<span style=\"color: #000000;\">{</span><span style=\"color: #ff0000;\">\"CUSTOMERID\"</span>,<span style=\"color: #ff0000;\">\"CUSTOMERID\"</span><span style=\"color: #000000;\">}</span> <span style=\"color: #000000;\">}</span>,;<br /> <span style=\"color: #000000;\">{</span><span style=\"color: #ff0000;\">\"CUSTOMERS\"</span>,<span style=\"color: #000000;\">{</span><span style=\"color: #ff0000;\">\"COUNTRY\"</span>,<span style=\"color: #ff0000;\">\"COUNTRY\"</span><span style=\"color: #000000;\">}</span> <span style=\"color: #000000;\">}</span> <span style=\"color: #000000;\">}</span><br /> SET ADODBF 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;\">\"CUSTOMERS\"</span>,<span style=\"color: #000000;\">{</span><span style=\"color: #ff0000;\">\"CUSTOMERID\"</span>,<span style=\"color: #ff0000;\">\"CUSTOMERID\"</span><span style=\"color: #000000;\">}</span> <span style=\"color: #000000;\">}</span>,;<br /> <span style=\"color: #000000;\">{</span><span style=\"color: #ff0000;\">\"CUSTOMERS\"</span>,<span style=\"color: #000000;\">{</span><span style=\"color: #ff0000;\">\"COUNTRY\"</span>,<span style=\"color: #ff0000;\">\"COUNTRY\"</span><span style=\"color: #000000;\">}</span> <span style=\"color: #000000;\">}</span> <span style=\"color: #000000;\">}</span> <br /> <br /> <span style=\"color: #B900B9;\">//SET ADO TEMPORARY NAMES INDEX LIST TO {\"TMP\",\"TEMP\", \"TEMPORARY\" }</span><br /><br /> <span style=\"color: #B900B9;\">//SET ADO DEFAULT RECNO FIELD TO \"HBRECNO\"</span><br /><br /> SET AUTOPEN <span style=\"color: #0000ff;\">ON</span><br /><br /> SET ADO FORCE LOCK OFF <span style=\"color: #B900B9;\">// required</span><br /><br /> SET ADO <span style=\"color: #00C800;\">DEFAULT</span> DATABASE <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #ff0000;\">\"northwind.mdb\"</span> ;<br /> <span style=\"color: #00C800;\">SERVER</span> <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #ff0000;\">\"Microsoft.Jet.OLEDB.4.0\"</span> ;<br /> ENGINE <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #ff0000;\">\"ACCESS\"</span><br /><br /> <span style=\"color: #B900B9;\">//USE customers</span><br /> <span style=\"color: #B900B9;\">//INDEX ON FIELD->CUSTOMERID TO CUSTOMERID TAG CUSTID</span><br /> <span style=\"color: #B900B9;\">//index on field->country to country TAG COUNTRY</span><br /> <span style=\"color: #B900B9;\">//set index to country</span><br /> <br />USE customers<br /><span style=\"color: #0000ff;\">INDEX</span> <span style=\"color: #0000ff;\">ON</span> CUSTOMERID <span style=\"color: #0000ff;\">TO</span> temp1<br /><span style=\"color: #0000ff;\">index</span> <span style=\"color: #0000ff;\">on</span> country <span style=\"color: #0000ff;\">to</span> temp2<br />ordsetfocus<span style=\"color: #000000;\">(</span><span style=\"color: #ff0000;\">\"temp2\"</span><span style=\"color: #000000;\">)</span><br />browse<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br />ordsetfocus<span style=\"color: #000000;\">(</span><span style=\"color: #ff0000;\">\"temp1\"</span><span style=\"color: #000000;\">)</span><br />browse<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br />ordsetfocus<span style=\"color: #000000;\">(</span><span style=\"color: #ff0000;\">\"CUSTOMERID\"</span><span style=\"color: #000000;\">)</span><br />browse<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span> <br /><span style=\"color: #B900B9;\">/* <br /> set order to \"country\"<br /> go top<br /> msgInfo(country)<br /> //BROWSE()<br /> xbrowser fastedit<br />*/</span><br /><span style=\"color: #00C800;\">Return</span> <span style=\"color: #00C800;\">nil</span> <br /><br /><span style=\"color: #B900B9;\">// EOF</span></div>[/code:28hmd29c]",
"time": "15:18",
"topic": "ADO RDD xHarbour",
"username": "James Bott"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-08-04",
"forum": "FiveWin for Harbour/xHarbour",
"text": "James,\n\nTry this:\n\n[code=fw:14kaz9kq]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">\"fivewin.ch\"</span><br /><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">\"adordd.ch\"</span><br /><br />REQUEST ADORDD, ADOVERSION<br /><br /><span style=\"color: #00C800;\">FUNCTION</span> Main<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /><br /> RddRegister<span style=\"color: #000000;\">(</span><span style=\"color: #ff0000;\">\"ADORDD\"</span>,<span style=\"color: #000000;\">1</span><span style=\"color: #000000;\">)</span><br /> RddSetDefault<span style=\"color: #000000;\">(</span><span style=\"color: #ff0000;\">\"ADORDD\"</span><span style=\"color: #000000;\">)</span><br /><span style=\"color: #B900B9;\">/*<br />SET ADO TABLES INDEX LIST TO = expressions used to build queries with ORDER BY clause. Here you can even use sql expressions like ASC DESC CONVERT etc<br /><br />SET ADODBF TABLES INDEX LIST TO = standard clipper like expressions to enable functions like Indexkey() to work. These are the actual indexes you re using in your app<br /><br />array spec :<br /><br />{ {\"Table Name\", {\"tag name\",\"index expression\"},;<br /> {\"2nd tag name\",\"index expression\"} },;<br /> next table... }<br />*/</span><br /> <span style=\"color: #B900B9;\">//change tag name to custid as your previous post </span><br /> <span style=\"color: #B900B9;\">// as in clipper you cannot have repeated index (tag) names.</span><br /> <span style=\"color: #B900B9;\">// you can try {\"COUNTRY\",\"COUNTRY DESC\"} to check behaviour</span><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;\">\"CUSTOMERS\"</span>, <span style=\"color: #000000;\">{</span><span style=\"color: #ff0000;\">\"CUSTID\"</span>,<span style=\"color: #ff0000;\">\"CUSTOMERID\"</span><span style=\"color: #000000;\">}</span>,;<br /> <span style=\"color: #000000;\">{</span><span style=\"color: #ff0000;\">\"COUNTRY\"</span>,<span style=\"color: #ff0000;\">\"COUNTRY\"</span><span style=\"color: #000000;\">}</span> <span style=\"color: #000000;\">}</span> <span style=\"color: #000000;\">}</span><br /><br /> SET ADODBF 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;\">\"CUSTOMERS\"</span>, <span style=\"color: #000000;\">{</span><span style=\"color: #ff0000;\">\"CUSTID\"</span>,<span style=\"color: #ff0000;\">\"CUSTOMERID\"</span><span style=\"color: #000000;\">}</span>,;<br /> <span style=\"color: #000000;\">{</span><span style=\"color: #ff0000;\">\"COUNTRY\"</span>,<span style=\"color: #ff0000;\">\"COUNTRY\"</span><span style=\"color: #000000;\">}</span> <span style=\"color: #000000;\">}</span> <span style=\"color: #000000;\">}</span><br /><br /> SET ADO TEMPORARY 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: #ff0000;\">\"TEMPORARY\"</span> <span style=\"color: #000000;\">}</span><br /><br /> SET ADO <span style=\"color: #00C800;\">DEFAULT</span> RECNO FIELD <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #ff0000;\">\"HBRECNO\"</span> <span style=\"color: #B900B9;\">//needed always to be indicated and exist on the tables!</span><br /><br /> SET AUTOPEN <span style=\"color: #0000ff;\">ON</span> <span style=\"color: #B900B9;\">//your choice!</span><br /><br /> SET ADO FORCE LOCK OFF <span style=\"color: #B900B9;\">// required ahf why?</span><br /><br /> <span style=\"color: #B900B9;\">//isnt the path to mdb needed?</span><br /> SET ADO <span style=\"color: #00C800;\">DEFAULT</span> DATABASE <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #ff0000;\">\"northwind.mdb\"</span> ;<br /> <span style=\"color: #00C800;\">SERVER</span> <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #ff0000;\">\"ACCESS\"</span> ;<br /> ENGINE <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #ff0000;\">\"ACCESS\"</span><br /><br /><br />USE customers<br />dbgotop<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br />SET ORDER <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #000000;\">1</span><br />xbrowser fastedit<br /><br />SET ORDER <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #000000;\">2</span><br />dbgotop<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br />xbrowser fastedit<br /><br /><span style=\"color: #0000ff;\">INDEX</span> <span style=\"color: #0000ff;\">ON</span> SOMEFIELD.... <span style=\"color: #0000ff;\">TO</span> temp1<br />SET <span style=\"color: #0000ff;\">INDEX</span> <span style=\"color: #0000ff;\">TO</span> TEMP1<br /><br />xbrowser fastedit<br /><br /><span style=\"color: #B900B9;\">//try also this</span><br />sele <span style=\"color: #000000;\">0</span><br />USE <span style=\"color: #ff0000;\">\"INFORMATION_SCHEMA.TABLES\"</span><br />xbrowser fastedit<br /><br /><br /><span style=\"color: #00C800;\">Return</span> <span style=\"color: #00C800;\">nil</span><br /><br /> </div>[/code:14kaz9kq]\n\n[quote:14kaz9kq]It seems we have to make lots of changes with indexes to use SQL.[/quote:14kaz9kq]\n\nNo James the beauty of it is that is very easy to work with indexes maintaining exactly the same way of working as with any other rdd.\nThe only thing we need to do is to indicate these SETs to ADORDD we dont change anything else in the app code.\n\nI didnt test this myself because I dot have ACCESS right now. Im only working with MySql.\n\nOnce more please note that the indexes are not being physically built in SQL engine these are only used to build ORDER BY clauses when opening the tables (recordsets) with SELECT.... \n\nWe should not interfere in the database logic that is for DB ADMIN to do. \nIf later the DB ADMIN gets to the conclusion that many selects are using a certain ORDER BY clause may be it would be worth to build a true index at the server to serve faster those requests but this should never be done at the app level.\n\nPlease let me know if its ok now.",
"time": "16:25",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-08-04",
"forum": "FiveWin for Harbour/xHarbour",
"text": "AHF,\n\nThanks for the reply.\n\n[quote:su66z4bs]I didnt test this myself because I dot have ACCESS right now[/quote:su66z4bs]\n\nHmm, you don't need the ACCESS program as the ADO drivers are part of Windows. You can just use the Northwind.mdb (commonly available) or you can use the ADO functions to create an empty ACCESS database. I don't have the ACCESS program either.\n\nI will try your example.\n\nJames",
"time": "22:21",
"topic": "ADO RDD xHarbour",
"username": "James Bott"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-08-04",
"forum": "FiveWin for Harbour/xHarbour",
"text": "AHF,\n\nI tried your example and with a few changes got it working except for the temp index. Any ideas?\n\nJames\n\n[code=fw:2uozvntb]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><span style=\"color: #B900B9;\">// This is not working</span><br /><span style=\"color: #B900B9;\">// data is natural order</span><br /><span style=\"color: #0000ff;\">INDEX</span> <span style=\"color: #0000ff;\">ON</span> FIELD->CITY <span style=\"color: #0000ff;\">TO</span> temp1<br />SET <span style=\"color: #0000ff;\">INDEX</span> <span style=\"color: #0000ff;\">TO</span> TEMP1<br />dbgotop<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br />xbrowser fastedit</div>[/code:2uozvntb]",
"time": "23:51",
"topic": "ADO RDD xHarbour",
"username": "James Bott"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-08-05",
"forum": "FiveWin for Harbour/xHarbour",
"text": "James,\n\nGlad to know thats working.\n\nPlace this in your code and call it after open indexes to check area status.\n\n[code=fw:1novahpv]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /><span style=\"color: #00C800;\">FUNCTION</span> areainfo<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /><span style=\"color: #00C800;\">LOCAL</span> cerrorlog := <span style=\"color: #ff0000;\">\"\"</span>,n,j,ntarget,x<br /><br /> <span style=\"color: #00C800;\">for</span> n = <span style=\"color: #000000;\">1</span> <span style=\"color: #0000ff;\">to</span> <span style=\"color: #000000;\">255</span><br /> <span style=\"color: #00C800;\">if</span> ! Empty<span style=\"color: #000000;\">(</span> <span style=\"color: #0000ff;\">Alias</span><span style=\"color: #000000;\">(</span> n <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span><br /> cErrorLog += CRLF + Str<span style=\"color: #000000;\">(</span> n, <span style=\"color: #000000;\">3</span> <span style=\"color: #000000;\">)</span> + <span style=\"color: #ff0000;\">\": \"</span> + <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">(</span> <span style=\"color: #0000ff;\">Select</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span> == n,<span style=\"color: #ff0000;\">\"=> \"</span>, <span style=\"color: #ff0000;\">\" \"</span> <span style=\"color: #000000;\">)</span> + ;<br /> PadR<span style=\"color: #000000;\">(</span> <span style=\"color: #0000ff;\">Alias</span><span style=\"color: #000000;\">(</span> n <span style=\"color: #000000;\">)</span>, <span style=\"color: #000000;\">15</span> <span style=\"color: #000000;\">)</span> + Space<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">20</span> <span style=\"color: #000000;\">)</span> + <span style=\"color: #ff0000;\">\"NomeRDD: \"</span> + ;<br /> <span style=\"color: #000000;\">(</span> <span style=\"color: #0000ff;\">Alias</span><span style=\"color: #000000;\">(</span> n <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>-><span style=\"color: #000000;\">(</span> RddName<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span> + CRLF<br /> cErrorLog += <span style=\"color: #ff0000;\">\" ==============================\"</span> + CRLF<br /> cErrorLog += <span style=\"color: #ff0000;\">\" RecNo RecCount BOF EOF\"</span> + CRLF<br /> cErrorLog += <span style=\"color: #ff0000;\">\" \"</span> + Transform<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">(</span> <span style=\"color: #0000ff;\">Alias</span><span style=\"color: #000000;\">(</span> n <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>-><span style=\"color: #000000;\">(</span> RecNo<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>, <span style=\"color: #ff0000;\">\"99999\"</span> <span style=\"color: #000000;\">)</span> + ;<br /> <span style=\"color: #ff0000;\">\" \"</span> + Transform<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">(</span> <span style=\"color: #0000ff;\">Alias</span><span style=\"color: #000000;\">(</span> n <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>-><span style=\"color: #000000;\">(</span> RecCount<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>, <span style=\"color: #ff0000;\">\"99999\"</span> <span style=\"color: #000000;\">)</span> + ;<br /> <span style=\"color: #ff0000;\">\" \"</span> + cValToChar<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">(</span> <span style=\"color: #0000ff;\">Alias</span><span style=\"color: #000000;\">(</span> n <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>-><span style=\"color: #000000;\">(</span> BoF<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span> + ;<br /> <span style=\"color: #ff0000;\">\" \"</span> + cValToChar<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">(</span> <span style=\"color: #0000ff;\">Alias</span><span style=\"color: #000000;\">(</span> n <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>-><span style=\"color: #000000;\">(</span> EoF<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span> + CRLF + CRLF<br /> cErrorLog += <span style=\"color: #ff0000;\">\" Índices em uso \"</span> + Space<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">23</span> <span style=\"color: #000000;\">)</span> + <span style=\"color: #ff0000;\">\"TagName\"</span> + CRLF<br /><br /> <span style=\"color: #00C800;\">for</span> j = <span style=\"color: #000000;\">1</span> <span style=\"color: #0000ff;\">to</span> <span style=\"color: #000000;\">15</span><br /> <span style=\"color: #00C800;\">if</span> ! Empty<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">(</span> <span style=\"color: #0000ff;\">Alias</span><span style=\"color: #000000;\">(</span> n <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>-><span style=\"color: #000000;\">(</span> IndexKey<span style=\"color: #000000;\">(</span> j <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span><br /> cErrorLog += Space<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">8</span> <span style=\"color: #000000;\">)</span> + ;<br /> <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">(</span> <span style=\"color: #0000ff;\">Alias</span><span style=\"color: #000000;\">(</span> n <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>-><span style=\"color: #000000;\">(</span> IndexOrd<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span> == j, <span style=\"color: #ff0000;\">\"=> \"</span>, <span style=\"color: #ff0000;\">\" \"</span> <span style=\"color: #000000;\">)</span> + ;<br /> PadR<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">(</span> <span style=\"color: #0000ff;\">Alias</span><span style=\"color: #000000;\">(</span> n <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>-><span style=\"color: #000000;\">(</span> IndexKey<span style=\"color: #000000;\">(</span> j <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>, <span style=\"color: #000000;\">35</span> <span style=\"color: #000000;\">)</span> + ;<br /> <span style=\"color: #000000;\">(</span> <span style=\"color: #0000ff;\">Alias</span><span style=\"color: #000000;\">(</span> n <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>-><span style=\"color: #000000;\">(</span> OrdName<span style=\"color: #000000;\">(</span> j <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span> + ;<br /> CRLF<br /> <span style=\"color: #00C800;\">endif</span><br /> <span style=\"color: #00C800;\">next</span><br /><br /> cErrorLog += CRLF + <span style=\"color: #ff0000;\">\" Relations \"</span> + CRLF<br /> <span style=\"color: #00C800;\">for</span> j = <span style=\"color: #000000;\">1</span> <span style=\"color: #0000ff;\">to</span> <span style=\"color: #000000;\">8</span><br /> <span style=\"color: #00C800;\">if</span> ! Empty<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">(</span> nTarget := <span style=\"color: #000000;\">(</span> <span style=\"color: #0000ff;\">Alias</span><span style=\"color: #000000;\">(</span> n <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>-><span style=\"color: #000000;\">(</span> DbRSelect<span style=\"color: #000000;\">(</span> j <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span><br /> cErrorLog += Space<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">8</span> <span style=\"color: #000000;\">)</span> + Str<span style=\"color: #000000;\">(</span> j <span style=\"color: #000000;\">)</span> + <span style=\"color: #ff0000;\">\": \"</span> + ;<br /> <span style=\"color: #ff0000;\">\"TO \"</span> + <span style=\"color: #000000;\">(</span> <span style=\"color: #0000ff;\">Alias</span><span style=\"color: #000000;\">(</span> n <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>-><span style=\"color: #000000;\">(</span> DbRelation<span style=\"color: #000000;\">(</span> j <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span> + ;<br /> <span style=\"color: #ff0000;\">\" INTO \"</span> + <span style=\"color: #0000ff;\">Alias</span><span style=\"color: #000000;\">(</span> nTarget <span style=\"color: #000000;\">)</span> + CRLF<br /> <span style=\"color: #B900B9;\">// uValue = ( Alias( n ) )->( DbRelation( j ) )</span><br /> <span style=\"color: #B900B9;\">// cErrorLog += cValToChar( &( uValue ) ) + CRLF</span><br /> <span style=\"color: #00C800;\">endif</span><br /> <span style=\"color: #00C800;\">next</span><br /> x := <span style=\"color: #000000;\">(</span><span style=\"color: #0000ff;\">alias</span><span style=\"color: #000000;\">(</span>n<span style=\"color: #000000;\">)</span><span style=\"color: #000000;\">)</span>-><span style=\"color: #000000;\">(</span>dbrlocklist<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><span style=\"color: #000000;\">)</span><br /> cErrorLog += Space<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">8</span> <span style=\"color: #000000;\">)</span> +<span style=\"color: #ff0000;\">\"Records locked \"</span>+CRLF<br /> <span style=\"color: #00C800;\">for</span> j = <span style=\"color: #000000;\">1</span> <span style=\"color: #0000ff;\">to</span> len<span style=\"color: #000000;\">(</span>x<span style=\"color: #000000;\">)</span><br /> cErrorLog += Space<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">8</span> <span style=\"color: #000000;\">)</span> + <span style=\"color: #ff0000;\">\"Recno nr \"</span>+str<span style=\"color: #000000;\">(</span>x<span style=\"color: #000000;\">[</span>j<span style=\"color: #000000;\">]</span><span style=\"color: #000000;\">)</span>+CRLF<br /> <span style=\"color: #00C800;\">next</span><br /><br /> <span style=\"color: #00C800;\">endif</span><br /> <span style=\"color: #00C800;\">next</span><br /> SHOWMEMO<span style=\"color: #000000;\">(</span>cerrorlog<span style=\"color: #000000;\">)</span><br /><br /><span style=\"color: #00C800;\">RETURN</span> .t.<br /> </div>[/code:1novahpv]\n\nWhat do you have after set index ?",
"time": "08:36",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-08-05",
"forum": "FiveWin for Harbour/xHarbour",
"text": "James,\n\n[code=fw:11imh2vn]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /><span style=\"color: #B900B9;\">// This is not working</span><br /><span style=\"color: #B900B9;\">// data is natural order</span><br /><span style=\"color: #0000ff;\">INDEX</span> <span style=\"color: #0000ff;\">ON</span> FIELD->CITY <span style=\"color: #0000ff;\">TO</span> temp1<br />SET <span style=\"color: #0000ff;\">INDEX</span> <span style=\"color: #0000ff;\">TO</span> TEMP1<br />dbgotop<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br />Browse<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /> </div>[/code:11imh2vn]\n\nThis is working here with ACCESS adordd version 1/250615",
"time": "12:51",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-08-05",
"forum": "FiveWin for Harbour/xHarbour",
"text": "AHF,\n\nBelow is the code I am using where the temp index isn't working.\n\nJames\n\n[code=fw:homsp4lm]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><span style=\"color: #B900B9;\">/*<br />Purpose : Test ADORDD indexing<br />Author : James Bott<br />Date : 8/4/2015<br />Company : Intellitech<br />Language : Fivewin/xHarbour<br />Updated : <br />Notes :<br /><br />*/</span><br /><br /><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">\"fivewin.ch\"</span><br /><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">\"adordd.ch\"</span><br /><br />REQUEST ADORDD, ADOVERSION, DBFCDX<br /><br /><span style=\"color: #00C800;\">FUNCTION</span> Main<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /><br /> RddRegister<span style=\"color: #000000;\">(</span><span style=\"color: #ff0000;\">\"ADORDD\"</span>,<span style=\"color: #000000;\">1</span><span style=\"color: #000000;\">)</span><br /> RddSetDefault<span style=\"color: #000000;\">(</span><span style=\"color: #ff0000;\">\"ADORDD\"</span><span style=\"color: #000000;\">)</span><br /><span style=\"color: #B900B9;\">/*<br />SET ADO TABLES INDEX LIST TO = expressions used to build queries with ORDER BY clause. Here you can even use sql expressions like ASC DESC CONVERT etc<br /><br />SET ADODBF TABLES INDEX LIST TO = standard clipper like expressions to enable functions like Indexkey() to work. These are the actual indexes you re using in your app<br /><br />array spec :<br /><br />{ {\"Table Name\", {\"tag name\",\"index expression\"},;<br /> {\"2nd tag name\",\"index expression\"} },;<br /> next table... }<br />*/</span><br /> <br /><span style=\"color: #0000ff;\">msgInfo</span><span style=\"color: #000000;\">(</span> ADOVERSION<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span>, <span style=\"color: #ff0000;\">\"ADO Version\"</span> <span style=\"color: #000000;\">)</span><br /> <br /> <span style=\"color: #B900B9;\">//change tag name to custid as your previous post </span><br /> <span style=\"color: #B900B9;\">// as in clipper you cannot have repeated index (tag) names.</span><br /> <span style=\"color: #B900B9;\">// you can try {\"COUNTRY\",\"COUNTRY DESC\"} to check behaviour</span><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;\">\"CUSTOMERS\"</span>, <span style=\"color: #000000;\">{</span><span style=\"color: #ff0000;\">\"CUSTID\"</span>,<span style=\"color: #ff0000;\">\"CUSTOMERID\"</span><span style=\"color: #000000;\">}</span>,;<br /> <span style=\"color: #000000;\">{</span><span style=\"color: #ff0000;\">\"COUNTRY\"</span>,<span style=\"color: #ff0000;\">\"COUNTRY DESC\"</span><span style=\"color: #000000;\">}</span> <span style=\"color: #000000;\">}</span> <span style=\"color: #000000;\">}</span><br /><br /> SET ADODBF 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;\">\"CUSTOMERS\"</span>, <span style=\"color: #000000;\">{</span><span style=\"color: #ff0000;\">\"CUSTID\"</span>,<span style=\"color: #ff0000;\">\"CUSTOMERID\"</span><span style=\"color: #000000;\">}</span>,;<br /> <span style=\"color: #000000;\">{</span><span style=\"color: #ff0000;\">\"COUNTRY\"</span>,<span style=\"color: #ff0000;\">\"COUNTRY DESC\"</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: #ff0000;\">\"TEMPORARY\"</span> <span style=\"color: #000000;\">}</span><br /><br /> SET ADO <span style=\"color: #00C800;\">DEFAULT</span> RECNO FIELD <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #ff0000;\">\"HBRECNO\"</span> <span style=\"color: #B900B9;\">//needed always to be indicated and exist on the tables!</span><br /><br /> SET AUTOPEN <span style=\"color: #0000ff;\">ON</span> <span style=\"color: #B900B9;\">//your choice!</span><br /><br /> SET ADO FORCE LOCK OFF <span style=\"color: #B900B9;\">// required ahf why?</span><br /><br /> <span style=\"color: #B900B9;\">//isnt the path to mdb needed?</span><br /> SET ADO <span style=\"color: #00C800;\">DEFAULT</span> DATABASE <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #ff0000;\">\"northwind.mdb\"</span> ;<br /> <span style=\"color: #00C800;\">SERVER</span> <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #ff0000;\">\"Microsoft.Jet.OLEDB.4.0\"</span> ;<br /> ENGINE <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #ff0000;\">\"ACCESS\"</span><br /><br /><br />USE customers<br />dbgotop<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /><br />SET ORDER <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #000000;\">1</span><br />xbrowser fastedit<br /><br />SET ORDER <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #000000;\">2</span><br />dbgotop<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br />xbrowser fastedit<br /><br /><span style=\"color: #B900B9;\">// This is not working</span><br /><span style=\"color: #B900B9;\">// data is natural order</span><br /><span style=\"color: #0000ff;\">INDEX</span> <span style=\"color: #0000ff;\">ON</span> FIELD->CITY <span style=\"color: #0000ff;\">TO</span> temp1<br />SET <span style=\"color: #0000ff;\">INDEX</span> <span style=\"color: #0000ff;\">TO</span> TEMP1<br />dbgotop<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br />xbrowser fastedit<br /><br /><span style=\"color: #B900B9;\">//try also this</span><br /><span style=\"color: #B900B9;\">//select 0</span><br /><span style=\"color: #B900B9;\">//USE \"INFORMATION_SCHEMA.TABLES\" //MySQL only?</span><br /><span style=\"color: #B900B9;\">//xbrowser fastedit</span><br /><br /><span style=\"color: #00C800;\">Return</span> <span style=\"color: #00C800;\">nil</span></div>[/code:homsp4lm]",
"time": "15:15",
"topic": "ADO RDD xHarbour",
"username": "James Bott"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-08-05",
"forum": "FiveWin for Harbour/xHarbour",
"text": "AHF,\n\nHere is the data you wanted regarding the temp index.\nI am using the same ADORDD version as you are.\n\nJames\n\n\n 1: => CUSTOMERS NomeRDD: ADORDD\n ==============================\n RecNo RecCount BOF EOF\n 1 45 .F. .F.\n\n Índices em uso TagName\n CUSTOMERID CUSTID\n => COUNTRY DESC COUNTRY\n\n Relations \n Records locked",
"time": "15:26",
"topic": "ADO RDD xHarbour",
"username": "James Bott"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-08-05",
"forum": "FiveWin for Harbour/xHarbour",
"text": "AHF,\n\nThe thought just came to me that the customers table in the ACCESS Northwind.mdb does not have the HBRECNO field (because it is a default file). Could that be the reason that the temp indexes aren't working?\n\nJames",
"time": "15:36",
"topic": "ADO RDD xHarbour",
"username": "James Bott"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-08-05",
"forum": "FiveWin for Harbour/xHarbour",
"text": "James,\n\nWithout some autoinc field defined as recno results are unpredictable.\nIt might be it.",
"time": "20:09",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-08-06",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio F,\n\nOK, I exported the customer table from the SQL database to a DBF, dropped the table, then recreated the SQL table so the HBRECNO field would be created. And imported the records back in from the DBF. Then the temp index began working. Problem solved.\n\nThanks for your help.\n\nJames",
"time": "17:14",
"topic": "ADO RDD xHarbour",
"username": "James Bott"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-08-06",
"forum": "FiveWin for Harbour/xHarbour",
"text": "James,\n\nGlad to know. <!-- s:D --><img src=\"{SMILIES_PATH}/icon_biggrin.gif\" alt=\":D\" title=\"Very Happy\" /><!-- s:D --> \n\nBy the way did you make all that with APPEND FROM or and COPY TO?\n\nWhen a table is created with adordd it checks automatically if recno field exists and if not creates it.\n\nWhen you use copy to from dbf to sql since it calls ado_create the recno field its automatically checked you dont need to include it in the structure.",
"time": "17:34",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-08-06",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio F,\n\nYes, I did a COPY TO a dbf, then built the SQL table from the structure of the DBF (and I did know that the HBRECNO field would be added automatically). Then I did an APPEND FROM the dbf. Fairly simple now that I have the code written.\n\nI am wondering about these two lists:\n\n SET ADO TABLES INDEX LIST TO ...\n\n SET ADODBF TABLES INDEX LIST TO ... \n\nWhat is the difference between the ADO and the ADODBF designations?\n\nSince they both contain the same lists aren't they redundant? Or, are there instances where they don't contain the same lists?\n\nJames",
"time": "20:00",
"topic": "ADO RDD xHarbour",
"username": "James Bott"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-08-06",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio F,\n\nYou asked previously about:\n\n SET ADO FORCE LOCK ON\n\nI had a comment in my code that it was required, and you asked why. Well, I found that if you try to do an APPEND FROM with lots of records it will crash without the above statement. I had it crash once at 500 something records and another time at 1300 something records. So there is something going on that is not consistent which leads me to believe it may have to do with memory and/or timing. I am also wondering if it is doing a commit after each record which can account for how slow it appends records. A single commit after every 100 records would increase the speed 100 times. I really can't see any reason why it would need to do a commit after each record.\n\nJames",
"time": "20:06",
"topic": "ADO RDD xHarbour",
"username": "James Bott"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-08-07",
"forum": "FiveWin for Harbour/xHarbour",
"text": "James,\n\nPlease check 01_readme.pdf\n\n[quote:vb7r6kg3]\nA) SET ADO TABLES INDEX LIST TO ….\n----------------------------------------------------\nThis Set is used by the SQL engine to build select with order by.\nThus the fields must be separated by comma and it can include SQL functions or ASC DESC This Set cannot include Clipper/(x)Harbour functions as they are unknown to SQL.\nExample:\nSET ADO TABLES INDEX LIST TO { {\"TABLE1\",{\"FIRST\",\"FIRST DESC\"} }, {\"TABLE2\" ,{\"CODID\",\"CODID\"}} }\n\nB) SET ADODBF TABLES INDEX LIST TO…\n-----------------------------------------------------------\nThis Set is used to evaluate Clipper/(x)Harbour expressions such as:\n\n &( indexkey( 0 ) )\n OrdKey( )\n Etc.\n\nSo it must contain your actual real index expressions.\nExample:\n \nSET ADODBF TABLES INDEX LIST TO {\n{\"TABLE1\",{\"FIRST\",\"FIRST\"} }, {\"TABLE2\"\n,{\"CODID\",\"STR(CODID,2,0)\"}} }\n\n\nSummarize\nWhen we use &(indexkey(0)) we can’t evaluate an index expression in ADO TABLES “NAME, DDATA, NVALUE” we will get an error but we can issue SQL SELECT like that.\nThus we need ADODBF TABLES expression “NAME+DTOS(DDATE )+STR(NVALUE) “ to do it.\nSo both must be defined one for SQL the other real index clipper type expressions.\n[/quote:vb7r6kg3]",
"time": "09:35",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-08-07",
"forum": "FiveWin for Harbour/xHarbour",
"text": "James,\n\n[quote=\"James Bott\":6t3nw8el]\nAntonio F,\n\nYou asked previously about:\n\n SET ADO FORCE LOCK ON\n\nI had a comment in my code that it was required, and you asked why. Well, I found that if you try to do an APPEND FROM with lots of records it will crash without the above statement. I had it crash once at 500 something records and another time at 1300 something records. So there is something going on that is not consistent which leads me to believe it may have to do with memory and/or timing. I am also wondering if it is doing a commit after each record which can account for how slow it appends records. A single commit after every 100 records would increase the speed 100 times. I really can't see any reason why it would need to do a commit after each record.\n\nJames[/quote:6t3nw8el]\n\nWhat do you mean by \"memory and/or time\"?\n\nCOPY TO and APPEND FROM the source area rdd calls ado_append and then ado_putvalue for each record.\nBoth these functions call :update() each time.\nThis might be the reason of taking so long?\n\nDo you mean we should change the :cursorType to adLockBatchOptimistic start a transaction and :updatebatch only at the end?\n\nMay be there is a bug in locks as it should in COPY TO open the destination table exclusively only in APPEND FROM ADORDD locks record by record.\nIll check it.\n\nThanks for your helpful feed back.",
"time": "09:53",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-08-07",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio F,\n\nThanks for the detailed explanation of the indexes. It helps a lot. I thought we were going to have to give up the FW functions, but it seems not. This is great news to me.\n\nJames",
"time": "15:07",
"topic": "ADO RDD xHarbour",
"username": "James Bott"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-08-07",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio F,\n\n[quote:3lf2bw2v]What do you mean by \"memory and/or time\"?[/quote:3lf2bw2v]\n\nMaybe I should have said RAM and timing. In the past I have had programs crash when they ran out of RAM. And also, the OS sometimes lags and the program is expecting something to be done that isn't so you get a error that isn't trapped in your code. Both of these are very hard to solve since they are not exactly repeatable.\n\n[quote:3lf2bw2v]COPY TO and APPEND FROM the source area rdd calls ado_append and then ado_putvalue for each record. Both these functions call :update() each time. This might be the reason of taking so long?[/quote:3lf2bw2v]\n\nOh, it absolutely is the reason.\n\n[quote:3lf2bw2v]Do you mean we should change the :cursorType to adLockBatchOptimistic start a transaction and :updatebatch only at the end?[/quote:3lf2bw2v]\n\nWell it does seem that there is very little chance of someone else trying to access a DBF while it is being created. This is generally a maintenance process, and probably being done when nobody is using the system. Or possibly an export to be used by another program.\n\n[quote:3lf2bw2v]May be there is a bug in locks as it should in COPY TO open the destination table exclusively only in APPEND FROM ADORDD locks record by record.[/quote:3lf2bw2v]\n\nIt would seem proper to COPY TO exclusively.\n\nWith the APPEND FROM, possibly there could be a programming option to set the locking interval; x records or all records. Like I mentioned in a previous post, my calculations were that it would take about 12 hours to append a million records to a local drive (longer on a network drive). So, initializing a large database could take several days with multiple millions of records. A business would have to shut down to do this.\n\nIf I remember correctly, it takes almost the same time to append 100 records (or even 500) followed by a single update, as it does to append 1 record and update. Updates are really slow for some reason.\n\nYesterday I showed a client a sample of one of his data tables running in an SQL engine. He was very pleased to see it.\n\nKeep up the great work you are doing.\n\nJames",
"time": "15:36",
"topic": "ADO RDD xHarbour",
"username": "James Bott"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-08-07",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antoino F,\n\nI forgot to mention that an UPDATE forces the disk buffer to be written to disk, so this the reason the update is so slow. If there is only an UPDATE after 100 records (or even 500) there is still probably (depending on the buffer's size) only one disk write, thus the great increase in speed.\n\nJames",
"time": "16:56",
"topic": "ADO RDD xHarbour",
"username": "James Bott"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-08-11",
"forum": "FiveWin for Harbour/xHarbour",
"text": "James,\n\nUnfortunately I haven't find any way to adordd copy to has enough speed to allow copy to from dbf to sql millions of records. It is really to slow.\n\nadordd copy to is good for copying a small set of records ( couple hundreds ) from or to dbfs or from sql to sql.\n\nIn order to import big dbfs file to sql you can use adofuncs that might do the job much quicker.\n\nI've tried to work with :updatebatch() but then I have then problems with recno autoinc field.\nMay be Mr Rao can help on this subject.\n\nI've made in meantime some improvements in speed and corrected some index management to mimic exactly index behavior and copy to now copies all records both with SET ADO FORCE LOCK ON or OFF.\n\nIll post a new version within the next days.",
"time": "18:04",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-08-11",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio F,\n\nThanks for the update.\n\nI didn't see any mention of changing the commit frequency. Have you looked at that?\n\nI will be looking forward to the updated ADORDD.\n\nI have been working on tests here comparing the results of ADORDD vs DBFCDX drivers and I haven't found any problems yet (other than the APPEND speed). Thanks again for all your work.\n\nJames",
"time": "21:28",
"topic": "ADO RDD xHarbour",
"username": "James Bott"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-08-12",
"forum": "FiveWin for Harbour/xHarbour",
"text": "James,\n\nIn adordd we cant control commit frequency, as far as I know, with :addnew method.\nAs soon as we move or add new record the previous its auto committed because ado auto calls :update().\n\nBeing other rdd than ado in source area the loop its controlled by that rdd and we cant do anything else.\n\nOn the other hand when the source rdd its adordd then we could be much faster because its adordd controlling the loop through ado_trans.\nHere we could use the following: \n\nSELECT * INTO newfile FROM currentfile\n\nBut we have a limitation we can evaluate the while or for code blocks because we only receive it as a code block thus disabling us to use it as WHERE clause expression so we will end with the same speed problem.\n\nThe only way out is to have a hb_adorddcopyto( origin file, dest file, where clause ).\nHere its very fast because its pure SQl treated as above.\n\nBut I dont know if it is worth while to build such function because you can do it directly from app code and doesn't interfere or take advantage with adordd.\n\nEx\n[code=fw:18a2o4nn]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /><br /><span style=\"color: #B900B9;\">//get adordd connection to have it in same transaction processing</span><br />hb_GetAdoConnection<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span>:<span style=\"color: #000000;\">Execute</span><span style=\"color: #000000;\">(</span> <span style=\"color: #ff0000;\">\"SELECT * INTO newfile FROM currentfile WHERE expression\"</span> <span style=\"color: #000000;\">)</span><br /><br />USE newfile /this is adordd<br />....<br /> </div>[/code:18a2o4nn]\n\nIf there is any way to get from the code block the char expression then we could do it completed integrated in adordd otherwise I cant see how we can do it.",
"time": "11:00",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-08-12",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio,\n\n[quote:18u2yb7o]If there is any way to get from the code block the char expression[/quote:18u2yb7o]\n\nUnfortunately no, unless we save it as a string value in advance",
"time": "16:28",
"topic": "ADO RDD xHarbour",
"username": "Antonio Linares"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-08-12",
"forum": "FiveWin for Harbour/xHarbour",
"text": "James,\n\n[quote:h7kgj66a]Yes, I did a COPY TO a dbf, then built the SQL table from the structure of the DBF (and I did know that the HBRECNO field would be added automatically). Then I did an APPEND FROM the dbf. Fairly simple now that I have the code written.[/quote:h7kgj66a]\n\nI forgot to mention that you can do it with just one step\n[code=fw:h7kgj66a]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br />USE dbf VIA <span style=\"color: #ff0000;\">\"DBFCDX\"</span><br />COPY <span style=\"color: #0000ff;\">TO</span> sqltable VIA <span style=\"color: #ff0000;\">\"ADORDD\"</span> <span style=\"color: #B900B9;\">//if not the default rdd</span><br /> </div>[/code:h7kgj66a]\n\nAfter investigating, the fastest way to import big amounts of data to MySql is to export it first to csv file and then import it using LOAD DATA statement. I think other DBs engines have alternatives like this.\nYou can try it like using the example in my previous post.\n\nIn adordd we can do anything else to improve it and maintaining 100% compatibility with existing app code.",
"time": "17:48",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-08-17",
"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\nChanges:\n\nFaster opening recordsets \nRecordsets are now opened by recno order when no index is active as any dbf\nTables without auto inc fieldto be used as recno throws an error whe opening it\nReccount faster\nCopy To (from other rdd to adordd) works ok with both set ado force locks on / off",
"time": "20:02",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-08-26",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Hello Antonio F and others,\n\nI have a question about adordd, I want to understand better how adordd works.\n\n[code=fw:meyvfnow]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">\"fivewin.ch\"</span><br /><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">\"adordd.ch\"</span><br /><br /> REQUEST ADORDD, ADOVERSION<br /><br /> <span style=\"color: #00C800;\">FUNCTION</span> Main<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /><br /> RddRegister<span style=\"color: #000000;\">(</span><span style=\"color: #ff0000;\">\"ADORDD\"</span>,<span style=\"color: #000000;\">1</span><span style=\"color: #000000;\">)</span><br /> RddSetDefault<span style=\"color: #000000;\">(</span><span style=\"color: #ff0000;\">\"ADORDD\"</span><span style=\"color: #000000;\">)</span><br /> <br /> SET ADO FORCE LOCK OFF <span style=\"color: #B900B9;\">// Required!</span><br /> <br /> SET ADO <span style=\"color: #00C800;\">DEFAULT</span> DATABASE <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #ff0000;\">\"testdb1\"</span> <span style=\"color: #00C800;\">SERVER</span> <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #ff0000;\">\"localhost\"</span> ENGINE <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #ff0000;\">\"MYSQL\"</span> USER <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #ff0000;\">\"root\"</span> PASSWORD <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #ff0000;\">\"password\"</span><br /> <br /> USE CUSTOMER<br /> APPEND BLANK<br /> REPLACE FIELD->FIRST WITH <span style=\"color: #ff0000;\">\"Pieter2\"</span> <br /> <span style=\"color: #B900B9;\">// APPEND FROM customer2 via \"DBFCDX\"</span><br /> <br /> BROWSE<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:meyvfnow]\n\nQuestion: where are Commands, like USE, APPEND BLANK, REPLACE FIELD etc translated into ado code? I tried to find it in adordd.prg, adordd.ch, but I could not find it.\n\nBest regards,\n\nPieter",
"time": "13:25",
"topic": "ADO RDD xHarbour",
"username": "pieter"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-08-26",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Pieter,\n\nadordd its coded at usr rdd level so there isn't any translation into ado code.\nIt is the default rdd that is replaced by adordd like ads rdd, dbfcdx rdd or any other rdd.\nAll rdd table and index functions will work exactly the same. \nNothing changes in your code.\n\nIn adordd.prg for ex the REPLACE or Fieldput calls the ADO_PUTVALUE.\nThe rdd fuctions are \"mapped \" to the ado functions in ADORDD_GETFUNCTABLE.\n\nThis is why the level of app code compatibility its so high with adordd against other approaches. \nSyntax is exactly the same.\nBut you can also work (getting the work area recordset or connection) with SQL directly using functions like those in adofuncs.prg or executing SQL statements.\n\nResuming you can wok only ISAM based or SQL based or both. Its your choice.\nBesides this the code will be totally compatible with standard (x)Harbour rdd code so it will work exactly the same if you change the adordd to any other.",
"time": "14:52",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-08-26",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio,\n\nThank you:D. I think I understand the concept partially, but I also think there is still some things to learn for me.\n\nSo is it true that usrrdd.lib and/or rdds.lib in the xharbour123/lib directory implement the rdd. If yes, what is then the difference between usrrdd.lib and adordd.lib?\nAre usrdd.lib and rdds.lib written in C language?\n\nIn my Clipper 5.2 book from Rick Spence there is a picture which looks like this:\nDatabase commands -> RDD Interface -> Database driver - Storted data.\n\nI understand Database commands (USE, APPEND BLANK) and storted data (dfb file/sql). I understand the main concept of a rdd (Replaceabel database driver, a layer, which one can change, and the code can stay same, even when you have another database system under it), but the differences between RDD interface and Database driver is not yet clear for me. Do usrdd.lib and rdds.lib and adordd.lib belong to RDD interface or to the database driver?\n\nI am not sure whether I asked questions very well or if they are really importent. But if you have some tips that would be welcome.\n\nThanks again.\n\nBest regards,\n\nPieter",
"time": "16:15",
"topic": "ADO RDD xHarbour",
"username": "pieter"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-08-26",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Pieter,\n\nIm not a rdd expert at this level.\nMay be Antonio Linares can explain it better.\n\n[quote:3cz1pmq7]So is it true that usrrdd.lib and/or rdds.lib in the xharbour123/lib directory implement the rdd. If yes, what is then the difference between usrrdd.lib and adordd.lib?\nAre usrdd.lib and rdds.lib written in C language?\n[/quote:3cz1pmq7]\n\nI see usrrdd as an interface to allow us programming new rdds. \nIts usrrdd that organizes all work areas data memory spaces etc.\nusrrdd for itself it does nothing.\nYes check usrrdd.c\n\n[quote:3cz1pmq7]\nIn my Clipper 5.2 book from Rick Spence there is a picture which looks like this:\nDatabase commands -> RDD Interface -> Database driver - Storted data.\n[/quote:3cz1pmq7]\n\nI think in adordd it is:\nDatabase commands -> ADORDD -> ADO FRAMEWORK - Storted data.\nor\nDatabase commands -> USRRDD -> ADORDD - Storted data.\n\n[quote:3cz1pmq7]\nI understand Database commands (USE, APPEND BLANK) and storted data (dfb file/sql). I understand the main concept of a rdd (Replaceabel database driver, a layer, which one can change, and the code can stay same, even when you have another database system under it), but the differences between RDD interface and Database driver is not yet clear for me. Do usrdd.lib and rdds.lib and adordd.lib belong to RDD interface or to the database driver?\n[/quote:3cz1pmq7]\n\nSee above.\n\nWhat is the reason for all these questions ? What are you looking for?",
"time": "18:19",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-08-27",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio F,\n\nBefore I spend time testing this, I thought I should ask.\n\nFirst, I thought we were not supposed to be able to use any functions in SQL indexes, but then I saw you mentioned using (x)Harbour functions such as DTOS(DATE).\n\nI am wondering if user-defined functions can be used? I have tried one and it is sorting the data, but it isn't sorting the same way it does when using the DBFNTX RDD, so I am assuming we can't.\n\nI hope I'm wrong. Maybe I have the syntax wrong.\n\nJames",
"time": "06:53",
"topic": "ADO RDD xHarbour",
"username": "James Bott"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-08-27",
"forum": "FiveWin for Harbour/xHarbour",
"text": "James,\n\n[quote:1xfnqgq3]First, I thought we were not supposed to be able to use any functions in SQL indexes, but then I saw you mentioned using (x)Harbour functions such as DTOS(DATE).\n[/quote:1xfnqgq3]\n\n[code=fw:1xfnqgq3]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /> <span style=\"color: #B900B9;\">//SQL CAN BE USED ANY SQL FUNCTIONS MATCHING CLIPPER FUNCTIONS</span><br /> <span style=\"color: #B900B9;\">// WE DONT NEED THE CONVERSION FUNCTIONS IN SQL</span><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;\">\"TABLE1\"</span>,<span style=\"color: #000000;\">{</span><span style=\"color: #ff0000;\">\"COD1\"</span>,<span style=\"color: #ff0000;\">\"COD+NCOD2+DCOD3\"</span><span style=\"color: #000000;\">}</span>...<br /><br /> <span style=\"color: #B900B9;\">// CLIPPER EXPRESSIONS </span><br /> <span style=\"color: #B900B9;\">// WE NEED THIS OTHERWISE IF YOU DO &(INDEXKEY(0)) YOU GET AN ERROR</span><br /> SET ADODBF 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;\">\"TABLE1\"</span>,<span style=\"color: #000000;\">{</span><span style=\"color: #ff0000;\">\"COD1\"</span>,<span style=\"color: #ff0000;\">\"COD+STR(NCOD2)+DTOS(DCOD3)\"</span><span style=\"color: #000000;\">}</span>...<br /> <br /> </div>[/code:1xfnqgq3]\n\nConcerning UDFs the SQL engine doesnt know it so the only chance is to create these UDFs at the server and then you should be able to call it just like any other SQL function.\nRemember that the counter type of that SQL function in our app must be defined in SET ADODBF INDEX LIST to enable our app to evaluate it any time.\nBesides that remember that the Vars must be passed in the index expressions already evaluated as in SQL engine they are out of scope.\nNever tried it but it should work.\n \nWith ADS its exactly like this.\n\nWhen you said that you tried UDF this is what happens:\n\nIf used with INDEX ON the function its simply ignored and if there is a FIELD inside is simply extracted.\nIf used with SET ADO TABLES INDEX it should generate an error if its not defined at the server.\n\nPlease check for ex. MYsql CREATE FUNCTION",
"time": "09:35",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-08-27",
"forum": "FiveWin for Harbour/xHarbour",
"text": "[quote=\"AHF\":2ndtcw9g]Pieter,\n\nIm not a rdd expert at this level.\nMay be Antonio Linares can explain it better.\n\n[quote:2ndtcw9g]So is it true that usrrdd.lib and/or rdds.lib in the xharbour123/lib directory implement the rdd. If yes, what is then the difference between usrrdd.lib and adordd.lib?\nAre usrdd.lib and rdds.lib written in C language?\n[/quote:2ndtcw9g]\n\nI see usrrdd as an interface to allow us programming new rdds. \nIts usrrdd that organizes all work areas data memory spaces etc.\nusrrdd for itself it does nothing.\nYes check usrrdd.c\n\n[quote:2ndtcw9g]\nIn my Clipper 5.2 book from Rick Spence there is a picture which looks like this:\nDatabase commands -> RDD Interface -> Database driver - Storted data.\n[/quote:2ndtcw9g]\n\nI think in adordd it is:\nDatabase commands -> ADORDD -> ADO FRAMEWORK - Storted data.\nor\nDatabase commands -> USRRDD -> ADORDD - Storted data.\n\n[quote:2ndtcw9g]\nI understand Database commands (USE, APPEND BLANK) and storted data (dfb file/sql). I understand the main concept of a rdd (Replaceabel database driver, a layer, which one can change, and the code can stay same, even when you have another database system under it), but the differences between RDD interface and Database driver is not yet clear for me. Do usrdd.lib and rdds.lib and adordd.lib belong to RDD interface or to the database driver?\n[/quote:2ndtcw9g]\n\nSee above.\n\nWhat is the reason for all these questions ? What are you looking for?[/quote:2ndtcw9g]\n\nAntonio F,\n\n[quote:2ndtcw9g]What is the reason for all these questions ?[/quote:2ndtcw9g]\nI want to know how things conceputally works. How the technologies work together. I think that in the long term I can then solve prolems better.\n\n[quote:2ndtcw9g]What are you looking for?[/quote:2ndtcw9g]\nSee above,\n\nI have demonstrated a adordd test application(Topic: Test ado rdd app: <!-- l --><a class=\"postlink-local\" href=\"http://forums.fivetechsupport.com/viewtopic.php?f=3&t=30963\">viewtopic.php?f=3&t=30963</a><!-- l -->) to my colleages, now we are all interested in using it. Originally we wanted to use only standard ado, but I think using adordd also, is very good.\n\nI want to thank you and everybody else who made it possible that that we can use the code of adordd.prg and I wish your project at <!-- m --><a class=\"postlink\" href=\"http://ajusera.com\">http://ajusera.com</a><!-- m --> lots of luck:).\n\nBest regards,\n\nPieter",
"time": "14:38",
"topic": "ADO RDD xHarbour",
"username": "pieter"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-08-27",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio F,\n\n[code=fw:2kj5gnt0]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><span style=\"color: #B900B9;\">//SQL CAN BE USED ANY SQL FUNCTIONS MATCHING CLIPPER FUNCTIONS</span><br /><span style=\"color: #B900B9;\">// WE DONT NEED THE CONVERSION FUNCTIONS IN SQL</span><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;\">\"TABLE1\"</span>,<span style=\"color: #000000;\">{</span><span style=\"color: #ff0000;\">\"COD1\"</span>,<span style=\"color: #ff0000;\">\"COD+NCOD2+DCOD3\"</span><span style=\"color: #000000;\">}</span>...</div>[/code:2kj5gnt0]\n\nAre you saying that SQL can concatenate unlike data values automatically? Are unlike data values always converted to string, or could you add a date + 10 and get a date ten days after the date specified? (I'm not sure why you might want to do that, just wondering.)\n\nI just looked up SQL functions for ACCESS and see there are some, but only 8 and maybe 3 or 4 of them might be useful. And none of them deal with dates. Sigh...\n\nLater I will look up SQL functions for MySQL.\n\n[code=fw:2kj5gnt0]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><span style=\"color: #B900B9;\">// CLIPPER EXPRESSIONS </span><br /><span style=\"color: #B900B9;\">// WE NEED THIS OTHERWISE IF YOU DO &(INDEXKEY(0)) YOU GET AN ERROR</span><br />SET ADODBF 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;\">\"TABLE1\"</span>,<span style=\"color: #000000;\">{</span><span style=\"color: #ff0000;\">\"COD1\"</span>,<span style=\"color: #ff0000;\">\"COD+STR(NCOD2)+DTOS(DCOD3)\"</span><span style=\"color: #000000;\">}</span>...</div>[/code:2kj5gnt0]\n\nI don't think I have ever used indexkey() before. I just read up on it, and I will have to think of where I might use it in the future. Does this only apply to indexkey() or are there other xHarbour functions too? If so, which ones? \n\n[quote:2kj5gnt0][UDFs] If used with INDEX ON the function is simply ignored and if there is a FIELD inside is simply extracted.\n\nWhen you said that you tried a UDF this is what happens:\n\nIf used with SET ADO TABLES INDEX it should generate an error if its not defined at the server.[/quote:2kj5gnt0]\n\nThis what I would have expected, and I did get an error when I tried two indexes--something like \"Too many recursive errors.\" OK, I don't understand how you can define a function at the server. What language do you use? Does the server understand xHarbour? I will Google this.\n\nThe one index used a lot in the app I am trying to convert uses two different fields, both containing strings, and concatenates them into a larger string then adds the two digits of the century (either \"19\" or \"20\"). So you end up with what you would normally get with DTOS(dDate). Yes it is strangely overly complex, but I am stuck with it. Yes, I can create a third field and post the result to it every time the record is saved, and (I think) the data is always saved using my database class, so it would be simple to force this automatically within the Save() method. But I will have to view over 100,000 lines of code to insure that all data is saved via the Save() method. (I going to need lots of coffee and some reading glasses for that!).\n\nI know, \"If it was easy, anyone could do it!\"\n\nThanks for your patience dealing with a SQL novice.\n\nJames",
"time": "15:12",
"topic": "ADO RDD xHarbour",
"username": "James Bott"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-08-27",
"forum": "FiveWin for Harbour/xHarbour",
"text": "James,\n\n[quote:22q5p10h]Are you saying that SQL can concatenate unlike data values automatically? Are unlike data values always converted to string, or could you add a date + 10 and get a date ten days after the date specified? (I'm not sure why you might want to do that, just wondering.)\n[/quote:22q5p10h]\n\nIn order by (indexes) you dont need to make any conversion between different data types as opposite to clipper thats why these ADORDD SET ... INDEX....\n\nSELECT DDATA+10 AS MYDATE ORDER BY MYSTRING+MYDATE\n\n[quote:22q5p10h]I don't think I have ever used indexkey() before. I just read up on it, and I will have to think of where I might use it in the future. [/quote:22q5p10h]\n\nseek key\ndo while indexkey(0) = key //gives some abstraction of the fields we are seeking\n\n[quote:22q5p10h]Does this only apply to indexkey() or are there other xHarbour functions too? If so, which ones? [/quote:22q5p10h]\n\nThis applies to all functions and I dont know how many but one thing is sure the expected return values are respected acc clipper standards where you cant have different data types together in same expression without convert it all to the same data type.\n\n[quote:22q5p10h]This what I would have expected, and I did get an error when I tried two indexes--something like \"Too many recursive errors.\" OK, I don't understand how you can define a function at the server. What language do you use? Does the server understand xHarbour? I will Google this.\n[/quote:22q5p10h]\n\nI think UDFunctions at MySql server must be written in C. Others I dont know.\nIn ADS you can also do it.\n\n[quote:22q5p10h]The one index used a lot in the app I am trying to convert uses two different fields, both containing strings, and concatenates them into a larger string then adds the two digits of the century (either \"19\" or \"20\")[/quote:22q5p10h]\n\nIt probably can be done. Please post index expression.",
"time": "15:39",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-08-27",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio F,\n\nHere is the index and the UDF.\n\nIDATE and DATE are two character fields. IDATE is in the format YYMM where it is the last two digits of the year (e.g. 15 for 2015). DATE is really day in the format DD. Like I said previously, icon3() just returns what you would get from DTOS( dDate ) when SET EPOCH TO 1980 is set.\n\n[code=fw:12h53whu]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><span style=\"color: #0000ff;\">INDEX</span> <span style=\"color: #0000ff;\">ON</span> ICON3<span style=\"color: #000000;\">(</span>IDATE+DATE<span style=\"color: #000000;\">)</span> <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #ff0000;\">\"DATE\"</span><br /><br /><span style=\"color: #B900B9;\">// icondate is in format YYMMDD</span><br /><span style=\"color: #B900B9;\">// Returned date is in format YYYYMMDD</span><br /><span style=\"color: #00C800;\">FUNCTION</span> icon3<span style=\"color: #000000;\">(</span>icondate<span style=\"color: #000000;\">)</span><br /> <span style=\"color: #B900B9;\">//icondate is idate+date</span><br /> <span style=\"color: #00C800;\">IF</span> VAL<span style=\"color: #000000;\">(</span><span style=\"color: #0000ff;\">SUBSTR</span><span style=\"color: #000000;\">(</span>icondate,<span style=\"color: #000000;\">1</span>,<span style=\"color: #000000;\">2</span><span style=\"color: #000000;\">)</span><span style=\"color: #000000;\">)</span>< <span style=\"color: #000000;\">80</span><br /> <span style=\"color: #00C800;\">RETURN</span> <span style=\"color: #ff0000;\">'20'</span>+icondate<br /> <span style=\"color: #00C800;\">ELSE</span><br /> <span style=\"color: #00C800;\">RETURN</span> <span style=\"color: #ff0000;\">'19'</span>+icondate<br /> <span style=\"color: #00C800;\">ENDIF</span><br /><span style=\"color: #00C800;\">RETURN</span> <span style=\"color: #00C800;\">nil</span> <br /><br /> </div>[/code:12h53whu]\n\n\nJames",
"time": "16:09",
"topic": "ADO RDD xHarbour",
"username": "James Bott"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-08-27",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio F,\n\nHere is how it can be solved using a database class (and adding a new field SDATE).\n\n[code=fw:19keonzj]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><span style=\"color: #00C800;\">Method</span> Save<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00C800;\">IF</span> VAL<span style=\"color: #000000;\">(</span><span style=\"color: #0000ff;\">SUBSTR</span><span style=\"color: #000000;\">(</span>::<span style=\"color: #000000;\">IDATE</span>+::<span style=\"color: #000000;\">DATE</span>,<span style=\"color: #000000;\">1</span>,<span style=\"color: #000000;\">2</span><span style=\"color: #000000;\">)</span><span style=\"color: #000000;\">)</span>< <span style=\"color: #000000;\">80</span><br /> ::<span style=\"color: #000000;\">SDATE</span>:=<span style=\"color: #ff0000;\">'20'</span>+::<span style=\"color: #000000;\">IDATE</span>+::<span style=\"color: #000000;\">DATE</span><br /> <span style=\"color: #00C800;\">ELSE</span><br /> ::<span style=\"color: #000000;\">SDATE</span>:=<span style=\"color: #ff0000;\">'19'</span>+::<span style=\"color: #000000;\">IDATE</span>+::<span style=\"color: #000000;\">DATE</span><br /> <span style=\"color: #00C800;\">ENDIF</span><br /><span style=\"color: #00C800;\">Return</span> ::<span style=\"color: #00C800;\">super</span>:<span style=\"color: #000000;\">save</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /> </div>[/code:19keonzj]\n\nJames",
"time": "16:22",
"topic": "ADO RDD xHarbour",
"username": "James Bott"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-08-28",
"forum": "FiveWin for Harbour/xHarbour",
"text": "James,\n\nYou can use If( in SELECT and in ORDER BY.\n\nSELECT field+IF( field1= ..., true expr, false expr) AS myfield FROM myTable ORDER BY myfield\n\nor\n\nSELECT field ORDER BY field+IF( field1= ..., true, false)\n\nYou can also use CASE instead of IF.\n\nYou can use also conversion functions such as CONVERT(.... or concatenation CONCAT(...\n\nPlease remember that these SQL order by expressions must be at SET ADO TABLE LIST INDEX",
"time": "12:47",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-08-28",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio F,\n\nOk, thanks that is all very useful info.\n\n[quote:15jmk6w9]SELECT field ORDER BY field+IF( field1= ..., true, false)[/quote:15jmk6w9]\n\nSo could I then convert this UDF:\n\n[code=fw:15jmk6w9]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><span style=\"color: #00C800;\">FUNCTION</span> icon3<span style=\"color: #000000;\">(</span>icondate<span style=\"color: #000000;\">)</span><br /> <span style=\"color: #B900B9;\">//icondate is idate+date</span><br /> <span style=\"color: #00C800;\">IF</span> VAL<span style=\"color: #000000;\">(</span><span style=\"color: #0000ff;\">SUBSTR</span><span style=\"color: #000000;\">(</span>icondate,<span style=\"color: #000000;\">1</span>,<span style=\"color: #000000;\">2</span><span style=\"color: #000000;\">)</span><span style=\"color: #000000;\">)</span>< <span style=\"color: #000000;\">80</span><br /> <span style=\"color: #00C800;\">RETURN</span> <span style=\"color: #ff0000;\">'20'</span>+icondate<br /> <span style=\"color: #00C800;\">ELSE</span><br /> <span style=\"color: #00C800;\">RETURN</span> <span style=\"color: #ff0000;\">'19'</span>+icondate<br /> <span style=\"color: #00C800;\">ENDIF</span><br /><span style=\"color: #00C800;\">RETURN</span> <span style=\"color: #00C800;\">nil</span></div>[/code:15jmk6w9]\n\nTo this index (assuming using MySQL):\n\n[code=fw:15jmk6w9]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><span style=\"color: #0000ff;\">index</span> <span style=\"color: #0000ff;\">on</span> <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">(</span><span style=\"color: #0000ff;\">left</span><span style=\"color: #000000;\">(</span>idate,<span style=\"color: #000000;\">2</span><span style=\"color: #000000;\">)</span><<span style=\"color: #ff0000;\">\"80\"</span>, <span style=\"color: #ff0000;\">\"20\"</span>+idate+date, <span style=\"color: #ff0000;\">\"19\"</span>+idate+date<span style=\"color: #000000;\">)</span></div>[/code:15jmk6w9]\n\nThe above would, of course, also work with Fivewin.\n\nJames",
"time": "15:13",
"topic": "ADO RDD xHarbour",
"username": "James Bott"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-08-28",
"forum": "FiveWin for Harbour/xHarbour",
"text": "James,\n\nYou have to try it with Mysql Workbench and then apply the correct expression into the app.\n\nI dont know if such literal expression is accepted in INDEX ON at the compile time you have to try it. My be you have to place it in a var and evaluated in INDEX ON\nIn SET ADO DBF INDEX it would be ok.\n\n\nPlease be aware that you will might need different expressions accordingly to the SQL engine used.",
"time": "15:45",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-09-08",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Hello Antonio F, and other members.\n\nIt is going well with the adordd implementation of my application. (I am using now a smaller application than the normal application, but it should be similar for the normal application). \n\nI got an error at this moment.\n\nPart of the log of the error:\n\nApplication\n===========\n \n \n \n Admin.: -\n ADS: LOCAL\n Error ocurred at: 08-09-2015, 14:39:07\n \n Error description: Error BASE/1132 Bound error: array access\n Error id 1: -\n Error id 2: -\n Current opened dbf: BASIS - 1\n Last menu action: <onbekend>\n Args:\n [ 1] = A (L=0)\n [ 2] = N 1\n\nStack Calls\n===========\n Called from ADOPSEUDOSEEK(3749)\n Called from ADOSEEKCLIFIND(3412)\n Called from ADO_SEEK(3371)\n Called from DBSEEK(0)\n Called from DBFSEEK(1479)\n Called from DBFSELECT(1465)\n Called from ABASIS(2912)\n Called from UBTEST(42)\n\nSystem\n======\n CPU type: Intel(R) Pentium(R) CPU N3540 @ 2.16GHz 2166 Mhz\n Hardware memory: 3500 megs\n Compiler version: xHarbour 1.2.3 Intl. (SimpLex) (Build 20150213)\n Windows version: 8\n\nOur application works with ADS, I tried to remove the ads parts out of the application, and replace with adordd code. There were only very few places where I had to do that.\nHere are some of the changes which looks like:\n\n[code=fw:169qa4mo]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /><span style=\"color: #00C800;\">IF</span><span style=\"color: #000000;\">(</span>.F.<span style=\"color: #000000;\">)</span><br /><span style=\"color: #B900B9;\">// Check if Ads is used local or remote</span><br />lAdsLocal := <span style=\"color: #00C800;\">IF</span><span style=\"color: #000000;\">(</span> AppRegistry<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">2</span>,<span style=\"color: #ff0000;\">\"ADS\"</span>,<span style=\"color: #ff0000;\">\"\"</span> <span style=\"color: #000000;\">)</span> == <span style=\"color: #ff0000;\">\"LOCAL\"</span>,.T.,.F. <span style=\"color: #000000;\">)</span><br />nAdsType := <span style=\"color: #00C800;\">IF</span><span style=\"color: #000000;\">(</span> lAdsLocal,<span style=\"color: #000000;\">1</span>,<span style=\"color: #000000;\">2</span> <span style=\"color: #000000;\">)</span><br /><br /><span style=\"color: #B900B9;\">// Harbour database engine</span><br />rddRegister<span style=\"color: #000000;\">(</span> <span style=\"color: #ff0000;\">\"ADS\"</span>,<span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">)</span><br />rddsetdefault<span style=\"color: #000000;\">(</span> <span style=\"color: #ff0000;\">\"ADS\"</span> <span style=\"color: #000000;\">)</span><br />AdsSetServerType<span style=\"color: #000000;\">(</span> nAdsType <span style=\"color: #000000;\">)</span> <span style=\"color: #B900B9;\">// 1=Local, 2=Remote, 4=AIS</span><br />AdsSetFileType<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">2</span> <span style=\"color: #000000;\">)</span> <span style=\"color: #B900B9;\">// 1=Ntx, 2=Cdx, 3=Adt</span><br /><br /><span style=\"color: #00C800;\">ELSE</span><br /><br /><span style=\"color: #B900B9;\">//ADORDD</span><br />RddRegister<span style=\"color: #000000;\">(</span><span style=\"color: #ff0000;\">\"ADORDD\"</span>,<span style=\"color: #000000;\">1</span><span style=\"color: #000000;\">)</span><br />RddSetDefault<span style=\"color: #000000;\">(</span><span style=\"color: #ff0000;\">\"ADORDD\"</span><span style=\"color: #000000;\">)</span><br />SET ADO FORCE LOCK OFF <span style=\"color: #B900B9;\">// Required!</span><br />SET ADO <span style=\"color: #00C800;\">DEFAULT</span> DATABASE <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #ff0000;\">\"database\"</span> <span style=\"color: #00C800;\">SERVER</span> <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #ff0000;\">\"localhost\"</span> ENGINE <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #ff0000;\">\"MYSQL\"</span> USER <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #ff0000;\">\"root\"</span> PASSWORD <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #ff0000;\">\"password\"</span><br /><br /><span style=\"color: #00C800;\">ENDIF</span><br /><br /> </div>[/code:169qa4mo]\n\n[code=fw:169qa4mo]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /><span style=\"color: #B900B9;\">//#define ADS_DRIVER \"ADS\"</span><br /><span style=\"color: #00D7D7;\">#define</span> ADS_DRIVER <span style=\"color: #ff0000;\">\"ADORDD<br /></span></div>[/code:169qa4mo]\n\n[code=fw:169qa4mo]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br />REM ADORDD files opnemen<br />echo %hbdir%\\lib\\adordd.lib + >> UBtest.bc<br />echo %hbdir%\\lib\\rdds.lib + >> UBtest.bc<br />echo %hbdir%\\lib\\usrrdd.lib + >> UBtest.bc<br /><br />REM ADS files opnemen<br />rem echo %hbdir%\\lib\\rddads.lib + >> UBtest.bc<br />rem echo %acedir%\\Ace32.lib + >> UBtest.bc<br /> </div>[/code:169qa4mo]\n\nI hope you can help me with where I should find the solution. Do you think I should change something in my application or in adorrd.prg?\n\nKind regards,\n\nPieter",
"time": "14:47",
"topic": "ADO RDD xHarbour",
"username": "pieter"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-09-08",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Pieter,\n\nWhat adordd version are you using?\n\nI would not take out ADS from your prgs I would use instead around the code:\n\n[code=fw:bga7je6t]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /><span style=\"color: #00C800;\">IF</span> RDDSETDEFAUL<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span> == <span style=\"color: #ff0000;\">\"ADORDD\"</span><br /> <span style=\"color: #B900B9;\">//adordd code chages</span><br /><span style=\"color: #00C800;\">ELSE</span><br /> <span style=\"color: #B900B9;\">//your actual code</span><br /><span style=\"color: #00C800;\">ENDIF</span><br /> </div>[/code:bga7je6t]\n\nand link all rdds. \nThen you only have to change RDDSETDEFAULT and your app will work with any of them.\n\nBy the way the next version of adordd has big changes and it seems that will be 100% compatible with any clipper code. Just link and go.\n\nChanges:\nData from server only read once.\nBetter underlying data synchronization (deletions and new additions by others).\nBig big improvements in speed ( seeks, relations, record movement, filters, etc) browses even with several relations are extremely fast.\nIndexes are not anymore queries with order by but :Sort instead. \nFinally Indexes with any clipper expressions including any UDFs. Thanks to Mr Rao!\nCode in general cleaner and much reduced.\n\nI hope to have it ready between 21-26.09 because we are testing every change.\nAll our trials are done with MySql / ACCESS and recordsets between 50.000 and 200.000 recs.",
"time": "16:01",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-09-08",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio F,\n\nThank you:D. How can I see which version of ADORDD I have in the application? Something like MsgInfo(ADORDDVERSION()) maybe? \n\nI am looking forward to the new adordd.\n\nPieter",
"time": "16:19",
"topic": "ADO RDD xHarbour",
"username": "pieter"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-09-08",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Pieter,\n\nADOVERSION()",
"time": "16:23",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-09-09",
"forum": "FiveWin for Harbour/xHarbour",
"text": "MsgInfo(ADOVERSION()) gives: AdoRdd Version 1.170815/1",
"time": "07:47",
"topic": "ADO RDD xHarbour",
"username": "pieter"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-09-09",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Pieter,\n\nThere is a problem with open indexes but I dont now what.\n\nDo you have the tables and indexes opened in your error log? Can you post it ?\n\nIf you dont you can use this code to check it.\n\n[code=fw:2xkxvpjo]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /><span style=\"color: #00C800;\">FUNCTION</span> expalias<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /><span style=\"color: #00C800;\">LOCAL</span> cerrorlog := <span style=\"color: #ff0000;\">\"\"</span>,n,j,ntarget,x<br /><br /> <span style=\"color: #00C800;\">for</span> n = <span style=\"color: #000000;\">1</span> <span style=\"color: #0000ff;\">to</span> <span style=\"color: #000000;\">255</span><br /> <span style=\"color: #00C800;\">if</span> ! Empty<span style=\"color: #000000;\">(</span> <span style=\"color: #0000ff;\">Alias</span><span style=\"color: #000000;\">(</span> n <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span><br /> cErrorLog += CRLF + Str<span style=\"color: #000000;\">(</span> n, <span style=\"color: #000000;\">3</span> <span style=\"color: #000000;\">)</span> + <span style=\"color: #ff0000;\">\": \"</span> + <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">(</span> <span style=\"color: #0000ff;\">Select</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span> == n,<span style=\"color: #ff0000;\">\"=> \"</span>, <span style=\"color: #ff0000;\">\" \"</span> <span style=\"color: #000000;\">)</span> + ;<br /> PadR<span style=\"color: #000000;\">(</span> <span style=\"color: #0000ff;\">Alias</span><span style=\"color: #000000;\">(</span> n <span style=\"color: #000000;\">)</span>, <span style=\"color: #000000;\">15</span> <span style=\"color: #000000;\">)</span> + Space<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">20</span> <span style=\"color: #000000;\">)</span> + <span style=\"color: #ff0000;\">\"NomeRDD: \"</span> + ;<br /> <span style=\"color: #000000;\">(</span> <span style=\"color: #0000ff;\">Alias</span><span style=\"color: #000000;\">(</span> n <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>-><span style=\"color: #000000;\">(</span> RddName<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span> + CRLF<br /> cErrorLog += <span style=\"color: #ff0000;\">\" ==============================\"</span> + CRLF<br /> cErrorLog += <span style=\"color: #ff0000;\">\" RecNo RecCount BOF EOF\"</span> + CRLF<br /> cErrorLog += <span style=\"color: #ff0000;\">\" \"</span> + Transform<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">(</span> <span style=\"color: #0000ff;\">Alias</span><span style=\"color: #000000;\">(</span> n <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>-><span style=\"color: #000000;\">(</span> RecNo<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>, <span style=\"color: #ff0000;\">\"99999\"</span> <span style=\"color: #000000;\">)</span> + ;<br /> <span style=\"color: #ff0000;\">\" \"</span> + Transform<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">(</span> <span style=\"color: #0000ff;\">Alias</span><span style=\"color: #000000;\">(</span> n <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>-><span style=\"color: #000000;\">(</span> RecCount<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>, <span style=\"color: #ff0000;\">\"99999\"</span> <span style=\"color: #000000;\">)</span> + ;<br /> <span style=\"color: #ff0000;\">\" \"</span> + cValToChar<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">(</span> <span style=\"color: #0000ff;\">Alias</span><span style=\"color: #000000;\">(</span> n <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>-><span style=\"color: #000000;\">(</span> BoF<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span> + ;<br /> <span style=\"color: #ff0000;\">\" \"</span> + cValToChar<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">(</span> <span style=\"color: #0000ff;\">Alias</span><span style=\"color: #000000;\">(</span> n <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>-><span style=\"color: #000000;\">(</span> EoF<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span> + CRLF + CRLF<br /> cErrorLog += <span style=\"color: #ff0000;\">\" Índices em uso \"</span> + Space<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">23</span> <span style=\"color: #000000;\">)</span> + <span style=\"color: #ff0000;\">\"TagName\"</span> + CRLF<br /><br /> <span style=\"color: #00C800;\">for</span> j = <span style=\"color: #000000;\">1</span> <span style=\"color: #0000ff;\">to</span> <span style=\"color: #000000;\">15</span><br /> <span style=\"color: #00C800;\">if</span> ! Empty<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">(</span> <span style=\"color: #0000ff;\">Alias</span><span style=\"color: #000000;\">(</span> n <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>-><span style=\"color: #000000;\">(</span> IndexKey<span style=\"color: #000000;\">(</span> j <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span><br /> cErrorLog += Space<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">8</span> <span style=\"color: #000000;\">)</span> + ;<br /> <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">(</span> <span style=\"color: #0000ff;\">Alias</span><span style=\"color: #000000;\">(</span> n <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>-><span style=\"color: #000000;\">(</span> IndexOrd<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span> == j, <span style=\"color: #ff0000;\">\"=> \"</span>, <span style=\"color: #ff0000;\">\" \"</span> <span style=\"color: #000000;\">)</span> + ;<br /> PadR<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">(</span> <span style=\"color: #0000ff;\">Alias</span><span style=\"color: #000000;\">(</span> n <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>-><span style=\"color: #000000;\">(</span> IndexKey<span style=\"color: #000000;\">(</span> j <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>, <span style=\"color: #000000;\">35</span> <span style=\"color: #000000;\">)</span> + ;<br /> <span style=\"color: #000000;\">(</span> <span style=\"color: #0000ff;\">Alias</span><span style=\"color: #000000;\">(</span> n <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>-><span style=\"color: #000000;\">(</span> OrdName<span style=\"color: #000000;\">(</span> j <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span> + ;<br /> CRLF<br /> <span style=\"color: #00C800;\">endif</span><br /> <span style=\"color: #00C800;\">next</span><br /><br /> cErrorLog += CRLF + <span style=\"color: #ff0000;\">\" Relações em uso \"</span> + CRLF<br /> <span style=\"color: #00C800;\">for</span> j = <span style=\"color: #000000;\">1</span> <span style=\"color: #0000ff;\">to</span> <span style=\"color: #000000;\">8</span><br /> <span style=\"color: #00C800;\">if</span> ! Empty<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">(</span> nTarget := <span style=\"color: #000000;\">(</span> <span style=\"color: #0000ff;\">Alias</span><span style=\"color: #000000;\">(</span> n <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>-><span style=\"color: #000000;\">(</span> DbRSelect<span style=\"color: #000000;\">(</span> j <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span><br /> cErrorLog += Space<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">8</span> <span style=\"color: #000000;\">)</span> + Str<span style=\"color: #000000;\">(</span> j <span style=\"color: #000000;\">)</span> + <span style=\"color: #ff0000;\">\": \"</span> + ;<br /> <span style=\"color: #ff0000;\">\"TO \"</span> + <span style=\"color: #000000;\">(</span> <span style=\"color: #0000ff;\">Alias</span><span style=\"color: #000000;\">(</span> n <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>-><span style=\"color: #000000;\">(</span> DbRelation<span style=\"color: #000000;\">(</span> j <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span> + ;<br /> <span style=\"color: #ff0000;\">\" INTO \"</span> + <span style=\"color: #0000ff;\">Alias</span><span style=\"color: #000000;\">(</span> nTarget <span style=\"color: #000000;\">)</span> + CRLF<br /> <span style=\"color: #B900B9;\">// uValue = ( Alias( n ) )->( DbRelation( j ) )</span><br /> <span style=\"color: #B900B9;\">// cErrorLog += cValToChar( &( uValue ) ) + CRLF</span><br /> <span style=\"color: #00C800;\">endif</span><br /> <span style=\"color: #00C800;\">next</span><br /> x := <span style=\"color: #000000;\">(</span><span style=\"color: #0000ff;\">alias</span><span style=\"color: #000000;\">(</span>n<span style=\"color: #000000;\">)</span><span style=\"color: #000000;\">)</span>-><span style=\"color: #000000;\">(</span>dbrlocklist<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><span style=\"color: #000000;\">)</span><br /> cErrorLog += Space<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">8</span> <span style=\"color: #000000;\">)</span> +<span style=\"color: #ff0000;\">\"Registos fechados \"</span>+CRLF<br /> <span style=\"color: #00C800;\">for</span> j = <span style=\"color: #000000;\">1</span> <span style=\"color: #0000ff;\">to</span> len<span style=\"color: #000000;\">(</span>x<span style=\"color: #000000;\">)</span><br /> cErrorLog += Space<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">8</span> <span style=\"color: #000000;\">)</span> + <span style=\"color: #ff0000;\">\"Registo nr \"</span>+str<span style=\"color: #000000;\">(</span>x<span style=\"color: #000000;\">[</span>j<span style=\"color: #000000;\">]</span><span style=\"color: #000000;\">)</span>+CRLF<br /> <span style=\"color: #00C800;\">next</span><br /><br /> <span style=\"color: #00C800;\">endif</span><br /> <span style=\"color: #00C800;\">next</span><br /> SHOWMEMO<span style=\"color: #000000;\">(</span>cerrorlog<span style=\"color: #000000;\">)</span><br /><br /><span style=\"color: #00C800;\">RETURN</span> .t.<br /> </div>[/code:2xkxvpjo]",
"time": "08:39",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-09-09",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio F,\nI have used your code of FUNCTION expalias() (I used memowrit() instead of SHOWMEMO())\n\n[code=fw:2xgshdw5]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /> <span style=\"color: #000000;\">1</span>: USERS NomeRDD: <span style=\"color: #000000;\">ADORDD</span><br /> ==============================<br /> RecNo RecCount BOF EOF<br /> <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">3</span> .F. .F.<br /><br /> Índices em uso TagName<br /><br /> Relações em uso <br /> Registos fechados <br /><br /> <span style=\"color: #000000;\">2</span>: <span style=\"color: #0000ff;\">ID</span> NomeRDD: <span style=\"color: #000000;\">ADORDD</span><br /> ==============================<br /> RecNo RecCount BOF EOF<br /> <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">1</span> .F. .F.<br /><br /> Índices em uso TagName<br /><br /> Relações em uso <br /> Registos fechados <br /><br /> <span style=\"color: #000000;\">3</span>: => BASIS NomeRDD: <span style=\"color: #000000;\">ADORDD</span><br /> ==============================<br /> RecNo RecCount BOF EOF<br /> <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">2</span> .F. .F.<br /><br /> Índices em uso TagName<br /><br /> Relações em uso <br /> Registos fechados <br /> </div>[/code:2xgshdw5]\n\nHere is more code of my program.\n\n[code=fw:2xgshdw5]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /><span style=\"color: #00C800;\">IF</span> ! GetInlogdata<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">1</span><span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00C800;\">RETURN</span> <span style=\"color: #00C800;\">nil</span><br /><span style=\"color: #00C800;\">ENDIF</span><br />LoginOke<span style=\"color: #000000;\">(</span> .F.,.T. <span style=\"color: #000000;\">)</span><br /><br />aOpenDbf := <span style=\"color: #000000;\">{</span> <span style=\"color: #ff0000;\">\"basis\"</span>,<span style=\"color: #ff0000;\">\"id\"</span>,<span style=\"color: #ff0000;\">\"users\"</span> <span style=\"color: #000000;\">}</span><br /><span style=\"color: #00C800;\">IF</span> ! DBFopen<span style=\"color: #000000;\">(</span> aOpenDbf,<span style=\"color: #ff0000;\">\"S\"</span>,<span style=\"color: #000000;\">1</span>,<span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00C800;\">RETURN</span> <span style=\"color: #00C800;\">nil</span><br /><span style=\"color: #00C800;\">ENDIF</span><br /><br />expalias<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /><br />aBasis<span style=\"color: #000000;\">(</span> <span style=\"color: #00C800;\">nil</span>,.T.<span style=\"color: #000000;\">)</span> <span style=\"color: #B900B9;\">//Error happens in this function.</span><br /><br /> </div>[/code:2xgshdw5]\n\nI can send you more code or information if needed.",
"time": "09:37",
"topic": "ADO RDD xHarbour",
"username": "pieter"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-09-09",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Pieter,\n\nI would say that you are seeking without any index opened.\n\nWhat does aBasis?",
"time": "09:48",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-09-09",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio F,\n[code=fw:2h59qzrz]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /> Error description: <span style=\"color: #000000;\">Error</span> BASE/<span style=\"color: #000000;\">1132</span> Bound error: <span style=\"color: #000000;\">array</span> access<br /> Error <span style=\"color: #0000ff;\">id</span> <span style=\"color: #000000;\">1</span>: -<br /> Error <span style=\"color: #0000ff;\">id</span> <span style=\"color: #000000;\">2</span>: -<br /> Current opened dbf: <span style=\"color: #000000;\">BASIS</span> - <span style=\"color: #000000;\">1</span><br /> Last <span style=\"color: #0000ff;\">menu</span> <span style=\"color: #0000ff;\">action</span>: <onbekend><br /> Args:<br /> <span style=\"color: #000000;\">[</span> <span style=\"color: #000000;\">1</span><span style=\"color: #000000;\">]</span> = A <span style=\"color: #000000;\">(</span>L=<span style=\"color: #000000;\">0</span><span style=\"color: #000000;\">)</span><br /> <span style=\"color: #000000;\">[</span> <span style=\"color: #000000;\">2</span><span style=\"color: #000000;\">]</span> = N <span style=\"color: #000000;\">1</span><br /><br />Stack Calls<br />===========<br /> Called <span style=\"color: #0000ff;\">from</span> ADOPSEUDOSEEK<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">3749</span><span style=\"color: #000000;\">)</span><br /> Called <span style=\"color: #0000ff;\">from</span> ADOSEEKCLIFIND<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">3412</span><span style=\"color: #000000;\">)</span><br /> Called <span style=\"color: #0000ff;\">from</span> ADO_SEEK<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">3371</span><span style=\"color: #000000;\">)</span><br /> Called <span style=\"color: #0000ff;\">from</span> DBSEEK<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">0</span><span style=\"color: #000000;\">)</span><br /> Called <span style=\"color: #0000ff;\">from</span> DBFSEEK<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">1479</span><span style=\"color: #000000;\">)</span><br /> Called <span style=\"color: #0000ff;\">from</span> DBFSELECT<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">1465</span><span style=\"color: #000000;\">)</span><br /> Called <span style=\"color: #0000ff;\">from</span> ABASIS<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">2912</span><span style=\"color: #000000;\">)</span><br /> Called <span style=\"color: #0000ff;\">from</span> UBTEST<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">45</span><span style=\"color: #000000;\">)</span><br /><br /> </div>[/code:2h59qzrz]\n\nIn function aBasis, the comment translated in english is: Base - load data in object\nIn this function aBasis, there is a function DBFselect() which is used a lot in the program. In this error the code looks like this: DBFselect( \"basis\",1, etc. ). The error happens in the DBFselect function. Comment which is written by DBFselect function is: \"Select a DBF (and open it if not allready opened)\". I think it is a kind of USE or DbUseArea, but then customized for our program.\n\nPieter",
"time": "10:18",
"topic": "ADO RDD xHarbour",
"username": "pieter"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-09-09",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Pieter,\n\n\nCalled from DBFSEEK(1479) before adordd.\n\nIts not USE.\nYou are seeking the table and no indexes are opened.\n\nThe error occurs in\n[code=fw:33mr9urp]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /><span style=\"color: #00C800;\">STATIC</span> <span style=\"color: #00C800;\">FUNCTION</span> ADOPSEUDOSEEK<span style=\"color: #000000;\">(</span>nWA,cKey,aWAData,lSoftSeek,lBetween,cKeybottom<span style=\"color: #000000;\">)</span><br /><br /> <span style=\"color: #00C800;\">LOCAL</span> nOrder := aWAData<span style=\"color: #000000;\">[</span>WA_INDEXACTIVE<span style=\"color: #000000;\">]</span><br /> <span style=\"color: #00C800;\">LOCAL</span> cExpression := aWAData<span style=\"color: #000000;\">[</span>WA_INDEXEXP<span style=\"color: #000000;\">]</span><span style=\"color: #000000;\">[</span>nOrder<span style=\"color: #000000;\">]</span> <span style=\"color: #B900B9;\">//here the error the array is empty</span><br /> </div>[/code:33mr9urp]\n\nShould error \"table not indexed\" but it seems not.\n\nPlace expalias() after use table and indexes and check it.",
"time": "10:39",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-09-09",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio F,\n\nOké, I think I have done what you suggested (see also my email). It looks like it is working well until Dbseek().\n\nPieter",
"time": "14:59",
"topic": "ADO RDD xHarbour",
"username": "pieter"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-09-10",
"forum": "FiveWin for Harbour/xHarbour",
"text": "RE: ADORDD and Memory Issues\n\nFor this discussion I am talking about standard FWH code that was written for DBF files, since this is the reason for having an ADORDD.\n\nI assume that whenever a database is opened via ADORDD, that a recordset is created containing the entire database. Is that correct?\n\nI know that we have to live with the designs of SQL client/server, but this can create a big issue with memory. If we open several databases with hundreds of thousands, or even millions of records, then we are going to quickly run out of RAM. \n\nIn my apps, I often may have several copies of the same database open in different objects. Memory is not an issue with this when using DBFs, since they often only load one record at a time, or maybe a screen full with a browse. But with SQL we are going to load the entire database just to get access to one record. So if I have two objects that need one record each from a database, I will have two recordsets containing the entire database in memory. Is that correct?\n\nOf course it also means that we have to load the entire database across the network--multiple times.\n\nI know that some memory can be paged out to disk, but this comes at the cost of speed and also garbage collection I am guessing. So the speed of the same app running with a DBF RDD would be much faster than with the ADORDD (regardless of the fact that it is client/server).\n\nIt seems like this is going to be a real issue with all but very small files.\n\nYes, I know this can be solved by rewriting our apps to take advantage of SQL's query capabilities, but that is another entire project. We would pretty much have to rewrite our entire apps.\n\nThoughts?\n\nJames",
"time": "19:49",
"topic": "ADO RDD xHarbour",
"username": "James Bott"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-09-11",
"forum": "FiveWin for Harbour/xHarbour",
"text": "James,\n\nadordd is in big changes and will only read from table once when it opens it. \nYou can also use with a query to limit the range of the set.\nAfter loading the set it only re read the table again when new additions by others are made.\n\nNext week Ill post a new version with big changes, much much faster, UDFs in indexes etc.\n\nIm now converting another app to SQL and this app does not have historic data files as should be.\nAll the records for the last 20 years are in the daily working files!\nI had to add a new routine to have a indication of the working period and then USE the table with a WHERE clause for datefield = working date.\nThis reduced the working load from > 1000.000 recs to less than 50.000!\nThis app can have many tables opened at same time because it works with MDIs windows each one with their own tables, relations etc saved as each window objects.\nDid nt change any code logic and app is running very fast. Still on trials.\n\nBut note that also with dbfs leaving tables grow so much would be a cause of many indexes problems, data corruption etc.\n\nYou will see adordd power in LAN or even better in a WAN with many users. \nBecause sets are worked locally performance degradation does not happen and the speed you have with one user it is same with 40. \nThis is the maximum I have tried but I believe that this will also be true for 200 since it will only depends of the server capacity of serving all the requests that with ADO are very few so even the server overload will not occur.\n\nNext version of adordd will be available 21-16.09.\nI will change the name to openrdd (Ill explain why when post it)",
"time": "17:31",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-09-12",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio F.\n\nI look forward to all the new features and modifications. However, you are confirming my concerns.\n\n// with DBF RDD\nuse customer // loads one record\n\n// with ADORDD\nuse customer // loads the entire database\n\nSo opening 20 databases with a DBF RDD loads only 20 records into memory. Opening 20 databases with ADORDD loads 20 entire databases into memory.\n\nYes modifying your code to limit the range of the records loaded is the best solution and that is a viable option if you have a program written for a single customer. However, I am working on a commercial program that is on hundreds of sites. Most are fine with DBFs but some sites are larger with more users and more data and they would benefit from SQL. However, this means it is not practical to just use the same program and link in different RDDs for different database types.\n\nSo we have two options, fork the program into two versions (twice the updates). Or, put in lots of IF/THENs--still lots more work.\n\nI'm just confirming that only in some situations are you going to be able to just link in an SQL RDD without issues--some of which may be show-stoppers.\n\nJames",
"time": "00:26",
"topic": "ADO RDD xHarbour",
"username": "James Bott"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-09-12",
"forum": "FiveWin for Harbour/xHarbour",
"text": "James,\n\n[quote:vwnnkaio]So opening 20 databases with a DBF RDD loads only 20 records into memory. Opening 20 databases with ADORDD loads 20 entire databases into memory.\n[/quote:vwnnkaio]\n\nToday memory its not a problem. Its cheap! 20 tables its not so much even to ADO memory management.\nBut for sure for our kind of ISAM coding our main problem resides here!\n\n[quote:vwnnkaio]So we have two options, fork the program into two versions (twice the updates). Or, put in lots of IF/THENs--still lots more work.[/quote:vwnnkaio]\n\nMay be not so much work if you can use a kind of replacement #command or may be the app has a open function that take care of all USE.\n\n[quote:vwnnkaio]I'm just confirming that only in some situations are you going to be able to just link in an SQL RDD without issues--some of which may be show-stoppers.\n[/quote:vwnnkaio]\n\nStay tuned we might not be confined to Ms ADO!",
"time": "12:05",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-09-24",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Hello Antonio F,\n\nI am making progress with my main program with ADORDD. But I got a problem with ' (apostrof)\n\nDo you think there is still a way to use ' (apostrof) in a program?\n\nExample testprogram\n USE CUSTOMER\n\tAPPEND BLANK\n\tREPLACE FIRST WITH \"Test'Pieter\"\n\n\nErrorlog:\n\nApplication\n===========\n Path and name: C:\\Pieter\\LeerOmgevingXharbour\\learn-database.exe (32 bits)\n Size: 2,781,696 bytes\n Compiler version: xHarbour 1.2.3 Intl. (SimpLex) (Build 20150213)\n FiveWin Version: FWHX 15.01\n Windows version: 6.2, Build 9200 \n\n Time from start: 0 hours 0 mins 6 secs \n Error occurred at: 09/24/15, 13:46:41\n Error description: Error ADODB.Connection/0 S_OK: EXECUTE\n Args:\n [ 1] = C UPDATE CUSTOMER SET FIRST = 'Test'Pieter' WHERE HBRECNO = 516\n\nStack Calls\n===========\n Called from: => TOLEAUTO:EXECUTE( 0 )\n Called from: adordd.prg => ADO_PUTVALUE( 1532 )\n Called from: learn-database.prg => LEARNADORDD2( 55 )\n Called from: learn-database.prg => MAIN( 22 )\n\nSystem\n======\n CPU type: Intel(R) Pentium(R) CPU N3540 @ 2.16GHz 2166 Mhz\n Hardware memory: 3500 megs\n\n Free System resources: 90 %\n GDI resources: 90 %\n User resources: 90 %\n\n Windows total applications running: 4\n 1 , \n 2 , C:\\Windows\\WinSxS\\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.9600.17810_none_a9edf0 \n 3 DDE Server Window, C:\\Windows\\SYSTEM32\\OLE32.DLL \n 4 Tussen taken schakelen, C:\\Pieter\\LeerOmgevingXharbour\\learn-database.exe \n\nVariables in use\n================\n Procedure Type Value\n ==========================\n TOLEAUTO:EXECUTE\n Param 1: C \"UPDATE CUSTOMER SET FIRST = 'Test'Pieter' WHERE HBRECNO = 516\"\n Local 1: U \n Local 2: C \"ADODB.Connection\"\n ADO_PUTVALUE\n Param 1: N 1\n Param 2: N 2\n Param 3: C \"'Test'Pieter'\"\n Local 1: A Len: 38\n Local 2: O Class: TOLEAUTO\n Local 3: N 516\n Local 4: A Len: 6\n Local 5: U \n Local 6: U \n Local 7: A Len: 7\n LEARNADORDD2\n Local 1: C \"Test'Pieter\"\n MAIN\n\nLinked RDDs\n===========\n DBF\n DBFFPT\n DBFBLOB\n DBFCDX\n DBFNTX\n ADORDD\n\nDataBases in use\n================\n\n 1: => CUSTOMER RddName: ADORDD\n ==============================\n RecNo RecCount BOF EOF\n 516 516 .F. .F.\n\n Indexes in use TagName\n\n Relations in use\n\nClasses in use:\n===============\n 1 ERROR\n 2 HASHENTRY\n 3 HBCLASS\n 4 HBOBJECT\n 5 TFONT\n 6 TWINDOW\n 7 TDIALOG\n 8 TBRUSH\n 9 TCONTROL\n 10 TXBROWSE\n 11 TXBRWCOLUMN\n 12 TBTNBMP\n 13 TSCROLLBAR\n 14 TRECT\n 15 TOLEAUTO\n 16 VTWRAPPER\n 17 TREG32\n\nMemory Analysis\n===============\n 256 Static variables\n\n Dynamic memory consume:\n Actual Value: 0 bytes\n Highest Value: 0 bytes\n\u001a",
"time": "13:00",
"topic": "ADO RDD xHarbour",
"username": "pieter"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-09-24",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Pieter,\n\nInstead of:\n[code=fw:rlo5j4sz]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\">REPLACE FIRST WITH <span style=\"color: #ff0000;\">\"Test'Pieter\"</span></div>[/code:rlo5j4sz]\n\nPlease try:\n\n[code=fw:rlo5j4sz]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\">REPLACE FIRST WITH <span style=\"color: #ff0000;\">\"Test''Pieter\"</span></div>[/code:rlo5j4sz] //2' '\nor\n[code=fw:rlo5j4sz]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\">REPLACE FIRST WITH <span style=\"color: #ff0000;\">\"Test<span style=\"color: #000000;\">\\'</span>Pieter\"</span></div>[/code:rlo5j4sz]\n\nand let me know the result.",
"time": "13:45",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-09-24",
"forum": "FiveWin for Harbour/xHarbour",
"text": "(1)\nREPLACE FIRST WITH \"Test''Pieter\" //gives Test'Pieter\n\n(2) //I think this ' is the same as my previous post. (I copied your code to my testapp)\nREPLACE FIRST WITH \"Test'Pieter\" \n\nGives:\n\nApplication\n===========\n Path and name: C:\\Pieter\\LeerOmgevingXharbour\\learn-database.exe (32 bits)\n Size: 2,781,696 bytes\n Compiler version: xHarbour 1.2.3 Intl. (SimpLex) (Build 20150213)\n FiveWin Version: FWHX 15.01\n Windows version: 6.2, Build 9200 \n\n Time from start: 0 hours 0 mins 5 secs \n Error occurred at: 09/24/15, 15:00:39\n Error description: Error ADODB.Connection/0 S_OK: EXECUTE\n Args:\n [ 1] = C UPDATE CUSTOMER SET FIRST = 'Test'Pieter' WHERE HBRECNO = 520\n\nStack Calls\n===========\n Called from: => TOLEAUTO:EXECUTE( 0 )\n Called from: adordd.prg => ADO_PUTVALUE( 1532 )\n Called from: learn-database.prg => LEARNADORDD2( 56 )\n Called from: learn-database.prg => MAIN( 22 )\n\nSystem\n======\n CPU type: Intel(R) Pentium(R) CPU N3540 @ 2.16GHz 2166 Mhz\n Hardware memory: 3500 megs\n\n Free System resources: 90 %\n GDI resources: 90 %\n User resources: 90 %\n\n Windows total applications running: 4\n 1 , \n 2 , C:\\Windows\\WinSxS\\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.9600.17810_none_a9edf0 \n 3 DDE Server Window, C:\\Windows\\SYSTEM32\\OLE32.DLL \n 4 Tussen taken schakelen, C:\\Pieter\\LeerOmgevingXharbour\\learn-database.exe \n\nVariables in use\n================\n Procedure Type Value\n ==========================\n TOLEAUTO:EXECUTE\n Param 1: C \"UPDATE CUSTOMER SET FIRST = 'Test'Pieter' WHERE HBRECNO = 520\"\n Local 1: U \n Local 2: C \"ADODB.Connection\"\n ADO_PUTVALUE\n Param 1: N 1\n Param 2: N 2\n Param 3: C \"'Test'Pieter'\"\n Local 1: A Len: 38\n Local 2: O Class: TOLEAUTO\n Local 3: N 520\n Local 4: A Len: 6\n Local 5: U \n Local 6: U \n Local 7: A Len: 7\n LEARNADORDD2\n Local 1: C \"Test'Pieter\"\n MAIN\n\nLinked RDDs\n===========\n DBF\n DBFFPT\n DBFBLOB\n DBFCDX\n DBFNTX\n ADORDD\n\nDataBases in use\n================\n\n 1: => CUSTOMER RddName: ADORDD\n ==============================\n RecNo RecCount BOF EOF\n 520 520 .F. .F.\n\n Indexes in use TagName\n\n Relations in use\n\nClasses in use:\n===============\n 1 ERROR\n 2 HASHENTRY\n 3 HBCLASS\n 4 HBOBJECT\n 5 TFONT\n 6 TWINDOW\n 7 TDIALOG\n 8 TBRUSH\n 9 TCONTROL\n 10 TXBROWSE\n 11 TXBRWCOLUMN\n 12 TBTNBMP\n 13 TSCROLLBAR\n 14 TRECT\n 15 TOLEAUTO\n 16 VTWRAPPER\n 17 TREG32\n\nMemory Analysis\n===============\n 256 Static variables\n\n Dynamic memory consume:\n Actual Value: 0 bytes\n Highest Value: 0 bytes\n\u001a",
"time": "14:01",
"topic": "ADO RDD xHarbour",
"username": "pieter"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-09-24",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Pieter,\n\nThe second alternative is a escape \\ + ' (take out the +)",
"time": "14:29",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-09-24",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio F,\n\nThank you. Yes that also works.\n\nPieter",
"time": "14:44",
"topic": "ADO RDD xHarbour",
"username": "pieter"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-09-24",
"forum": "FiveWin for Harbour/xHarbour",
"text": "I use [] all the time to build filter strings and other cases where a single ' or \" may be needed.\nTry\n[code=fw:2e209lur]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br />REPLACE FIRST WITH <span style=\"color: #000000;\">[</span>Test<span style=\"color: #ff0000;\">'Pieter]<br /></span></div>[/code:2e209lur]",
"time": "16:32",
"topic": "ADO RDD xHarbour",
"username": "Gale FORd"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-09-25",
"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\nSeveral small bugs corrected.\nSET ADO TABLES INDEX LIST TO not needed anymore.\nNow support for any clipper expression in index including UDFs\nIndexes, Scope, Filter, Seek, Locate 100% clipper compatible.\nSpeed much improved.\nNow recordset its only read once when opening it.\nNew additions by others automatically detected.\nNew SET ADO INDEX UDFS TO to indicate to adordd the UDFs. This enables adordd to avoid \nbuilding unnecessary indexes with this routine because its expensive to use it.\nIndex data conversion functions must not be placed here.\nOnly place here true UDFs and functions that change the size of expressions itself. \n\nTO DO\n1) Deleted records not implemented yet.Will try to use maromano great routines.\n\n2) New option in SET ADO DEFAULT DATABASE TO .. CLASSNAME where classname is a \nclass name providing ado methods and data to avoid using ado and oledb or odbc and making it much faster.\nIm remembering the excellent work HDO from Manuel Exposito.\nThen we can be really fast and multi platform.\n\n3) Arrays of reserved keywords SET CHECK RESERVED KEYWORDS ON /OFF to check the existence of any sql reserved word and use a dictionary to avoid changing any code in actual apps.\n\nThis version has been tested in a small environment with MYSql and some new features might not be 100%.\nThese refers mainly to Scopes, UDFs in indexes, data synchronization\nPlace all necessary SETs in top of app, compile and link with adordd.\nIf you find some incompatibilities please report to change it.\nIt must run now with no code change!\n\nEnrico, James can you try new features.?",
"time": "21:08",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-09-25",
"forum": "FiveWin for Harbour/xHarbour",
"text": "[quote=\"AHF\":v4tg5w1n]Enrico, James can you try new features.?[/quote:v4tg5w1n]\n\nI'm very sorry but I didn't tried your ADORDD yet and I haven't the time to try it at the moment.\n\nEMG",
"time": "22:00",
"topic": "ADO RDD xHarbour",
"username": "Enrico Maria Giordano"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-10-05",
"forum": "FiveWin for Harbour/xHarbour",
"text": "[quote=\"Gale FORd\":2zsgtcni]I use [] all the time to build filter strings and other cases where a single ' or \" may be needed.\nTry\n[code=fw:2zsgtcni]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br />REPLACE FIRST WITH <span style=\"color: #000000;\">[</span>Test<span style=\"color: #ff0000;\">'Pieter]<br /></span></div>[/code:2zsgtcni][/quote:2zsgtcni]\n\nHi Gale Ford,\n\nthanks for your reply.(still a time ago I see <!-- s:) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":)\" title=\"Smile\" /><!-- s:) --> )\n\nI just tried it, it did not work by me. I got another solution for now which is: REPLACE FIRST WITH \"Test''Pieter\"\n\nKind regards,\n\nPieter",
"time": "12:30",
"topic": "ADO RDD xHarbour",
"username": "pieter"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-10-08",
"forum": "FiveWin for Harbour/xHarbour",
"text": "New adordd version <!-- m --><a class=\"postlink\" href=\"https://github.com/AHFERREIRA/adordd.git\">https://github.com/AHFERREIRA/adordd.git</a><!-- m -->\n\n1) Some small bugs corrections, code and speed improvement.\n\n2) NEW FEATURE : Works with deleted records just like any other dbf rdd\nRecords are marked as deleted and they are removed from table with pack.\nIf you choose to let other applications not to work with deleted records this way when adordd resync or requery the set if the record does not exist anymore a error number 10002 is thrown and you should take care yourself\nof re-position it in app code.\nAdordd can not guess what to do in these cases.\nThanks to maromano!\n\n3) New parameter in SET ADO DATABASE .. CLASSNAME to indicate an alternative class that should provide the methods and data needed by adordd. In this case it can work with other class that communicates directly with the DB engine. It can be much faster and multi platform.\n\nnext version\n\n1) use path to create sql files and open with same path. slashes are change to minus sign. ready within 2 weeks\n\n2) Taking care of field name conflicts with each sql engine reserved words.\nSometimes these occurrences are the source of very strange behavior and very difficult to identify.. (no time schedule yet)\n\n2) Improved connection parameters such as Port, SSl encryption, compression, win auth, various replication servers, charset, table caching (no time schedule yet)\n\nAll trials have been made with ACCESS and MySql on production.\nPlease let me know if you find problems with other engines.\nFireBird its uncompleted if you need it please let me know and we will try to include it together.\n\nEnjoy it!",
"time": "18:52",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-10-14",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio, please make definition of the local variables!\n\nC:\\adordd\\adordd.prg(1238) Warning W0001 Ambiguous reference: 'XBOOK'\nC:\\adordd\\adordd.prg(1247) Warning W0001 Ambiguous reference: 'ABOOKMARKS'\nC:\\adordd\\adordd.prg(1248) Warning W0001 Ambiguous reference: 'ABOOKMARKS'\nC:\\adordd\\adordd.prg(1248) Warning W0001 Ambiguous reference: 'ABOOKMARKS'\nC:\\adordd\\adordd.prg(1249) Warning W0001 Ambiguous reference: 'ABOOKMARKS'\nC:\\adordd\\adordd.prg(1250) Warning W0001 Ambiguous reference: 'XBOOK'\nC:\\adordd\\adordd.prg(1478) Warning W0001 Ambiguous reference: 'OERROR'\nC:\\adordd\\adordd.prg(1479) Warning W0001 Ambiguous reference: 'OERROR'\nC:\\adordd\\adordd.prg(1480) Warning W0001 Ambiguous reference: 'OERROR'\nC:\\adordd\\adordd.prg(1481) Warning W0001 Ambiguous reference: 'OERROR'\nC:\\adordd\\adordd.prg(1482) Warning W0001 Ambiguous reference: 'OERROR'\nC:\\adordd\\adordd.prg(1483) Warning W0001 Ambiguous reference: 'OERROR'\nC:\\adordd\\adordd.prg(1523) Warning W0001 Ambiguous reference: 'CSQL'\nC:\\adordd\\adordd.prg(1524) Warning W0001 Ambiguous reference: 'CSQL'\nC:\\adordd\\adordd.prg(1526) Warning W0001 Ambiguous reference: 'CSQL'\nC:\\adordd\\adordd.prg(2970) Warning W0001 Ambiguous reference: 'NDECMALS'\nC:\\adordd\\adordd.prg(5413) Warning W0001 Ambiguous reference: 'CTABLE'\n5800\nNo code generated\n\n** error 1 ** deleting .\\adordd.hrb\nDrücken Sie eine beliebige Taste . . .",
"time": "12:04",
"topic": "ADO RDD xHarbour",
"username": "byte-one"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-10-14",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Gunther,\n\nDone!\n\nThanks",
"time": "18:55",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-10-14",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio,\n\nWould you mind uploading the new version (with the LOCALs) declared to Github? As you know, unless they are declared they are PRIVATEs, so I don't want to do a lot of testing when PRIVATEs may be visible outside the RDD. I know, I could declare them myself, but then I would still have to retest when your version becomes available.\n\nRegards,\nJames",
"time": "21:34",
"topic": "ADO RDD xHarbour",
"username": "James Bott"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-10-14",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio,\n\nIt also seems that your TRYADORDD.PRG file has not been updated as it is erroring out with 3 errors. And there are undeclared vars too.\n\nIf would really help if you could provide in this test PRG, tests of all the new functions also. Otherwise each of us has to create test programs.\n\nJames",
"time": "22:35",
"topic": "ADO RDD xHarbour",
"username": "James Bott"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-10-15",
"forum": "FiveWin for Harbour/xHarbour",
"text": "James,\n\nYou re right but now I havent the time to remake it.\n\nIll try to do it as soon as I have the time.\n\nThanks",
"time": "10:59",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-10-16",
"forum": "FiveWin for Harbour/xHarbour",
"text": "New version adordd at <!-- m --><a class=\"postlink\" href=\"https://github.com/AHFERREIRA/adordd.git\">https://github.com/AHFERREIRA/adordd.git</a><!-- m -->\n\nPlease check 01_readme.pdf because some things changed a bit.\n\nNew features:\n\n Use path to create sql files and open with same path. slashes are change to underscore sign.\n This allow to use same tables name in the same database as with database file system folder tree.\n Use SET ADO TABLENAME WITH PATH ON /OFF to enable this new feature. \n All tables must of course have been loaded with the same SET.\n \n As with other rdds you should use exactly the same routines to obtain a temporary file name from the operating \n system file to be created and adordd will maintain automatically those temporary files deleting it \n when not needed anymore.\n\n Fieldnames with reserved keywords are enclosed in \"`\"+fieldname+\"`\" it seems to woks with any keyword.\n Tested with MySql and ACCESS only but should wok with all others.\n\n New SET ADO TABLENAME WITH PATH ON /OFF\n\n New hb_AdoUpload( cBaseDir, cRDD, dbEngine, lOverWrite ) \n New HB_adorddFile( cFile) Replaces File()\n New hb_ADOrddCOPYFILE( cTableOrigin, cTableDestination ) Replaces CopyFile()\n New hb_adordddir( cPath ) imitates the directory() but on a SQL database where table names are with path.\n\n\nnext version\n\n1) Persistent recordsets to open huge sets (> 1000000 k) very fast after first opening. (Already on trials)\n\n2) Improved connection parameters such as Port, SSl encryption, compression, win auth, various replication servers, charset, table caching (no time schedule yet we are still studying if it is better to defined all at the ODBC or OLEDB level)",
"time": "08:55",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-10-18",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio, there are still warnings on compiling! You should use es2 as errorlevel in compiler.\n\nCompiling 'C:\\adordd\\adordd.prg'...\nC:\\adordd\\adordd.prg(486) Warning W0001 Ambiguous reference: 'OCATALOG'\nC:\\adordd\\adordd.prg(487) Warning W0001 Ambiguous reference: 'OCATALOG'\nC:\\adordd\\adordd.prg(1906) Warning W0001 Ambiguous reference: 'XVALUE'\nC:\\adordd\\adordd.prg(1922) Warning W0001 Ambiguous reference: 'XVALUE'\nC:\\adordd\\adordd.prg(5722) Warning W0001 Redefinition or duplicate definition of #define DBS_NAME\nC:\\adordd\\adordd.prg(5723) Warning W0001 Redefinition or duplicate definition of #define DBS_TYPE\nC:\\adordd\\adordd.prg(5724) Warning W0001 Redefinition or duplicate definition of #define DBS_LEN\nC:\\adordd\\adordd.prg(5725) Warning W0001 Redefinition or duplicate definition of #define DBS_DEC\nC:\\adordd\\adordd.prg(5757) Warning W0005 RETURN statement with no return value in function\n\n[b:pu39027y]Also this function is missing: waiton( \" Subdir......\"+ cFile)[/b:pu39027y]",
"time": "10:04",
"topic": "ADO RDD xHarbour",
"username": "byte-one"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-10-18",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Gunther,\n\nI dont know why didnt get those errors.\nIts corrected for next posted version.\nMeanwhile please alter in adordd.prg :\n\nC:\\adordd\\adordd.prg(1906) Warning W0001 Ambiguous reference: 'XVALUE' with cFieldName\nC:\\adordd\\adordd.prg(1922) Warning W0001 Ambiguous reference: 'XVALUE' with uInfo\nC:\\adordd\\adordd.prg(5757) Warning W0005 RETURN statement with no return value in function RETURN NIL\n\nYou can delete these:\nC:\\adordd\\adordd.prg(5722) Warning W0001 Redefinition or duplicate definition of #define DBS_NAME\nC:\\adordd\\adordd.prg(5723) Warning W0001 Redefinition or duplicate definition of #define DBS_TYPE\nC:\\adordd\\adordd.prg(5724) Warning W0001 Redefinition or duplicate definition of #define DBS_LEN\nC:\\adordd\\adordd.prg(5725) Warning W0001 Redefinition or duplicate definition of #define DBS_DEC\n waiton( \" Subdir......\"+ cFile)\n\nThanks",
"time": "11:11",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-10-19",
"forum": "FiveWin for Harbour/xHarbour",
"text": "adordd finished version at <!-- m --><a class=\"postlink\" href=\"https://github.com/AHFERREIRA/adordd.git\">https://github.com/AHFERREIRA/adordd.git</a><!-- m -->\n\nadordd is finished!\nI don't have plans to add any new functionalities to it.\nIts now working just like any other kind dbfcdx rdd and it allows you to port your app in minutes (time to load tables) to any SQL.\n\nFrom now on Ill only post new versions to correct bugs.\n\nAll your comments, experiences, ideas and bug reports are most welcomed!\n\nNew features:\n\n1) ADO_EXIT called internally to close all tables and connections whe exit the app.\n\n2) Gave up the idea of persistent recordsets to open huge sets because the difference speed in opening \n its completely lost closing it( saving it) instead I ve made a new set.\n\nSET ADO CACHESIZE TO 100 ASYNC ON ASYNCNOWAIT ON \nThis set has huge impact on performance opening huge tables.\nPlaying with this set might improve significantly the opening time but then you might not have all rows available immediately.\nYou have to test yourself if your app works ok with the different options.\n\nadordd main problem is opening huge tables without any where clause causing it to load all rows.\nThis brings problems with loading time and memory consumption.\n\nOn the other hand please remember that this would be the slowest loading time of a table no matter if you have\n1 or 200 users opposite to dbfcdx kind of rdds.\n\nThis is not a standard practice in SQL but to keep backwards compatibility with our apps we need to do it\nlike this.\n\nIn apps where there aren't any historic files and all data is kept in the working tables the only alternative is either to pass old data to historic files or use USE ctable WHERE where clause.\nIf you cannot do any of these and you have huge tables adordd might not be for you and in these cases the only alternative to go to SQL is ADS as far as I know (keeping almost same app code ).\n\nThe only workaround for this limitation is to build a class accessing the SQL through C interface (HDO from Exposito for ex). \nadordd can work with any other class as long as the few methods and data adordd use from MS ADO are\nreplicated in that class.\nThis class could build the sets in a local dbf files, arrays etc.",
"time": "15:16",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-10-19",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio,\n\nFirst of all congratulations for this huge job! I'm going to test it ASAP. Just a question: Is there any working example showing all (or most of all) features of your rdd?\n\nTIA,",
"time": "20:27",
"topic": "ADO RDD xHarbour",
"username": "Kleyber"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-10-19",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Kleyber,\n\nThanks.\n\nYou have tryadordd but be advise that I didnt test it myself with these last versions, but should be a good guide.\n\nThere arent any special features to show, it works just like dbcdx kind rdd.\nThe best way to test it is to upload your tables compile and link adordd and run it.\nPlease read 01_readme.pdf you have it all there.",
"time": "20:43",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-10-20",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Thank you for your effort Antonio,\n\nI'll try it also as soon as possible.",
"time": "09:22",
"topic": "ADO RDD xHarbour",
"username": "Horizon"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-10-20",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio, this error comes on different places in the code of adordd.prg. I tested with access and mssql.\n\nError description: Error ADODB.Recordset/6 DISP_E_UNKNOWNNAME: OPEN\n Args:\n [ 1] = C SELECT `AUTO_INCREMENT` FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'adisc' AND TABLE_NAME = 'TABLE1'\n [ 2] = O ADODB.Connection\n\nStack Calls\n===========\n Called from: => TOLEAUTO:OPEN( 0 )\n Called from: C:\\adordd\\adordd.prg => ADORECCOUNT( 806 )\n Called from: C:\\adordd\\adordd.prg => ADO_REFRESH( 823 )\n Called from: C:\\adordd\\adordd.prg => ADO_GOTOP( 989 )\n Called from: C:\\adordd\\adordd.prg => ADO_OPEN( 381 )",
"time": "12:07",
"topic": "ADO RDD xHarbour",
"username": "byte-one"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-10-20",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Gunther,\n\nThis routine returns the lastrec().\n\nWith access it can not error that because with engine = ACCESS its SELECT MAX--- you can check the code.\n\nAs I informed previously I only tried it with Access but mainly with MySql.\n\nI suspect that with MsSql the syntax of SELECT ... FROM SCHEMA... its wrong.\n\nDo you know the correct one ?\n\nMeantime if you want to try it replace in ADORECCOUNT \n\nIF aAWData[ WA_ENGINE ] = \"ACCESS\" .OR. aAWData[ WA_ENGINE ] = \"MSSQL\"\n\nIts slower but it should work.",
"time": "12:30",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-10-20",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio, with Access i read this error:\n\nError description: Error ADODB.Recordset/6 DISP_E_UNKNOWNNAME: OPEN\n Args:\n [ 1] = C SELECT * FROM TABLE1 ORDER BY HBRECNO\n [ 2] = O ADODB.Connection\n [ 3] = N 2\n [ 4] = N 3\n [ 5] = N 0\n\nStack Calls\n===========\n Called from: => TOLEAUTO:OPEN( 0 )\n Called from: C:\\adordd\\adordd.prg => ADO_OPEN( 318 )\n\nIn tryadordd.prg:\n[code=fw:9wposlmt]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"> SET ADO <span style=\"color: #00C800;\">DEFAULT</span> DATABASE <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #ff0000;\">\"D:<span style=\"color: #000000;\">\\W</span>HATEVER<span style=\"color: #000000;\">\\T</span>ESTADORDD.MDB\"</span> <span style=\"color: #00C800;\">SERVER</span> <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #ff0000;\">\"ACESS\"</span> ENGINE <span style=\"color: #0000ff;\">TO</span> ACCESS USER <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #ff0000;\">\"\"</span> PASSWORD <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #ff0000;\">\"\"</span><br /> </div>[/code:9wposlmt]should be:\n [code=fw:9wposlmt]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\">SET ADO <span style=\"color: #00C800;\">DEFAULT</span> DATABASE <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #ff0000;\">\"D:<span style=\"color: #000000;\">\\W</span>HATEVER<span style=\"color: #000000;\">\\T</span>ESTADORDD.MDB\"</span> <span style=\"color: #00C800;\">SERVER</span> <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #ff0000;\">\"\"</span> ENGINE <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #ff0000;\">\"ACCESS\"</span> USER <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #ff0000;\">\"\"</span> PASSWORD <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #ff0000;\">\"\"</span><br /> </div>[/code:9wposlmt]\n [code=fw:9wposlmt]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"> <span style=\"color: #0000ff;\">MSGINFO</span><span style=\"color: #000000;\">(</span><span style=\"color: #ff0000;\">\"DOES TABLE1 EXISTS ON DB ?\"</span>+CVALTOCHAR<span style=\"color: #000000;\">(</span>hb_adoRddExistsTable<span style=\"color: #000000;\">(</span> <span style=\"color: #ff0000;\">\"Table1\"</span><span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span><span style=\"color: #000000;\">)</span><br /> <span style=\"color: #0000ff;\">MSGINFO</span><span style=\"color: #000000;\">(</span><span style=\"color: #ff0000;\">\"DOES TABLE3 EXISTS ON DB ?\"</span>+CVALTOCHAR<span style=\"color: #000000;\">(</span>hb_adoRddExistsTable<span style=\"color: #000000;\">(</span> <span style=\"color: #ff0000;\">\"Table3\"</span><span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span><span style=\"color: #000000;\">)</span></div>[/code:9wposlmt]\nshould be:\n [code=fw:9wposlmt]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"> <span style=\"color: #0000ff;\">MSGINFO</span><span style=\"color: #000000;\">(</span><span style=\"color: #ff0000;\">\"DOES TABLE1 EXISTS ON DB ?\"</span>+CVALTOCHAR<span style=\"color: #000000;\">(</span>hb_adoRddExistsTable<span style=\"color: #000000;\">(</span> ,<span style=\"color: #ff0000;\">\"Table1\"</span><span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span><span style=\"color: #000000;\">)</span><br /> <span style=\"color: #0000ff;\">MSGINFO</span><span style=\"color: #000000;\">(</span><span style=\"color: #ff0000;\">\"DOES TABLE3 EXISTS ON DB ?\"</span>+CVALTOCHAR<span style=\"color: #000000;\">(</span>hb_adoRddExistsTable<span style=\"color: #000000;\">(</span>, <span style=\"color: #ff0000;\">\"Table3\"</span><span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span><span style=\"color: #000000;\">)</span></div>[/code:9wposlmt]",
"time": "13:20",
"topic": "ADO RDD xHarbour",
"username": "byte-one"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-10-20",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio, i found the equivalent for MSSQL in function ADORECCOUNT(nWA,oRecordSet):\n \n[code=fw:ebz6tl3g]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><span style=\"color: #00C800;\">IF</span> aAWData<span style=\"color: #000000;\">[</span> WA_ENGINE <span style=\"color: #000000;\">]</span> = <span style=\"color: #ff0000;\">\"ACCESS\"</span> <span style=\"color: #B900B9;\">//.or. aAWData[ WA_ENGINE ] = \"MSSQL\"//6.08.15 ONLY WITH ACCESSIT TAKES LONGER IN BIG TABLES</span><br /> cSql := <span style=\"color: #ff0000;\">\"SELECT MAX(\"</span>+<span style=\"color: #000000;\">(</span>ADO_GET_FIELD_RECNO<span style=\"color: #000000;\">(</span> aAWData<span style=\"color: #000000;\">[</span>WA_TABLENAME<span style=\"color: #000000;\">]</span> <span style=\"color: #000000;\">)</span><span style=\"color: #000000;\">)</span>+<span style=\"color: #ff0000;\">\") FROM \"</span>+aAWData<span style=\"color: #000000;\">[</span>WA_TABLENAME<span style=\"color: #000000;\">]</span><br /> ELSEIF aAWData<span style=\"color: #000000;\">[</span> WA_ENGINE <span style=\"color: #000000;\">]</span> = <span style=\"color: #ff0000;\">\"MSSQL\"</span><br /> cSql := <span style=\"color: #ff0000;\">\"SELECT IDENT_CURRENT('\"</span>+aAWData<span style=\"color: #000000;\">[</span>WA_TABLENAME<span style=\"color: #000000;\">]</span>+<span style=\"color: #ff0000;\">\"')+1 AS AUTO_INCREMENT\"</span><br /> <span style=\"color: #00C800;\">ELSE</span><br /> <span style=\"color: #B900B9;\">//30.06.15 REPLACED BY RAO NAGES IDEA next incremente key</span><br /> cSql := <span style=\"color: #ff0000;\">\"SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES\"</span>+;<br /> <span style=\"color: #ff0000;\">\" WHERE TABLE_SCHEMA = '\"</span>+aAWData<span style=\"color: #000000;\">[</span> WA_CATALOG <span style=\"color: #000000;\">]</span>+<span style=\"color: #ff0000;\">\"' AND TABLE_NAME = '\"</span>+aAWData<span style=\"color: #000000;\">[</span> WA_TABLENAME <span style=\"color: #000000;\">]</span>+<span style=\"color: #ff0000;\">\"'\"</span><br /> <span style=\"color: #00C800;\">ENDIF</span></div>[/code:ebz6tl3g]",
"time": "13:45",
"topic": "ADO RDD xHarbour",
"username": "byte-one"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-10-20",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Gunther,\n\nGreat!\n\nIn ACCESS its also needed \n[code=fw:32j3ex94]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /> cSql := <span style=\"color: #ff0000;\">\"SELECT MAX(\"</span>+<span style=\"color: #000000;\">(</span>ADO_GET_FIELD_RECNO<span style=\"color: #000000;\">(</span> aAWData<span style=\"color: #000000;\">[</span>WA_TABLENAME<span style=\"color: #000000;\">]</span> <span style=\"color: #000000;\">)</span><span style=\"color: #000000;\">)</span>+<span style=\"color: #ff0000;\">\")[b:32j3ex94]+1[/b:32j3ex94] FROM \"</span>+aAWData<span style=\"color: #000000;\">[</span>WA_TABLENAME<span style=\"color: #000000;\">]</span><br /> </div>[/code:32j3ex94]\n\nIs it working now with MSSQL?",
"time": "14:22",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-10-20",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Gunther\n\nI am just curious .. what are you trying to extract from the database .. a table structure, field attribute ?\n\nRick Lipkin",
"time": "15:25",
"topic": "ADO RDD xHarbour",
"username": "Rick Lipkin"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-10-20",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio, Rick!\n\n\"SELECT IDENT_CURRENT('\"+aAWData[WA_TABLENAME]+\"')+1 AS AUTO_INCREMENT\" i found in internet for MSSQL.\n\nAntonio, there are a error with ACCESS!!!\n\n[quote:nqrlv8wp]Error description: Error ADODB.Recordset/6 DISP_E_UNKNOWNNAME: OPEN\n Args:\n [ 1] = C SELECT * FROM TABLE1 ORDER BY HBRECNO\n [ 2] = O ADODB.Connection\n [ 3] = N 2\n [ 4] = N 3\n [ 5] = N 0\n\nStack Calls\n===========\n Called from: => TOLEAUTO:OPEN( 0 )\n Called from: C:\\adordd\\adordd.prg => ADO_OPEN( 318 )\n[/quote:nqrlv8wp]",
"time": "15:39",
"topic": "ADO RDD xHarbour",
"username": "byte-one"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-10-20",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Gunther,\n\nStrange here its ok\nIs the field HBRECNO in the table ?\n\nWhat is your SET ADO CACHESIZE TO... ?",
"time": "15:55",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-10-20",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio, now i found that the .mdb is constructed but no tables inside!! -> Also the error comes from here.\nI use this code:\n[code=fw:3fpva3xa]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\">DbCreate<span style=\"color: #000000;\">(</span><span style=\"color: #ff0000;\">\"table1;\"</span>+cPath+<span style=\"color: #ff0000;\">\"<span style=\"color: #000000;\">\\t</span>est2.mdb\"</span>, .....</div>[/code:3fpva3xa]\n\nADO CACHESIZE i do not use!",
"time": "16:09",
"topic": "ADO RDD xHarbour",
"username": "byte-one"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-10-20",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Gunther,\n\nThose are left overs from trials.\nTake out \";cpath\" you dot need it anymore. The database its auto created if not exist during connection.\n\nIn fact if you verify the table was created in the database indicated in SET ADO DEFAULT DATABASE...\n\nConfirm?",
"time": "16:29",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-10-20",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio, sorry, no tables!\nI test\n[code=fw:1sqcu213]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\">DbCreate<span style=\"color: #000000;\">(</span> <span style=\"color: #ff0000;\">\"table2;test2.mdb\"</span>, ....<br />DbCreate<span style=\"color: #000000;\">(</span> <span style=\"color: #ff0000;\">\"table2;test2\"</span>, ....<br />DbCreate<span style=\"color: #000000;\">(</span> <span style=\"color: #ff0000;\">\"table2;<span style=\"color: #000000;\">\\t</span>est2.mdb\"</span>, ....</div>[/code:1sqcu213]\n\nAntonio, i found MY bug! I check with file() the .MdB and as she is produced on connection i never come to the dbcreate()...\n\nTHANKS, ALL IS OK!!!",
"time": "16:43",
"topic": "ADO RDD xHarbour",
"username": "byte-one"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-10-20",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Gunther,\n\nDo it just like in clipper DbCreate( \"table2,{...)\nIs SET ADO DEFAULT DATABASE TO TESTADORDD.MDB ? Isnt the table there instead ?",
"time": "16:53",
"topic": "ADO RDD xHarbour",
"username": "AHF"
}
] |
ADO RDD xHarbour
|
[
{
"date": "2015-10-20",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio, please see my earlier post!\nAll is ok now!\n\nThanks for your great work!",
"time": "17:00",
"topic": "ADO RDD xHarbour",
"username": "byte-one"
}
] |
ADO RDD xHarbour
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.