Board index » delphi » INSERT works in SQL Explorer, but not in CGI script

INSERT works in SQL Explorer, but not in CGI script

I'm doing a simple INSERT statement like

insert into buyer (fname, lname, title, company, addr1, addr2,city, state,
zip, zip4, phone1, phone2, fax, email, respondvia, rfqcomment) values
 "Lee", "Grey", "President/CEO", "Grey Matter", "", "", "", "", "", "", "",
"", "", "l...@optioninsight.com", "", "")

It works when I execute it through SQL Explorer.  But when I try to execute
the same exact statement in my CGI script (written in Delphi5, using
TADOQuery, hitting a SQL Server database), I get HTTP 500 internal server
error.  I know that the ADO connection is good, because I have a
TDataSetTableProducer that successfully displays the contents of the table.
It seems that reading is okay, but writing is not.

ADO and SQL Server are new territory for me.  Have I done something
newbie-ish?

Thanks,
Lee Grey
__________________________________________
FREE Windows 95/98/NT option trading software at
http://www.optioninsight.com.  Option Insight spots the opportunities in an
option chain.  Give it a try!

Also FREE:  MultiBrowse for Stocks, a multi-paned browser that retrieves
your favorite webpages all at once for each ticker symbol you enter.
http://members.tripod.com/OptionInsight/multibrowse.html

 

Re:INSERT works in SQL Explorer, but not in CGI script


Quote
Lee Grey <leeg...@mindspring.com> wrote in message

news:85aqor$17220@bornews.borland.com...

Quote
> I'm doing a simple INSERT statement like

> insert into buyer (fname, lname, title, company, addr1, addr2,city, state,
> zip, zip4, phone1, phone2, fax, email, respondvia, rfqcomment) values
>  "Lee", "Grey", "President/CEO", "Grey Matter", "", "", "", "", "", "",
"",
> "", "", "l...@optioninsight.com", "", "")

You are missing a bracket after the word Values.  Actually I find it hard to
believe you have made that error, but maybe.  The best place to test it
would be in a straight query processer - have you tried executing this
statement in ISQL/W?

Oliver

Other Threads