Click here to Skip to main content
15,891,431 members
Home / Discussions / C#
   

C#

 
QuestionAccess a .cs file in an aspx file (ridiculously basic question) in Visual Studio Pin
alexgrab12-Nov-09 17:41
alexgrab12-Nov-09 17:41 
AnswerRe: Access a .cs file in an aspx file (ridiculously basic question) in Visual Studio Pin
Shameel12-Nov-09 22:21
professionalShameel12-Nov-09 22:21 
QuestionHow to write a article in Codeproject.com Pin
santhosh30912-Nov-09 17:11
santhosh30912-Nov-09 17:11 
AnswerRe: How to write a article in Codeproject.com Pin
N a v a n e e t h12-Nov-09 17:23
N a v a n e e t h12-Nov-09 17:23 
AnswerRe: How to write a article in Codeproject.com Pin
Shameel12-Nov-09 22:22
professionalShameel12-Nov-09 22:22 
QuestionHow to retrive emails,attachments from exchange server using C#.NET Pin
santhosh30912-Nov-09 17:10
santhosh30912-Nov-09 17:10 
AnswerRe: How to retrive emails,attachments from exchange server using C#.NET Pin
N a v a n e e t h12-Nov-09 17:21
N a v a n e e t h12-Nov-09 17:21 
QuestionNeed Help Updating a MS Access database. Pin
erburrell12-Nov-09 16:22
erburrell12-Nov-09 16:22 
I am brand new to both C# and Database coding.

I am using the following code as an update Command, and there seems to be an issue with it. At run time, I use the update command here to add a new record to the data base, and getthe error following the code.

Code:

//Declare a reusable update command with parameters.
dataAdapter.UpdateCommand = connection.CreateCommand();
dataAdapter.UpdateCommand.CommandText =
"update EventData " +
"set EventType = ?, UnitNo = ?, Start = ?, End = ?, Derate = ?, Trip = ?, Comments = ? " +
"where ID = ?";
dataAdapter.UpdateCommand.Parameters.Add("EventType", OleDbType.Char, 0, "EventType");
dataAdapter.UpdateCommand.Parameters.Add("UnitNo", OleDbType.Integer, 0, "UnitNo");
dataAdapter.UpdateCommand.Parameters.Add("Start", OleDbType.Date, 0, "Start");
dataAdapter.UpdateCommand.Parameters.Add("End", OleDbType.Date, 0, "End");
dataAdapter.UpdateCommand.Parameters.Add("Derate", OleDbType.Decimal, 0, "Derate");
dataAdapter.UpdateCommand.Parameters.Add("Trip", OleDbType.Boolean, 0, "Trip");
dataAdapter.UpdateCommand.Parameters.Add("Comments", OleDbType.Char, 0, "Comments");
dataAdapter.UpdateCommand.Parameters.Add("ID", OleDbType.Integer, 0, "ID");

Error:

Syntax Error in INSERT INTO statement

Thanks for the help!
AnswerRe: Need Help Updating a MS Access database. Pin
Eddy Vluggen12-Nov-09 22:21
professionalEddy Vluggen12-Nov-09 22:21 
AnswerRe: Need Help Updating a MS Access database. Pin
Shameel12-Nov-09 22:26
professionalShameel12-Nov-09 22:26 
QuestionDropping multiple tables? Pin
Emmet_Brown12-Nov-09 14:07
Emmet_Brown12-Nov-09 14:07 
AnswerRe: Dropping multiple tables? Pin
Luc Pattyn12-Nov-09 14:17
sitebuilderLuc Pattyn12-Nov-09 14:17 
GeneralRe: Dropping multiple tables? Pin
Emmet_Brown12-Nov-09 14:27
Emmet_Brown12-Nov-09 14:27 
GeneralRe: Dropping multiple tables? Pin
Luc Pattyn12-Nov-09 15:09
sitebuilderLuc Pattyn12-Nov-09 15:09 
GeneralRe: Dropping multiple tables? Pin
Vikram A Punathambekar12-Nov-09 20:48
Vikram A Punathambekar12-Nov-09 20:48 
AnswerRe: Dropping multiple tables? Pin
PIEBALDconsult12-Nov-09 15:15
mvePIEBALDconsult12-Nov-09 15:15 
AnswerRe: Dropping multiple tables? Pin
Shameel12-Nov-09 23:31
professionalShameel12-Nov-09 23:31 
QuestionConsole application screen divided in 2 parts Pin
manustone12-Nov-09 11:59
manustone12-Nov-09 11:59 
AnswerRe: Console application screen divided in 2 parts Pin
Christian Graus12-Nov-09 12:19
protectorChristian Graus12-Nov-09 12:19 
AnswerRe: Console application screen divided in 2 parts Pin
Shameel12-Nov-09 22:31
professionalShameel12-Nov-09 22:31 
QuestionRemoting Events fail if network not connected until after app starts Pin
John Whitmire12-Nov-09 11:11
professionalJohn Whitmire12-Nov-09 11:11 
Questionusercontrol Pin
farokhian12-Nov-09 9:48
farokhian12-Nov-09 9:48 
AnswerRe: usercontrol Pin
Christian Graus12-Nov-09 10:20
protectorChristian Graus12-Nov-09 10:20 
GeneralRe: usercontrol Pin
farokhian12-Nov-09 10:28
farokhian12-Nov-09 10:28 
GeneralRe: usercontrol Pin
Christian Graus12-Nov-09 10:42
protectorChristian Graus12-Nov-09 10:42 

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.