How can I know the number of columns of the .csv files? I want to
import them to the database.
split and ubound maybe
s = "a,b,c,d,e"
a = split(s, ",")
n = ubound(a)
At this point, n should equal 4 since a is a zero based array. Any
more than this, I will have to charge you a consulting fee
Here is a signed blank cheque ready for you
Yes, if I can't get the string of one of the rows. but I don't know how
to
select [what] from thisfile.csv so that I can get a string with commas:-(
Why do you need to have this? Once you have split a line of text into
an array, you will have the VALUES for an INSERT statement.
"INSERT INTO Tbl (cola, colb, colc...) VALUES (" & a(0) & "," & .....
The problem is how many cola, colb...., and how many a(0), a(1)? Actually
how can I get the value of a(0)?
Alternatively, if you are looking to open the CSV file with an ADO
type command, you will nee to find the appropriate connection string,
then issue a statement like...
"SELECT * FROM File.csv" (or something like that).
When I do this string, the 16 digit of barcode (9876543210123456) in the
fields all become (9.87654321012345E+15) in the database. Because when it is
inserted into the db, it may be recognized as a number. When I export a text
file, the conversion can't be reversed, and will be a text string
9.87654321012345E+15. How can I do to avoid from this conversion?