Very nice! (
)
Can you add columns and column labels into Access Database from kix script?I want to import data from text file with dynamic number of columns and column labels. If Access Table does not have enough columns and labels to import all of the data from text file, then add columns and labels and import data from text file.
Here is the code to generate the text file:
code:
break on
$softcount = READPROFILESTRING('c:\windows\desktop\test.ini', 'Unresolved', 'softcount')IF Open( 4 , 'c:\windows\desktop\test.txt', 5 ) = 0
$count = 1
Do
$x = WriteLine( 4 , 'app' + $count + ",")
$count = $count + 1
Until $count > $softcount
$x = WriteLine( 4 , Chr(13) + Chr(10))
close ( 4 )
IF Open( 4 , 'c:\windows\desktop\test.txt', 5 ) = 0
$count = 1
Do
$key = 'Exe' + $count
$ReadString = READPROFILESTRING('c:\windows\desktop\test.ini', 'Unresolved', '$key')
$x = WriteLine( 4 , $ReadString + ",")
$count = $count + 1
Until $count > $softcount
$x = WriteLine( 4 , Chr(13) + Chr(10))
close ( 4 )
exit
[This message has been edited by 3MGrant5 (edited 25 July 2000).][This message has been edited by 3MGrant5 (edited 17 August 2000).]