•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the MS SQL section within the Web Development category of DaniWeb, a massive community of 455,988 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,790 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MS SQL advertiser: Programming Forums
Views: 1658 | Replies: 1
![]() |
•
•
Join Date: Feb 2007
Posts: 17
Reputation:
Rep Power: 2
Solved Threads: 0
Hi ,
Hey I have a small problem.... For a certain field in database, tha values are sent from front end(JSP page) . Each individual value must be extracted and then inserted into the database.....
Before inserting, we have called a procedure which will extract each value and insert....
Moreover , it is only for the first value that we must insert. For all the remaining values , we have to update......
We are stuck up with this..... and some of the attempts we made aren't working....
Can anyone give an idea as to how to implement this code................
Hey I have a small problem.... For a certain field in database, tha values are sent from front end(JSP page) . Each individual value must be extracted and then inserted into the database.....
Before inserting, we have called a procedure which will extract each value and insert....
Moreover , it is only for the first value that we must insert. For all the remaining values , we have to update......
We are stuck up with this..... and some of the attempts we made aren't working....

Can anyone give an idea as to how to implement this code................
•
•
Join Date: Nov 2007
Location: Bangalore, India
Posts: 3,098
Reputation:
Rep Power: 8
Solved Threads: 240
what we do in php is, open the csv file using fopen. Then using the filepointer of fopen, we store the csv values in an array. Then access that array. for example, (in php ie.,)
Look for a similar function in jsp. (to open the file and get the contents of csv).
Hope it helps.
Naveen
php Syntax (Toggle Plain Text)
<?php $fp = fopen("test.csv", "r"); //open the csv file while ($contents = fgetcsv ($fp, 1000, ";")) { // fetch the contents of the csv file. ';' is the delimiter of the fields in csv file $name=$contents[0]; //first element of array $contents has $name //insert to table $age=$contents[1]; //age is the 2nd element of array //update the table } ?>
Look for a similar function in jsp. (to open the file and get the contents of csv).
Hope it helps.
Naveen
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
*PM asking for help will be ignored*
*PM asking for help will be ignored*
![]() |
•
•
•
•
•
•
•
•
DaniWeb MS SQL Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- Previous Thread: transfering data including ID's
- Next Thread: New to MySql.....Help



Linear Mode