Joseph,
Rodney offered a useful code as an example.
You might have missed it.
I copy and comment the code for you in "{...}":
Rodney's code >>>
I'd simply open a tCursor to the Table and add the Array Data using a Loop.
Untested Example:
;--begin-----------------------------------
;--------------------------->
Var
tc tCursor
liTicker longInt
arFiles Array[] String
endVar
;<---------------------------
{Assuming you want to store the results of the filebrowser in the
existing table "C:\\MyTableName.db".
The tcursor "tc" is a pointer to (elements of) this table. Next line
will combine the tc with the table}
tc.open("C:\\MyTableName.db")
if arFiles.size() > 0 then
liTicker = 1
tc.edit()
{He's now parsing all elements of the array and inserts a new record
for each element into the table.
You could also do this with a for ... next loop.}
While liTicker <= arFiles.size()
{He inserts a new empty record into the table:}
tc.insertRecord()
tc."MyFieldName" = arFiles[liTicker]
{The field "MyFieldName" - you would change this of course to your
needs - contains now the actual element of the array.
I would add here this line:
if NOT tc.unlockRecord() then errorShow() quitLoop endIf}
liTicker = liTicker + 1
endWhile
tc.endEdit()
{And add: tc.close()}
endif
;--end------------------------------------------
<<<
I would say Rodney already answered your question, didn't he?
Egbert, 01:55 AM in Germany
"joseph gimeno" <joe.jrc (AT) alaska (DOT) net> schrieb im Newsbeitrag
news:43d95fd6 (AT) news (DOT) acsalaska.net...
Quote:
thanks for your tip. But how do I attach a tCursor to an array and step
thru...how can you scan tCursor in an array?
since I don't know and already tried different approaches including
tCursors, I thought I ask.... |