Click here to Skip to main content
15,885,244 members
Home / Discussions / C#
   

C#

 
AnswerRe: I got the error that: Not all code paths return a value Pin
Jochen Arndt15-Jan-18 2:22
professionalJochen Arndt15-Jan-18 2:22 
AnswerRe: I got the error that: Not all code paths return a value Pin
OriginalGriff15-Jan-18 4:10
mveOriginalGriff15-Jan-18 4:10 
QuestionSpeech recognition: Unable to LoadGrammar and no installed recognizer Pin
Mc_Topaz13-Jan-18 3:35
Mc_Topaz13-Jan-18 3:35 
QuestionSelect data from MSSQL database and insert into oracle database Pin
Member 1346617612-Jan-18 2:51
Member 1346617612-Jan-18 2:51 
AnswerRe: Select data from MSSQL database and insert into oracle database Pin
Richard MacCutchan12-Jan-18 3:11
mveRichard MacCutchan12-Jan-18 3:11 
AnswerRe: Select data from MSSQL database and insert into oracle database Pin
Richard Deeming12-Jan-18 3:13
mveRichard Deeming12-Jan-18 3:13 
GeneralRe: Select data from MSSQL database and insert into oracle database Pin
Member 1346617612-Jan-18 3:36
Member 1346617612-Jan-18 3:36 
GeneralRe: Select data from MSSQL database and insert into oracle database Pin
Richard Deeming12-Jan-18 3:45
mveRichard Deeming12-Jan-18 3:45 
Member 13466176 wrote:
doesnt the CommandBuilder automatically convert the SELECT statement into an Insert statement when I call da.Update(dt)?

IIRC, it should do. But the error you're getting suggests that's not working for the OracleCommandBuilder for some reason.

Member 13466176 wrote:
Anyways, could you tell me how to bind the columns of the dataset dt to a parameter like you showed?

It's a while since I used a DataAdapter to modify data, but something like this should work:
da.InsertCommand = new OracleCommand("INSERT INTO Tab2 (A, B) VALUES (:A, :B)", connOracle);

var p = da.InsertCommand.CreateParameter();
p.ParameterName = "A";
p.SourceColumn = "A";
p.SourceVersion = DataRowVersion.Current;
da.InsertCommand.Parameters.Add(p);

p = da.InsertCommand.CreateParameter();
p.ParameterName = "B";
p.SourceColumn = "B";
p.SourceVersion = DataRowVersion.Current;
da.InsertCommand.Parameters.Add(p);

da.Update(dt);




"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


GeneralRe: Select data from MSSQL database and insert into oracle database Pin
Member 1346617612-Jan-18 4:01
Member 1346617612-Jan-18 4:01 
QuestionSystem.IO.IOException: 'The I/O operation has been aborted because of either a thread exit or an application request Pin
Member 1058555811-Jan-18 11:19
Member 1058555811-Jan-18 11:19 
AnswerRe: System.IO.IOException: 'The I/O operation has been aborted because of either a thread exit or an application request Pin
OriginalGriff11-Jan-18 11:25
mveOriginalGriff11-Jan-18 11:25 
AnswerRe: System.IO.IOException: 'The I/O operation has been aborted because of either a thread exit or an application request Pin
Bernhard Hiller11-Jan-18 21:35
Bernhard Hiller11-Jan-18 21:35 
GeneralRe: System.IO.IOException: 'The I/O operation has been aborted because of either a thread exit or an application request Pin
Member 1058555812-Jan-18 3:19
Member 1058555812-Jan-18 3:19 
AnswerRe: System.IO.IOException: 'The I/O operation has been aborted because of either a thread exit or an application request PinPopular
Luc Pattyn12-Jan-18 5:16
sitebuilderLuc Pattyn12-Jan-18 5:16 
GeneralRe: System.IO.IOException: 'The I/O operation has been aborted because of either a thread exit or an application request Pin
Member 1058555812-Jan-18 6:31
Member 1058555812-Jan-18 6:31 
GeneralRe: System.IO.IOException: 'The I/O operation has been aborted because of either a thread exit or an application request Pin
Luc Pattyn12-Jan-18 6:46
sitebuilderLuc Pattyn12-Jan-18 6:46 
QuestionC# How can I center the PictureBox to the Parent from code? ( Windows Forms ) Pin
Karl Henrry11-Jan-18 10:27
Karl Henrry11-Jan-18 10:27 
AnswerRe: C# HOW CAN I CENTER THE PICTUREBOX TO THE PARENT? Pin
Pete O'Hanlon11-Jan-18 10:45
mvePete O'Hanlon11-Jan-18 10:45 
GeneralRe: C# HOW CAN I CENTER THE PICTUREBOX TO THE PARENT? Pin
Karl Henrry11-Jan-18 12:26
Karl Henrry11-Jan-18 12:26 
AnswerRe: C# HOW CAN I CENTER THE PICTUREBOX TO THE PARENT? Pin
OriginalGriff11-Jan-18 11:14
mveOriginalGriff11-Jan-18 11:14 
GeneralRe: C# HOW CAN I CENTER THE PICTUREBOX TO THE PARENT? Pin
Karl Henrry11-Jan-18 12:41
Karl Henrry11-Jan-18 12:41 
AnswerRe: C# How can I center the PictureBox to the Parent from code? ( Windows Forms ) Pin
User 740747011-Jan-18 13:52
User 740747011-Jan-18 13:52 
GeneralRe: C# How can I center the PictureBox to the Parent from code? ( Windows Forms ) Pin
Karl Henrry11-Jan-18 14:12
Karl Henrry11-Jan-18 14:12 
QuestionBest Temporary storage for DataGrid in C# Pin
Member 1359640810-Jan-18 13:17
Member 1359640810-Jan-18 13:17 
AnswerRe: Best Temporary storage for DataGrid in C# Pin
OriginalGriff10-Jan-18 19:51
mveOriginalGriff10-Jan-18 19:51 

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.