Click here to Skip to main content
15,911,646 members
Home / Discussions / Database
   

Database

 
QuestionSQL Express and Learning Center Video Pin
Brigg Thorp13-Dec-05 3:59
Brigg Thorp13-Dec-05 3:59 
QuestionSQLEXPRESS Pin
Illegal Operation13-Dec-05 2:47
Illegal Operation13-Dec-05 2:47 
AnswerRe: SQLEXPRESS Pin
enjoycrack13-Dec-05 7:37
enjoycrack13-Dec-05 7:37 
QuestionSQL Pin
dev_rfid13-Dec-05 1:09
dev_rfid13-Dec-05 1:09 
AnswerRe: SQL Pin
Ritesh123413-Dec-05 2:19
Ritesh123413-Dec-05 2:19 
AnswerRe: SQL Pin
toxcct13-Dec-05 23:27
toxcct13-Dec-05 23:27 
AnswerRe: SQL Pin
miah alom14-Dec-05 4:24
miah alom14-Dec-05 4:24 
QuestionOleDbDataAdapter & Primary Keys Pin
JohnBeton13-Dec-05 0:53
JohnBeton13-Dec-05 0:53 
Hi experts,

I have the following problem when saving data from an XML-file to a database using the OleDbDataAdapter:

I'm using a typed dataset, derived from the xml-schema.
I load the xml-file into the dataset and try to save the data to the database. (the dataAdapter has all the commands (select, insert, update, delete) properly configured.

When it's all new data, there's no problem, all data is saved correctly.

But it's also possible that the xml-file contains data that is already in the database (primary key already exists), so this data needs to be updated (instead of re-inserted)(this is what a dataAdapter takes care of, right ?)

I tried 2 approaches:
1) Only loading the xml-data into the dataset:
When i use the update-method of my dataAdapter and there is data that is already in the database (primary key already exists) i get an oleDbException.

2) First load the database-data in the dataset, and then load the xml-file in the dataset:
I get a ConstraintException while loading the xml-data because primary key already exists in the datatable of the dataset.

How can I fix this problem so that I get 1 table with updated old data and inserted new data ?
Any help is much appreciated... Thanks in advance...

John
QuestionGet Secure data from host Pin
mtone12-Dec-05 10:12
mtone12-Dec-05 10:12 
AnswerRe: Get Secure data from host Pin
Farhan Noor Qureshi12-Dec-05 12:53
Farhan Noor Qureshi12-Dec-05 12:53 
QuestionHow to call another stored procedure within a sql server extended stored procedure? Pin
Xiangyang Liu 刘向阳12-Dec-05 10:03
Xiangyang Liu 刘向阳12-Dec-05 10:03 
AnswerRe: How to call another stored procedure within a sql server extended stored procedure? Pin
anandss13-Dec-05 9:20
anandss13-Dec-05 9:20 
GeneralRe: How to call another stored procedure within a sql server extended stored procedure? Pin
Xiangyang Liu 刘向阳14-Dec-05 4:11
Xiangyang Liu 刘向阳14-Dec-05 4:11 
QuestionStoredProcedure error Pin
R. A. Abbasi12-Dec-05 6:24
R. A. Abbasi12-Dec-05 6:24 
AnswerRe: StoredProcedure error Pin
Al Ortega12-Dec-05 6:59
Al Ortega12-Dec-05 6:59 
GeneralRe: StoredProcedure error Pin
R. A. Abbasi12-Dec-05 7:13
R. A. Abbasi12-Dec-05 7:13 
QuestionProblem with Insert Command Pin
fitz23456711-Dec-05 22:56
fitz23456711-Dec-05 22:56 
QuestionGenerate “Dataset” of Enterprise .Net Windows Application Problem Pin
Fariborz Golara11-Dec-05 22:25
Fariborz Golara11-Dec-05 22:25 
AnswerRe: Generate "Dataset" of Enterprise .Net Windows Application Problem Pin
Colin Angus Mackay12-Dec-05 4:53
Colin Angus Mackay12-Dec-05 4:53 
GeneralThank you Colin Pin
Fariborz Golara12-Dec-05 8:08
Fariborz Golara12-Dec-05 8:08 
QuestionDatabase table audit in SQL 2000 Pin
sumitjh11-Dec-05 22:01
sumitjh11-Dec-05 22:01 
QuestionAdo.net sqldatareader not working Pin
kal13na1311-Dec-05 21:59
kal13na1311-Dec-05 21:59 
AnswerRe: Ado.net sqldatareader not working Pin
miah alom12-Dec-05 4:16
miah alom12-Dec-05 4:16 
GeneralRe: Ado.net sqldatareader not working Pin
kal13na1312-Dec-05 18:49
kal13na1312-Dec-05 18:49 
GeneralRe: Ado.net sqldatareader not working Pin
miah alom13-Dec-05 3:49
miah alom13-Dec-05 3:49 

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.