![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Sadly it is not working because TCursor does not derive from AnyType I have something like (but not exactly) this Var tmpTC TCursor arTC Array[] TCursor EndVar For i from 1 to tblStr.Size() tmpTC.Open(tblStr[i]) tmpTC.Home() |
|
arTC.AddLast(tmpTC) You have to attach the tc not use the array methods. |
|
endfor I keep getting an error on the line "arTC.AddLast(tmpTC)" saying "An error was triggered in the 'copyRecord' method on an object of TCursor type. Obviously, It is trying to copy the TCursor but all I want is a pointer or reference copied. I am new to ObjectPal so I don't know how these things a handled. Basically I have several tables in several different directories which all have the same structure, but diffent entries. I am trying to make a script to Sync them. and I thought starting with an array of all relevant tables would be a good start, but even this is proving dificult I am using Paradox 11 on XP Thanks Howie |
#3
| |||
| |||
|
|
I am trying to use an array of TCursor Sadly it is not working because TCursor does not derive from AnyType I have something like (but not exactly) this Var tmpTC TCursor arTC Array[] TCursor EndVar For i from 1 to tblStr.Size() tmpTC.Open(tblStr[i]) tmpTC.Home() arTC.AddLast(tmpTC) endfor I keep getting an error on the line "arTC.AddLast(tmpTC)" saying "An error was triggered in the 'copyRecord' method on an object of TCursor type. Obviously, It is trying to copy the TCursor but all I want is a pointer or reference copied. I am new to ObjectPal so I don't know how these things a handled. Basically I have several tables in several different directories which all have the same structure, but diffent entries. I am trying to make a script to Sync them. and I thought starting with an array of all relevant tables would be a good start, but even this is proving dificult I am using Paradox 11 on XP Thanks Howie |
#4
| |||
| |||
|
|
Mark's answer is clever and does what you want (kindof). *I can see where you would want a pointer, but Mark gives you the actual opened tcursor. Question is - can pdox handle all of the possible open tcursors you're going to have? *How many open tables do you ahve to sync up? *And what exactly do you mean by sync up? *Are you trying to make the contents all identical? Perhaps there's another approach.<hswer... (AT) gmail (DOT) com> wrote in message news:b5eedc5a-3c84-4df4-a6c6-62f944ddcc8d (AT) x14g2000yqk (DOT) googlegroups.com... I am trying to *use an array of TCursor Sadly it is not working because TCursor does not derive from AnyType I have something like (but not exactly) this Var * tmpTC TCursor * arTC Array[] TCursor EndVar For i from 1 to tblStr.Size() *tmpTC.Open(tblStr[i]) *tmpTC.Home() *arTC.AddLast(tmpTC) endfor I keep getting an error on the line "arTC.AddLast(tmpTC)" saying "An error was triggered in the 'copyRecord' method on an object of TCursor type. Obviously, It is trying to copy the TCursor but all I want is a pointer or reference copied. I am new to ObjectPal so I don't know how these things a handled. Basically I have several tables in several different directories which all have the same structure, but diffent entries. I am trying to make a script to Sync them. and I thought starting with an array of all relevant tables would be a good start, but even this is proving dificult I am using Paradox 11 on XP Thanks Howie I have about 10 tables |
#5
| |||
| |||
|
|
Marks answer works and I am using it but I can't help but feel like I am missing a "*" or "&" or "ByRef" or "new" or something in the language that would make my future life in this language easier. |
#6
| |||
| |||
|
|
Mark's answer is clever and does what you want (kindof). I can see where you would want a pointer, but Mark gives you the actual opened tcursor. Question is - can pdox handle all of the possible open tcursors you're going to have? How many open tables do you ahve to sync up? And what exactly do you mean by sync up? Are you trying to make the contents all identical? Perhaps there's another approach.<hswer... (AT) gmail (DOT) com> wrote in message news:b5eedc5a-3c84-4df4-a6c6-62f944ddcc8d (AT) x14g2000yqk (DOT) googlegroups.com... I am trying to use an array of TCursor Sadly it is not working because TCursor does not derive from AnyType I have something like (but not exactly) this Var tmpTC TCursor arTC Array[] TCursor EndVar For i from 1 to tblStr.Size() tmpTC.Open(tblStr[i]) tmpTC.Home() arTC.AddLast(tmpTC) endfor I keep getting an error on the line "arTC.AddLast(tmpTC)" saying "An error was triggered in the 'copyRecord' method on an object of TCursor type. Obviously, It is trying to copy the TCursor but all I want is a pointer or reference copied. I am new to ObjectPal so I don't know how these things a handled. Basically I have several tables in several different directories which all have the same structure, but diffent entries. I am trying to make a script to Sync them. and I thought starting with an array of all relevant tables would be a good start, but even this is proving dificult I am using Paradox 11 on XP Thanks Howie I have about 10 tables |
#7
| |||
| |||
|
#8
| |||
| |||
|
|
I have about 10 tables and by sync, yes I mean make them all identical but there is no easy way to do this that I can see. all the tables have some missing records and some other records that have the same key have differences in the data portion of the records that do exist. I have an "Algorithm" to determine which table is the authority on each record, but its not simple and relies on what the data in the rest of the record looks like I suppose I am doing more of a Merge into a single authoritative copy, then copy back out the result. Marks answer works and I am using it but I can't help but feel like I am missing a "*" or "&" or "ByRef" or "new" or something in the language that would make my future life in this language easier. |
#9
| |||
| |||
|
|
Also, I may be remembering this incorrectly but I think you can assign tcursors to dynarrays by creating a new type in uses. Search thedbcommunity.com of the newsgruops at google for Type or defining type and such and I think you will find info on that. Denn Santoro |
#10
| |||
| |||
|
|
Dennis Santoro wrote: Also, I may be remembering this incorrectly but I think you can assign tcursors to dynarrays by creating a new type in uses. Search thedbcommunity.com of the newsgruops at google for Type or defining type and such and I think you will find info on that. Denn Santoro Nothing special needed for dynarray of tcursors. No Uses. No Type. (How would you 'create a new type in uses', anyway?) var dyTC dynarray[] tcursor endvar is all it takes to get started. --------------- Tony McGuire |
![]() |
| Thread Tools | |
| Display Modes | |
| |