AddNew problem

R

Rachel

Hello,
I am receiving the following error ->
Object doesn't support this property or method: 'Open'
from the following code. I have tried setting various
parameters and have gotten nowhere. The database is a
SQL Server 7 db. What am I doing wrong?? Code follows:


<%


Set oDC = Server.CreateObject( "ADODB.Connection" )
oDC.Open Application("Ads_ConnectionString")

oRS = Server.CreateObject( "ADODB.Recordset" )

oRS.open "CustomerInfo", oDC

oRS.AddNew

oRS ("CustomerID") = Request.QueryString("Email")
oRS ("FirstName") = Request.QueryString("FirstName")
oRS ("LastName") = Request.QueryString("LastName")
oRS ("Address1") = Request.QueryString("Address")
oRS ("State") = Request.QueryString("State")
oRS ("City") = Request.QueryString("City")
oRS ("Phone1") = Request.QueryString("Phone")
oRS ("Zip") = Request.QueryString("Zip")

oRS .update

oRS .Close
Set oRS = Nothing
oDC .Close
Set oDC = Nothing

%>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top