Fwd: Please solve this error

Fwd: Please solve this error

Post by praveen sing » Fri, 23 Sep 2011 20:08:38



---------- Forwarded message ----------

Date: Thu, Sep 22, 2011 at 4:30 PM
Subject: Please solve this error

I have the code that is:-

protected void btn_Submit_Click(object sender, EventArgs e)

{

ocn.Open();

OleDbCommand ocmd =
new OleDbCommand("insert into tbl_regform
(Name,Email,Password,Mo_Isdcode,MobileNo,LL_Isdcode,LL_Stdcode,LandLineNo,ResumeUrl,ExpYear,ExpMonth,Location,FunctionalArea,DateOfSubmit)
fSubmit)",
ocn);

ocmd.Parameters.AddWithValue(

ocmd.Parameters.AddWithValue(

ocmd.Parameters.AddWithValue(

ocmd.Parameters.AddWithValue(

ocmd.Parameters.AddWithValue(

ocmd.Parameters.AddWithValue(

ocmd.Parameters.AddWithValue(

ocmd.Parameters.AddWithValue(

if (fu_Resume.PostedFile.FileName != "")

{

string extention, reg_id, userid, date, ResumeUrl;

int index1, count, count1;

index1 = txt_Email.Text.IndexOf(

userid = txt_Email.Text.Substring(
0, index1);

userid = userid.Replace(
".", "");

count = userid.Length;

date = DateTime.Now.ToShortDateString().Replace(
"/", "");

count1 = date.Length;

extention = Path.GetExtension(fu_Resume.PostedFile.FileName);

reg_id = userid.Substring(
0, 1) + date.Substring(0, 2) + userid.Substring(1, count - 1) +
date.Substring(2, count1 - 2);

ResumeUrl = reg_id + extention;

fu_Resume.SaveAs(Server.MapPath(
"~\\JobSeeker\\resume\\") + ResumeUrl);

ocmd.Parameters.AddWithValue(

}

else

{

ocmd.Parameters.AddWithValue(

}

ocmd.Parameters.AddWithValue(

ocmd.Parameters.AddWithValue(

if (txt_otherCity.Visible == true)

{

ocmd.Parameters.AddWithValue(

}

else

{

ocmd.Parameters.AddWithValue(

}

ocmd.Parameters.AddWithValue(

ocmd.Parameters.AddWithValue(

ocmd.ExecuteNonQuery();

MessageBox.Show(
"Record Submit");

ocn.Close();

}

and the Error is

*System.Data.OleDb.OleDbException: Syntax error in INSERT INTO statement. at
System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(OleDbHResult
hr) at
System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS
dbParams, Object& executeResult) at
System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult) at
System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior,
Object& executeResult) at
System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior
behavior, String method) at System.Data.OleDb.OleDbCommand.ExecuteNonQuery()
at text.btn_Submit_Click(Object sender, EventArgs e) in
e:\wolkegist\jobsonrequest\jobsonrequest\text.cs:line 142 at
System.Web.UI.WebControls.Button.OnClick(EventArgs e) at
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) at
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
eventArgument) at
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl,
String eventArgument) at
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) at
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint,
Boolean includeStagesAfterAsyncPoint)*

please help to correct the error

 
 
 

Fwd: Please solve this error

Post by Gunawan Hadikusum » Sat, 24 Sep 2011 15:02:40


GOD ALMIGHTY please forgive this forsaken programmers. LOL. GOD ? You there
? Please fixs this codes.


> ---------- Forwarded message ----------

> Date: Thu, Sep 22, 2011 at 4:30 PM
> Subject: Please solve this error

> I have the code that is:-

> protected void btn_Submit_Click(object sender, EventArgs e)

> {

> ocn.Open();

> OleDbCommand ocmd =
> new OleDbCommand("insert into tbl_regform
> (Name,Email,Password,Mo_Isdcode,MobileNo,LL_Isdcode,LL_Stdcode,LandLineNo,ResumeUrl,ExpYear,ExpMonth,Location,FunctionalArea,DateOfSubmit)
fSubmit)",
> ocn);

> ocmd.Parameters.AddWithValue(

> ocmd.Parameters.AddWithValue(

> ocmd.Parameters.AddWithValue(

> ocmd.Parameters.AddWithValue(

> ocmd.Parameters.AddWithValue(

> ocmd.Parameters.AddWithValue(

> ocmd.Parameters.AddWithValue(

> ocmd.Parameters.AddWithValue(

> if (fu_Resume.PostedFile.FileName != "")

> {

> string extention, reg_id, userid, date, ResumeUrl;

> int index1, count, count1;

> index1 = txt_Email.Text.IndexOf(

> userid = txt_Email.Text.Substring(
> 0, index1);

> userid = userid.Replace(
> ".", "");

> count = userid.Length;

> date = DateTime.Now.ToShortDateString().Replace(
> "/", "");

> count1 = date.Length;

> extention = Path.GetExtension(fu_Resume.PostedFile.FileName);

> reg_id = userid.Substring(
> 0, 1) + date.Substring(0, 2) + userid.Substring(1, count - 1) +
> date.Substring(2, count1 - 2);

> ResumeUrl = reg_id + extention;

> fu_Resume.SaveAs(Server.MapPath(
> "~\\JobSeeker\\resume\\") + ResumeUrl);

> ocmd.Parameters.AddWithValue(

> }

> else

> {

> ocmd.Parameters.AddWithValue(

> }

> ocmd.Parameters.AddWithValue(

> ocmd.Parameters.AddWithValue(

> if (txt_otherCity.Visible == true)

> {

> ocmd.Parameters.AddWithValue(

> }

> else

> {

> ocmd.Parameters.AddWithValue(

> }

> ocmd.Parameters.AddWithValue(

> ocmd.Parameters.AddWithValue(

> ocmd.ExecuteNonQuery();

> MessageBox.Show(
> "Record Submit");

> ocn.Close();

> }

> and the Error is

> *System.Data.OleDb.OleDbException: Syntax error in INSERT INTO statement.
> at
> System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(OleDbHResult
> hr) at
> System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS
> dbParams, Object& executeResult) at
> System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult) at
> System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior,
> Object& executeResult) at
> System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior
> behavior, String method) at System.Data.OleDb.OleDbCommand.ExecuteNonQuery()
> at text.btn_Submit_Click(Object sender, EventArgs e) in
> e:\wolkegist\jobsonrequest\jobsonrequest\text.cs:line 142 at
> System.Web.UI.WebControls.Button.OnClick(EventArgs e) at
> System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) at
> System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
> eventArgument) at
> System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl,
> String eventArgument) at
> System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) at
> System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint,
> Boolean includeStagesAfterAsyncPoint)*

> please help to correct the error

>  --
> You received this message because you are subscribed to the Google
> Groups "DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML
> Web Services,.NET Remoting" group.

> To unsubscribe from this group, send email to

> For more options, visit this group at
> http://groups.google.com/group/dotnetdevelopment?hl=en?hl=en
> or visit the group website at http://megasolutions.net

--
<http://www.satuindonesia.com.au>

 
 
 

Fwd: Please solve this error

Post by Sanjay Delvadiy » Sat, 24 Sep 2011 15:23:42


plz give the sample data which is u r enteriing in the texbox.

 
 
 

Fwd: Please solve this error

Post by Santhosh Kuma » Sat, 24 Sep 2011 22:44:07


Hey Praveen,
   You should have post the line whr yo r getting the error.. nd some thing
really important in connection is connection string check it. what you gave
it.. and ping it.. thro' console if its working properly then go with this
code..

With Regards,
Never Say No,
Santhosh V.Kumar
+919840411410
http://santhoshvkumar.110mb.com/
"I am because we are"


Quote:> *yntax error in INSERT INTO statement. at
> System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(OleDbHResult
> hr) at System.Data.OleDb.OleDb*

 
 
 

Fwd: Please solve this error

Post by Shefali Sharm » Mon, 26 Sep 2011 02:44:05


i think as per ur code insert statement should be in the same line or
separated by '+' to append the query.

On Fri, Sep 23, 2011 at 7:14 PM, Santhosh Kumar

> Hey Praveen,
>    You should have post the line whr yo r getting the error.. nd some thing
> really important in connection is connection string check it. what you gave
> it.. and ping it.. thro' console if its working properly then go with this
> code..

>  With Regards,
> Never Say No,
> Santhosh V.Kumar
> +919840411410
> http://santhoshvkumar.110mb.com/
> "I am because we are"


>> *yntax error in INSERT INTO statement. at
>> System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(OleDbHResult
>> hr) at System.Data.OleDb.OleDb*

>   --
> You received this message because you are subscribed to the Google
> Groups "DotNetDevelopment, VB.NET <http://vb.net/>, C# .NET, ADO.NET<http://ado.net/>,
> ASP.NET <http://asp.net/>, XML, XML
> Web Services,.NET Remoting" group.

> To unsubscribe from this group, send email to

> For more options, visit this group at
> http://groups.google.com/group/dotnetdevelopment?hl=en?hl=en
> or visit the group website at http://megasolutions.net

 
 
 

Fwd: Please solve this error

Post by Repairman200 » Sun, 02 Oct 2011 06:34:44




 
 
 

1. HOTLIST-moreDICE Fwd: Recruiting-Simplifies Fwd: Best IT Contacting Jobs Fwd: C2C-DealUSA Fwd: {Hot-Resumes:68765} Fwd: ~~ Technical Recruiters Network ~~

Please find attached resume of my consultant who they are available in the
market to join new projects .


*Name*

*Skill Set*

*Total IT Experience*

*Current Location*

*Relocation*

*Availability*

Rajeswari Gandhimohan

Senior Java Developer

8 +Years

Edison ,NJ

New York/New Jersey

2 Weeks

Thenmozhi Subramanian

Certified SAP SD

7+ Years

Sunnyvale , CA

California

2 Weeks

Anurdha Mallipeddi

Senior Quality Analyst

6+ Years

Edison ,NJ

New Jersey

2 Weeks

My consultants are looking C2C position .

Before submitting to the Client please let me know about Client details .

Thanks & Regards,

Nitin Gupta
*CompWorldwide*

MBE - certified company

Address : 6,kilmer road, Suite P , Edison - NJ , 08817


www.compworldwide.com

  THENMOZHI SUBRAMANIAN Resume.doc
87K Download

  Anu Latest.docx
46K Download

  Rajeswari Gandhimohan.docx
63K Download

2. Terminal Service

3. Please Solve This Error For Me

4. Help with printing

5. can anyone please educate me how to solve this error?

6. Other groups

7. Fwd: please b serious

8. Not really an Amiga, but...

9. Please Solve My Problem

10. Mapped devel drive problem - Re-solve this please!?

11. please solve my problem

12. please solve this issue

13. Please solve this problem for me