Board index » delphi » Insert that works in SQL Explorer does not work in CGI script

Insert that works in SQL Explorer does not work 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 that works in SQL Explorer does not work in CGI script


Just a shot in the dark, but do your really intend to store zero-length
strings rather than NULL values in empty columns?

V/R
Russell L. Smith

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

news:85apfl$17613@bornews.borland.com...
Quote
> 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", "", "")

Re:Insert that works in SQL Explorer does not work in CGI script


As I said, there is nothing wrong with the SQL statement -- it works in SQL
Explorer!  But the same statement fails in TADOQuery.ExecSQL!  WHY???

Russell L. Smith <Russell_L._Sm...@amsinc.com> wrote in message
news:85bi4v$1no4@bornews.borland.com...

Quote
> Just a shot in the dark, but do your really intend to store zero-length
> strings rather than NULL values in empty columns?

> V/R
> Russell L. Smith

> "Lee Grey" <leeg...@mindspring.com> wrote in message
> news:85apfl$17613@bornews.borland.com...
> > 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", "", "")

Other Threads