Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

delete statement help

Status
Not open for further replies.

orangeblue

Programmer
Nov 26, 2002
107
GB
can someone tell me why i am getting this error

Microsoft VBScript runtime error '800a01a8'
Object required: ''
/admin2/include/portfoliolist_delete.asp, line 36

here is the delete code
set deletePortfolio=server.createobject("adodb.recordset")
sql="DELETE FROM dbstock_portfolio where portfolio_id='"&request.Form("portfolio_id")&"' "
set deletePortfolio=objConnection.Execute (sql, , adCmdText)

thanks
 
you dont need this line set deletePortfolio=server.createobject("adodb.recordset") as no recordset is necessary to delete a record.

Also - have you set up the connection objConnection??

Tony
________________________________________________________________________________
 
thanks

this is what I have now

set objConnection=server.CreateObject("ADODB.Connection")
sql="DELETE FROM dbstock_portfolio where portfolio_id='"&request.Form("portfolio_id")&"' "
objConnection.Execute (sql, adCmdText)

but getting this error now
Microsoft VBScript compilation error '800a0414'

Cannot use parentheses when calling a Sub

/admin2/include/portfoliolist_delete.asp, line 37

objConnection.Execute (sql, adCmdText)
--------------------------------------^


 
doh!

thanks its working now
again thanks for your help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top