Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create a recordset from a csv data on the fly

Status
Not open for further replies.

jonohara

Technical User
Mar 26, 2000
53
GB
Hi

I have a table in my shopping cart database which stores the delivery address info in a single field called address, each part of the address is separated by a semicolon.

I need to create a recordset with each address element in its own field. I'd prefer not to have to convert the data each time but simply to create a query or recordset which would work on the fly.

Thanks
 
Hallo,

What about writing a function which would return the required element

public function strElement(byval pstrData as string, byval intElement as integer)

The code would loop through the ;-separated elements until if found the one you wanted, then return it.

You could then refer to each element as strElement(address,1), strElement(address,2) etc.

- Frink
 
If ac2k or above, take a look at the Split function.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top