dbTalk Databases Forums  

Parse Error in SQL

comp.databases.filemaker comp.databases.filemaker


Discuss Parse Error in SQL in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
max
 
Posts: n/a

Default Parse Error in SQL - 01-02-2007 , 03:46 PM






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(<DSN>, <USER NAME>, <PASSWORD>, -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):
[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:\Inetpub\maxroot\suppor t_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


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.