|
| |
Reading data from a CSV locally and inserting them in to a DB on a webserver
View related threads:
(in this forum
| in all forums)
|
Logged in as: Guest
|
|
|
and13345
Posts: 100 Joined: 10/7/2003 Status: offline
|
Reading data from a CSV locally and inserting them in t... - 10/25/2007 18:10:55
I have seen posts that show examples of reading data from a CSV that is located on the hard drive of a webserver, but I am wondering if there is a way to read a CSV that is on my local machine and have that data inserted in to a DB that is located on the webserver. What I am trying to get around is having to upload the CSV to the server before inporting the data.
|
|
|
|
and13345
Posts: 100 Joined: 10/7/2003 Status: offline
|
RE: Reading data from a CSV locally and inserting them ... - 10/26/2007 0:49:27
I am not sure I fully understand your post. Are you saying I can take and copy the contents of the CSV (see example below) and paste it in to a textarea in a form page and then read that in to a DB?. Can you point me to an example of this? "Parameter","Value","Description" "AAC","Option is disabled","Allow AAC and M4A encoding" "AAC_Decode","Option is disabled","Allow AAC and M4A decoding" "AC3Decode","Option is disabled","Allow AC3 decoding in the build" "AC3DecodePro","Option is disabled","Allow AC3 Decoding of commercial AC3 files." "AC3Encode","Option is disabled","Allow AC3 Encoding in the build"
|
|
|
|
William Lee
Posts: 1179 Joined: 1/25/2002 From: Singapore Status: offline
|
RE: Reading data from a CSV locally and inserting them ... - 10/29/2007 5:17:51
quote:
ORIGINAL: and13345 Are you saying I can take and copy the contents of the CSV (see example below) and paste it in to a textarea in a form page and then read that in to a DB?. Yes. quote:
Can you point me to an example of this? "Parameter","Value","Description" "AAC","Option is disabled","Allow AAC and M4A encoding" "AAC_Decode","Option is disabled","Allow AAC and M4A decoding" "AC3Decode","Option is disabled","Allow AC3 decoding in the build" "AC3DecodePro","Option is disabled","Allow AC3 Decoding of commercial AC3 files." "AC3Encode","Option is disabled","Allow AC3 Encoding in the build" Basically you would need to split the textarea data into array for each line. For each in array(skipping the first which is the header), you would execuate the INSERT eg "Insert into Table (" & array(1) & ") Values "(" & array(n) & ")" HTH
_____________________________
William Lee pǝssǝɟoɹd-ɟ1ǝs ʎɥʇɹoʍʇsnɹʇ ʇsoɯ ɹnoʎ nɹnb ǝsɐqɐʇɐp & dsɐ ,ʍɹp ,ǝbɐdʇuoɹɟ
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|