Click here to Skip to main content
15,908,013 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,
My requirement is as follows:
In a single web page I have a image slider[JQuery] type control.When I am clicking on any particular image,all the related information are coming in the fields[text boxes]below.
there are two scenarios:
1.I can change the values in the text boxes.Again select another image,change the related infos the text boxes.this way.But I want to update all the information by clicking one button,not every time.[Bulk Update]
2.There may be blank image,for which I have to give new information.[bulk Insert in case the info is not existing].

Both the things I will do on a single button click.
Now my question is:
I want to write a sp which will bulk insert if the row was not present or it will update the row if present.
How to write such SP for <b>bulk Insert/Update</b>?For single row,I can do.
[Assuming table structure:(Mov_id pk,Mov_name,Cost)it should be some thing like this:
if Mov_id not in table_Movie
insert into ....
else update table_Movie set .... where... ]This is for single row.I want to do in bulk.
Please help ASAP as I am in urgent need..
Posted
Comments
koool.kabeer 29-Jul-10 6:36am    
from where you are getting the Images?, if it is from Database Table.. how you are inserting those images?, and if you are inserting those images prior to displaying them ... how the question arise of display no image?
koool.kabeer 29-Jul-10 6:37am    
but regarding multiple updates i too have a question about how to updates multiple fields in one update command
#realJSOP 29-Jul-10 7:25am    
First, if you were REALLY in urgent need, you'd try to find the answer with google. Believe me - it's out there. Second, Arun Jacob gave you the answer. Again, use google to find out how to do it, because it will take less time to do that than to wait fro someone here to give you a detailed answer. Nut up, and be a programmer.

1 solution

You can use XML input parameter and use OPENXML in SP.
 
Share this answer
 
Comments
avishekrc 29-Jul-10 6:53am    
Can you please write such small model SP?
#realJSOP 29-Jul-10 7:25am    
Reason for my vote of 5
This is the answer and should be accepted by the OP.
Arun Jacob 29-Jul-10 7:27am    
Have you tried Google, you'll get lot of samples. Check one of my blog post for sample,
http://codepronet.blogspot.com/2009/01/xml-in-sql.html

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