Primary Field and SqlDataAdapter
From: Lev Burov (LevBurov_at_discussions.microsoft.com)
Date: 11/24/04
- Next message: NayJo: "Re: List of ADO Errors"
- Previous message: kejeiri: "Data/XML Problem"
- Next in thread: Val Mazur: "Re: Primary Field and SqlDataAdapter"
- Reply: Val Mazur: "Re: Primary Field and SqlDataAdapter"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 24 Nov 2004 09:01:10 -0800
Hi All,
I have a fairly simple problem I can't find an answer to:
I'm using SqlDataAdapter.Update() function to update my SQL Server database
with a DataTable. I want it to look at the rows in the DataTable and if the
particular field called IDCode(varchar) is found in the DB table then I want
the DataAdapter to use it's update command, if not then I want it to insert a
new row using the insert command.
Now here's the problem: I set up both commands update and insert, but I
don't know where to specify with the SqlDataAdapter to look for this one
field that acts as a primary key in the table. Can someone help?
Thanks,
Lev
-- *** Porky said it
- Next message: NayJo: "Re: List of ADO Errors"
- Previous message: kejeiri: "Data/XML Problem"
- Next in thread: Val Mazur: "Re: Primary Field and SqlDataAdapter"
- Reply: Val Mazur: "Re: Primary Field and SqlDataAdapter"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|