Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

ASP.NET Forum


You are currently viewing our ASP.NET Forum as a guest. Please register to participate.
Login



Reply
How to import the textarea data into database
Old 01-20-2005, 12:18 AM How to import the textarea data into database
Novice Talker

Posts: 13
Trades: 0
Dear All,

I have searched a lot at GOOGLE, but i can't found the way to import data from a form textarea into database.

Actually my web page would like to allow the user to export their phone book from excel file or outlook phone book, then import into my database.

I was thinking to provide a textarea for the user to COPY and PASTE their address book from the text file and then my web page will read line by line to store the data into the database.

Example data:

abc, abc@hotmail.com, 999999999

bcd, bcd@hotmail.com, 888888888

i can't find any solution that can read line by line, because normally when the we parse the data from the form textarea. All the text will become string that without the <br>.

Please HELP !!

Thanks.
superman2004 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 02-09-2005, 03:57 PM
etech355's Avatar
Average Talker

Posts: 29
Location: Maryland
Trades: 0
Try this ...

<%
Dim MyString, MyArray
MyString = request("textareavalue")
MyArray = Split(MyString,vbCRLF)
For i=0 to UBound(MyArray)
response.write myArray(i) & "<br>"
Next
%>
__________________
Eric

Please login or register to view this content. Registration is FREE
etech355 is offline
Reply With Quote
View Public Profile Visit etech355's homepage!
 
Old 02-09-2005, 05:04 PM
WebcyteDesign's Avatar
Registered User

Posts: 159
Location: Hamilton
Trades: 0
Try using a regular expression to match what you are looking for line by line and store in an array then iterate through the array and input into the database.
WebcyteDesign is offline
Reply With Quote
View Public Profile Visit WebcyteDesign's homepage!
 
Reply     « Reply to How to import the textarea data into database
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.29096 seconds with 12 queries