No Data After DataAdapter Update
- From: "Fred Chateau" <webmaster@xxxxxxxxxxxxxxxxx>
- Date: Thu, 24 May 2007 08:52:12 -0500
Any obvious reason here why data is not being loaded into the database?
SqlDataAdapter dataAdapter = new SqlDataAdapter(sqlCommand);
SqlCommandBuilder commandBuilder = new SqlCommandBuilder(dataAdapter);
dataAdapter.Fill(dataSet, "POI_Entity");
DataRow dataRow = dataSet.Tables["POI_Entity"].NewRow();
dataRow["PK_POI"] = 1;
dataRow["POI_Entity_Id"] = dataSet.Identity[0].POI_Entity_ID;
dataRow["Chain_Id"] = dataSet.Identity[0].Chain_ID;
dataRow["Category_Id"] = dataSet.Category_ID[0].Category_ID_Text;
dataRow["Name"] = dataSet.POI_Name[0].Text;
int rows = dataAdapter.Update(dataSet, "POI_Entity");
The data being transferred into the POI_Entity DataTable is from two XML
tables in the same dataset. I can see the correct data from the XML tables
in the Autos window. The POI_Entity table in the database has no data either
before or after update is called. The rows variable shows 0 data was
inserted.
--
Regards,
Fred Chateau
http://hotelmotelnow.com
.
- Follow-Ups:
- Re: No Data After DataAdapter Update
- From: Nicholas Paldino [.NET/C# MVP]
- Re: No Data After DataAdapter Update
- Prev by Date: Re: need to assign null
- Next by Date: RE: VB to c# conversion...
- Previous by thread: Mpeg & C#[win]
- Next by thread: Re: No Data After DataAdapter Update
- Index(es):
Relevant Pages
|
Loading