Click here to Skip to main content
12,405,700 members (64,493 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C#
hi
I am making a windows application
I am inserting Client information through store procedure and passing data table
and taking that id through out parameter and inserting other details of that client.
It is inserting all details but If I want to modify that Client details how should i do.
Posted 28-Dec-12 0:16am

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

Hi,

You can write another procedure or you can can modify your existing one.

If you send ID null or some default value then that should insert and out the ID value

if you send ID( Not null or not some default value ) then you should update the row

by
update 
SQL and put Id in where clause.
  Permalink  

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160721.1 | Last Updated 28 Dec 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100