Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Parse Error in SQL, please help

Featured Replies

Hi all,

I have the following in my ASP.NET page.

object rs = new object();

ADODB.Connection conn = new ADODB.Connection();

//ADODB.Connection conn = Server.CreateObject(ADODB.Connection);

try

{

conn.Mode = ADODB.ConnectModeEnum.adModeReadWrite;

conn.Open(, , , -1);

string query = "INSERT INTO Employee Support-010123(Location) VALUES('" + txtLocName.Text + "');";

conn.Execute(query, out rs, 0);

}

catch (System.Exception ex)

{

txtOrgName.Text = ex.ToString();

}

finally

{

conn.Close();

}

Here, txtLocName.Text is a text box.

Initially, I was getting errors that the required provider could not be found but I believe I fixed that since it is not giving that error anymore. It has now started giving the following error:

System.Runtime.InteropServices.COMException (0x80004005):D [DataDirect][ODBC SequeLink driver][ODBC Socket][DataDirect][ODBC FileMaker driver][FileMaker]Parse Error in SQL at ADODB.ConnectionClass.Execute(String CommandText, Object& RecordsAffected, Int32 Options) at ASP.Support_form_aspx.Page_Load(Object sender, EventArgs e) in C:Inetpubmaxrootsupport_form.aspx:line 80

Please help, I have spent so many hours on this but am still not able to figure out where I am going wrong.

Thank you all in advance,

MAX

  • Author

Thank you all for trying. I got it. I just had to insert double quotes for the table name and for all the field names. I did that by using char c = (char)34; in C# as I am prgramming in c#. This small thing ate my day. :D

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.