1. When you set a field as "Value of field must be unique" A5 ignores the fact that a field is blank and not count against a unique value. ie you can have many empties on a unique field.
This was one of the short comings of my old application platform. It counted every field as unique even when it was blank.
Prior to that I used BTrieve and it allowed you to (Yes or No) the count for null value.
2. Ok, here is the other:
I always had a real straight forward import routine...simply:
file-import-import file-(assumes into the active table)-fields to import. Bingo, done.
Gives notice if duplicate attempted on a field with unique field property that you could silence or not.
----------
I found essentially the same thing in A5:) after looking around for all the import methods it had. This was the last one to be found:
(This could either be a Function or just a XB script.) And you can have whole groups of fields as long as they were on the same line and separated by (,).
Anyway, i would like to know HOW I can populate the
data = <<%a%
.....
%a%
data items from a calculation result on the fly so to speak.
ie. how to populate the data items straight from a calculation. Then call the function.
-------------
Right now I write them to an ascii file then import them in a much longer routine that creates temp tables and does checks that I do not need in this operation.
I was thinking of having the function called for every calc result and then t.close() after all the imports were done....as many as 150 at a time.
Then I'd skip the
data = <<%a%
.....
%a%
and just send the result as a Function(vals_to_import as C) 150 times, then close the table.
One of the things I would like to do is report how many records were added at the end of the operation if anyone has an idea on that also?
The key item is:
<TBL>.POPULATE_FROM_STRING( Record_Format as C, Record_Separator as C, Data as C )
Argument ********* Description
Record_Format: A comma delimited list of field names.
Record_Separator: The character or expression that separates records in the Data field.
Data: Data to place into the table.
This was one of the short comings of my old application platform. It counted every field as unique even when it was blank.
Prior to that I used BTrieve and it allowed you to (Yes or No) the count for null value.
2. Ok, here is the other:
I always had a real straight forward import routine...simply:
file-import-import file-(assumes into the active table)-fields to import. Bingo, done.
Gives notice if duplicate attempted on a field with unique field property that you could silence or not.
----------
I found essentially the same thing in A5:) after looking around for all the import methods it had. This was the last one to be found:
Code:
FUNCTION QuikImport AS C (val_to_import as C) [B]data = <<%a%[/B] [B]R5T0100[/B] [B]R5T0101[/B] [B]R5T0102[/B] [B]R5T0103[/B] [B]R5T0004[/B] [B]R5T0105[/B] [B]%a%[/B] '----------------- Here's the guts: t = table.open("TARGET_TBL") t.populate_from_string("TABLE_FLD", crlf(), data) t.close() '----------------- Really simple and FAST! END FUNCTION
Anyway, i would like to know HOW I can populate the
data = <<%a%
.....
%a%
data items from a calculation result on the fly so to speak.
ie. how to populate the data items straight from a calculation. Then call the function.
-------------
Right now I write them to an ascii file then import them in a much longer routine that creates temp tables and does checks that I do not need in this operation.
I was thinking of having the function called for every calc result and then t.close() after all the imports were done....as many as 150 at a time.
Then I'd skip the
data = <<%a%
.....
%a%
and just send the result as a Function(vals_to_import as C) 150 times, then close the table.
One of the things I would like to do is report how many records were added at the end of the operation if anyone has an idea on that also?
The key item is:
<TBL>.POPULATE_FROM_STRING( Record_Format as C, Record_Separator as C, Data as C )
Argument ********* Description
Record_Format: A comma delimited list of field names.
Record_Separator: The character or expression that separates records in the Data field.
Data: Data to place into the table.
Comment