Click here to Skip to main content
15,910,661 members
Home / Discussions / C#
   

C#

 
GeneralRe: merge using C# Pin
musefan18-Mar-09 7:28
musefan18-Mar-09 7:28 
GeneralRe: merge using C# [modified] Pin
StoneCOLD70918-Mar-09 8:04
StoneCOLD70918-Mar-09 8:04 
Questionerror while inserting table with autonumber using MsAccess Pin
sakthi06karthi18-Mar-09 3:51
sakthi06karthi18-Mar-09 3:51 
AnswerRe: error while inserting table with autonumber using MsAccess Pin
Jerry.Wang18-Mar-09 3:58
Jerry.Wang18-Mar-09 3:58 
GeneralRe: error while inserting table with autonumber using MsAccess Pin
sakthi06karthi18-Mar-09 4:06
sakthi06karthi18-Mar-09 4:06 
GeneralRe: error while inserting table with autonumber using MsAccess Pin
sakthi06karthi18-Mar-09 4:09
sakthi06karthi18-Mar-09 4:09 
GeneralRe: error while inserting table with autonumber using MsAccess Pin
Xmen Real 18-Mar-09 4:12
professional Xmen Real 18-Mar-09 4:12 
AnswerRe: error while inserting table with autonumber using MsAccess Pin
musefan18-Mar-09 4:19
musefan18-Mar-09 4:19 
try using square brackets around your column names. i.e. [Column1], [Column2] etc.

Also, do not include your AutoNumber column when inserting, this will be assigned automatically - you cannot write to it manually

third thing - make sure you use command parameters with your code...


cmd = new OleDbCommand("INSERT INTO Table1 ([column1], [column2]) VALUES (@1, @2)", cn);
cmd.Parameters.Add("@1", OleDbType.Char).Value = textBox1.Text;
cmd.Parameters.Add("@2", OleDbType.Char).Value = textBox2.Text;


NOTE how the column names have been specified to avoid trying to insert into the AutoNumber column

Life goes very fast. Tomorrow, today is already yesterday.

QuestionCopying embedded powerpoint object from richtextbox into powerpoint Pin
mailtogj18-Mar-09 3:33
mailtogj18-Mar-09 3:33 
QuestionExecute a C# App without installing .Net Framework ! Pin
Mohammad Dayyan18-Mar-09 3:08
Mohammad Dayyan18-Mar-09 3:08 
AnswerRe: Execute a C# App without installing .Net Framework ! Pin
musefan18-Mar-09 3:12
musefan18-Mar-09 3:12 
GeneralRe: Execute a C# App without installing .Net Framework ! Pin
Mohammad Dayyan18-Mar-09 3:26
Mohammad Dayyan18-Mar-09 3:26 
GeneralRe: Execute a C# App without installing .Net Framework ! Pin
musefan18-Mar-09 3:40
musefan18-Mar-09 3:40 
GeneralRe: Execute a C# App without installing .Net Framework ! Pin
Mohammad Dayyan18-Mar-09 3:43
Mohammad Dayyan18-Mar-09 3:43 
GeneralRe: Execute a C# App without installing .Net Framework ! Pin
Xmen Real 18-Mar-09 3:49
professional Xmen Real 18-Mar-09 3:49 
AnswerRe: Execute a C# App without installing .Net Framework ! Pin
Jerry.Wang18-Mar-09 3:13
Jerry.Wang18-Mar-09 3:13 
GeneralRe: Execute a C# App without installing .Net Framework ! Pin
Mohammad Dayyan18-Mar-09 3:16
Mohammad Dayyan18-Mar-09 3:16 
GeneralRe: Execute a C# App without installing .Net Framework ! Pin
Dan Neely18-Mar-09 4:35
Dan Neely18-Mar-09 4:35 
AnswerRe: Execute a C# App without installing .Net Framework ! Pin
#realJSOP18-Mar-09 3:30
professional#realJSOP18-Mar-09 3:30 
GeneralRe: Execute a C# App without installing .Net Framework ! Pin
Mohammad Dayyan18-Mar-09 3:39
Mohammad Dayyan18-Mar-09 3:39 
AnswerRe: Execute a C# App without installing .Net Framework ! Pin
Rob Philpott18-Mar-09 3:30
Rob Philpott18-Mar-09 3:30 
GeneralRe: Execute a C# App without installing .Net Framework ! Pin
Mohammad Dayyan18-Mar-09 3:40
Mohammad Dayyan18-Mar-09 3:40 
AnswerRe: Execute a C# App without installing .Net Framework ! Pin
12Code18-Mar-09 3:44
12Code18-Mar-09 3:44 
GeneralRe: Execute a C# App without installing .Net Framework ! Pin
Xmen Real 18-Mar-09 3:53
professional Xmen Real 18-Mar-09 3:53 
GeneralRe: Execute a C# App without installing .Net Framework ! Pin
Mohammad Dayyan18-Mar-09 3:54
Mohammad Dayyan18-Mar-09 3:54 

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.