Click here to Skip to main content
15,893,588 members
Home / Discussions / C#
   

C#

 
AnswerRe: store procedure vs hard coding sql statements Pin
Pete O'Hanlon30-Oct-06 2:02
mvePete O'Hanlon30-Oct-06 2:02 
QuestionIs it possible to write app. for symbian by VS2005 and C# or VB.NET? Pin
Code4Null27-Oct-06 10:49
Code4Null27-Oct-06 10:49 
AnswerRe: Is it possible to write app. for symbian by VS2005 and C# or VB.NET? Pin
led mike27-Oct-06 11:01
led mike27-Oct-06 11:01 
GeneralRe: Is it possible to write app. for symbian by VS2005 and C# or VB.NET? Pin
Code4Null27-Oct-06 11:24
Code4Null27-Oct-06 11:24 
GeneralRe: Is it possible to write app. for symbian by VS2005 and C# or VB.NET? Pin
Rob Graham27-Oct-06 11:30
Rob Graham27-Oct-06 11:30 
GeneralRe: Is it possible to write app. for symbian by VS2005 and C# or VB.NET? Pin
led mike27-Oct-06 11:35
led mike27-Oct-06 11:35 
AnswerRe: Is it possible to write app. for symbian by VS2005 and C# or VB.NET? Pin
Nader Elshehabi27-Oct-06 20:27
Nader Elshehabi27-Oct-06 20:27 
QuestionSql Command with C# Pin
Areff27-Oct-06 9:56
Areff27-Oct-06 9:56 
Hi,
I want use this code to enter some data to data base
data base is an access data base
rec is an instancce of class include some string data member that you see in code

// open Connection<br />
<br />
private OleDbConnection Conn = new OleDbConnection(<br />
        @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=../../../db.mdb");<br />
private OleDbDataAdapter dataAdapter = new OleDbDataAdapter();<br />
Conn.Open();<br />
string cmdText = "INSERT INTO tbl1 (fname, lname, relative,tel, " +<br />
     "mobile, b_tel, fax, email, adrs, www, job, user)" +<br />
     "  VALUES ( '" + <br />
     rec.FirstName + "', '" +<br />
     rec.LastName + "', '" +<br />
     rec.Relative + "', '" +<br />
     rec.Tel + "', '" +<br />
     rec.Mobile + "', '" +<br />
     rec.B_tel + "', '" +<br />
     rec.Fax + "', '" +<br />
     rec.Email + "', '" +<br />
     rec.Adrs + "', '" +<br />
     rec.WWW + "', '" +<br />
     rec.JobTitle  + "', '" +<br />
     rec.user + "' )";<br />
                <br />
dataAdapter.InsertCommand = new OleDbCommand(cmdText, Conn);                <br />
dataAdapter.InsertCommand.ExecuteNonQuery();<br />
Conn.Close();


but in runTime this error occurs :
"Syntax error in INSERT INTO statment"

please help me.

---------------------
Areff Bahrami(KAVEH)
Areff.HB@Gmail.com
---------------------

AnswerRe: Sql Command with C# Pin
led mike27-Oct-06 10:08
led mike27-Oct-06 10:08 
AnswerRe: Sql Command with C# Pin
BoneSoft27-Oct-06 10:10
BoneSoft27-Oct-06 10:10 
AnswerRe: Sql Command with C# Pin
Rob Graham27-Oct-06 10:36
Rob Graham27-Oct-06 10:36 
GeneralRe: Sql Command with C# Pin
BoneSoft27-Oct-06 10:44
BoneSoft27-Oct-06 10:44 
QuestionRe: Sql Command with C# Pin
BoneSoft27-Oct-06 10:50
BoneSoft27-Oct-06 10:50 
AnswerRe: Sql Command with C# Pin
Rob Graham27-Oct-06 11:09
Rob Graham27-Oct-06 11:09 
QuestionHow can I avoid the fliker of a form? Pin
anuo0627-Oct-06 9:19
anuo0627-Oct-06 9:19 
AnswerRe: How can I avoid the fliker of a form? Pin
Luc Pattyn27-Oct-06 14:45
sitebuilderLuc Pattyn27-Oct-06 14:45 
GeneralRe: How can I avoid the fliker of a form? Pin
anuo0627-Oct-06 18:03
anuo0627-Oct-06 18:03 
AnswerRe: How can I avoid the fliker of a form? Pin
DiegoValdevino28-Oct-06 2:40
DiegoValdevino28-Oct-06 2:40 
GeneralRe: How can I avoid the fliker of a form? Pin
Luc Pattyn28-Oct-06 7:01
sitebuilderLuc Pattyn28-Oct-06 7:01 
Questionseeting the background color of a Windows Form Pin
Rocky#27-Oct-06 8:49
Rocky#27-Oct-06 8:49 
AnswerRe: seeting the background color of a Windows Form Pin
Larantz27-Oct-06 9:01
Larantz27-Oct-06 9:01 
GeneralRe: seeting the background color of a Windows Form Pin
Rocky#27-Oct-06 9:11
Rocky#27-Oct-06 9:11 
AnswerRe: seeting the background color of a Windows Form Pin
BoneSoft27-Oct-06 10:19
BoneSoft27-Oct-06 10:19 
QuestionC# 2.0 DataBinding using the BindingSource in user controls Pin
rajat_tandon200027-Oct-06 8:46
rajat_tandon200027-Oct-06 8:46 
QuestionSql Server connection [modified] Pin
Chris Morgan27-Oct-06 7:08
Chris Morgan27-Oct-06 7:08 

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.