Click here to Skip to main content
15,887,385 members
Home / Discussions / C#
   

C#

 
GeneralRe: Decimal Places Pin
Heath Stewart3-Feb-04 4:36
protectorHeath Stewart3-Feb-04 4:36 
GeneralDatagrid row Color Pin
Reinier van de Wetering2-Feb-04 19:19
Reinier van de Wetering2-Feb-04 19:19 
GeneralRe: Datagrid row Color Pin
Mazdak2-Feb-04 22:09
Mazdak2-Feb-04 22:09 
GeneralRe: Datagrid row Color Pin
Reinier van de Wetering3-Feb-04 19:19
Reinier van de Wetering3-Feb-04 19:19 
GeneralRe: Datagrid row Color Pin
Reinier van de Wetering3-Feb-04 19:49
Reinier van de Wetering3-Feb-04 19:49 
GeneralUpdating DataBase Pin
GetOn&GetGoing2-Feb-04 18:40
GetOn&GetGoing2-Feb-04 18:40 
GeneralRe: Updating DataBase Pin
Mazdak2-Feb-04 22:05
Mazdak2-Feb-04 22:05 
GeneralRe: Updating DataBase Pin
Heath Stewart3-Feb-04 4:43
protectorHeath Stewart3-Feb-04 4:43 
You need to use a DataAdapter (for this, I'll assume a SqlDataAdapter and related classes) with SelectCommand, InsertCommand, UpdateCommand, and DeleteCommand properties assigned. If you use a simple SELECT query (i.e., no JOINs or nested SELECTs) you can use a SqlCommandBuilder to generate the other 3 SqlCommand properties from the SqlCommand for the SqlDataAdapter.SelectCommand property. These commands must also be parameterized.

You can also use the VS.NET designers to create the SqlDataAdapter and all the SqlCommands for you. You can drag a DataSet (which can be strongly-typed) or SqlDataAdapter from the "Data" tab of your toolbox when a component is open in the designer. Play around with this, though I recommend you examine the code that is generated in the source file to understand what it going on.

 

Microsoft MVP, Visual C#
My Articles
Generalgetting graphics card info Pin
Member 93287482-Feb-04 17:45
Member 93287482-Feb-04 17:45 
GeneralRe: getting graphics card info Pin
Mazdak2-Feb-04 18:31
Mazdak2-Feb-04 18:31 
GeneralDrag & Drop Interface Pin
johnstacey2-Feb-04 15:05
johnstacey2-Feb-04 15:05 
GeneralRe: Drag & Drop Interface Pin
John Fisher3-Feb-04 4:22
John Fisher3-Feb-04 4:22 
GeneralRe: Drag & Drop Interface Pin
Heath Stewart3-Feb-04 4:54
protectorHeath Stewart3-Feb-04 4:54 
GeneralRe: Drag & Drop Interface Pin
johnstacey3-Feb-04 11:42
johnstacey3-Feb-04 11:42 
GeneralSerializable socket Pin
Snowjim2-Feb-04 14:40
Snowjim2-Feb-04 14:40 
GeneralRe: Serializable socket Pin
Heath Stewart3-Feb-04 5:10
protectorHeath Stewart3-Feb-04 5:10 
GeneralCookies problem... Pin
profoundwhispers2-Feb-04 14:20
profoundwhispers2-Feb-04 14:20 
GeneralRe: Cookies problem... Pin
Heath Stewart3-Feb-04 5:16
protectorHeath Stewart3-Feb-04 5:16 
GeneralRe: Cookies problem... Pin
profoundwhispers3-Feb-04 7:52
profoundwhispers3-Feb-04 7:52 
GeneralRe: Cookies problem... Pin
Heath Stewart3-Feb-04 8:54
protectorHeath Stewart3-Feb-04 8:54 
GeneralRe: Cookies problem... Pin
profoundwhispers3-Feb-04 9:17
profoundwhispers3-Feb-04 9:17 
GeneralRe: Cookies problem... Pin
Heath Stewart3-Feb-04 9:38
protectorHeath Stewart3-Feb-04 9:38 
GeneralRe: Cookies problem... Pin
profoundwhispers3-Feb-04 9:58
profoundwhispers3-Feb-04 9:58 
GeneralRe: Cookies problem... Pin
Heath Stewart3-Feb-04 10:25
protectorHeath Stewart3-Feb-04 10:25 
GeneralRe: Cookies problem... Pin
profoundwhispers3-Feb-04 10:40
profoundwhispers3-Feb-04 10:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.