Click here to Skip to main content
15,888,270 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
suppose i have created a stored procedure in sql having some parameter
what i want is that, i should open a notepad and write a following line
1,shankar,22 ie(id,name,age) and save the file .now when i just execute a stored procedure
the above values should be saved in the database.how can i do this please help its urgent...
Posted

Your question's not very clear. But based on my assumptions, it seems to me you want to parse the contents of the text file and store in in the DB. You'd have to open the text file, extract the fields, and then pass those fields to the stored proc. Extracting the 3 fields should be as simple as calling String.Split.
 
Share this answer
 
I agree with Nishant's answer. With his approach you would be doing the parsing of the data in an application which would split the input and then send the data via stored procedure to the database for insert.
If you want to send the line in its entirety to the stored procedure and have it do the split and insert all in the database, this may help you.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900