|
-
Mar 29th, 2002, 11:26 AM
#1
Thread Starter
New Member
Reading from Files
I would like to know how to read a specific piece of data off of a CSV file. I know how to read the entire file, and also write it to a new file, but my problem is this... I am using a CSV file, that has specific data in it, that refers to information on my database. For example... UserNAme, UserID, Address, etc.
I would like to know how to only obtain the username field from the CSV file, then use that information to update other tables in the database, depending on the name I get back. PLEASE HELP. IT's Kind of Urgent. My email address is [email protected]. Any help would be greatly appreciated
-
Mar 29th, 2002, 11:32 AM
#2
you can attach the CSV file as a file to the Access2000 database.
Once it is properly set up, you can hit it as you would any other
read-only table.
HTH
-
Mar 29th, 2002, 11:33 AM
#3
Assuming that there are no embedded commas in the data
like: 13,13,"Smith, John",13
This works just fine
Code:
Dim a() as string
dim comma as string
Comma = ","
str ' a line from the csv file that you want to put into fields
UserName = 5 ' assume the username is in field 5
a = Split(str, comma)
strUserName = a(UserName)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|