F
Fred Chateau
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.
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.