objRS.Open strSQL, objConn, adOpenStatic, adLockOptimistic, adCmdText
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Jovanky Delossantos" <ccroute925@h...>
Subject: [access_asp] RE: Help! -- I get error '800a0cb3'
: But when I open the recordset instead, how can I use the SELECT command
: without execute a command?.
:
:
:
: >From: "Larry Woods" <larry@l...>
: >Reply-To: "Access ASP" <access_asp@p...>
: >To: "Access ASP" <access_asp@p...>
: >Subject: [access_asp] RE: Help! -- I get error '800a0cb3'
: >Date: Thu, 31 Oct 2002 12:17:41 -0700
: >
: >No, I don't think that you read the COMPLETE note that I sent.
: >
: >An ADO Command returns a READ-ONLY recordset. Changing the
: >properties of the recordset does NOT change this fact. Instead
: >of executing a command, you need to open a recordset. THEN, you
: >can make adds/updates.
: >
: >Larry Woods
: >
: >
: > > -----Original Message-----
: > > From: Jovy Giaza [mailto:CCROUTE925@h...]
: > > Sent: Thursday, October 31, 2002 5:09 PM
: > > To: Access ASP
: > > Subject: [access_asp] RE: Help! -- I get error '800a0cb3'
: > >
: > >
: > > Larry, maybe you can help me with this too, I'm having
: > > the same problem
: > > and I tried your solution but it did not work, please
: > > take a look at my
: > > code and see if you can provide some advice. Your
: > > suggestions will be
: > > greatly appreciated.
: > >
: > > Thanks
: > > ------------------------------------
: > > Dim FieldInput
: > > FieldInput = Request.Form("FirmName")
: > > Dim objCommand, objRS, objConn,
: > > StrConnect
: > > Set objCommand
: > > Server.CreateObject("ADODB.Command")
: > > Set objConn
: > > Server.CreateObject("ADODB.Connection")
: > > Set objRS
: > > Server.CreateObject("ADODB.Recordset")
: > > objRS.CursorType = 3
: > > objRS.LockType = 3
: > > StrConnect
: > > "Provider=Microsoft.Jet.OLEDB.4.0;
: > > Data Source=D:\TS\Pages\Documents\LHPPLUS.mdb"
: > > objCommand.ActiveConnection = strConnect
: > >
: > > objCommand.CommandText="Select
: > > * FROM LHPLIST WHERE
: > > firmname LIKE '" & FieldInput & "'"
: > > objCommand.CommandType = adCmdText
: > >
: > > Set objRS = objCommand.Execute
: > >
: > >
: > > Response.Write
: > > objRS("Firmname")
: > > objRS("Firmname") = Request.Form
: > > ("Firmname")
: > > objRS
: > > ("City").Value = Request.Form("City")
: > > objRS
: > > ("State").Value = Request.Form("State")
: > >
: > > objRS("Registered
: > > Domain Name").Value = Request.Form("RegDomain")
: > > objRS
: > > ("FirstName").Value = Request.Form("Firstname")
: > >
: > > objRS("Last
: > > Name").Value = Request.Form("Lastname")
: > > objRS
: > > ("Emailaddress") = Request.Form("Email")
: > >
: > > objRS("Password")
: > > = Request.Form("Password")
: > >
: > > objRS.Update
: > >
: > >
: > > Set objCommand
: > > Nothing
: > > Set
: > > objRS.Command
: > > Nothing
: > >
: > > objRS.Close
: > > Set objRS = Nothing
: > > ------------------------------------------------------
: > >
: > >
: > > >
: > >
: > > Here is part of a note that I sent to someone who was
: > > probably in
: > > the same boat as you...
: > >
: > >
: > > The default recordset type is "read-only, forward-only". Add
: > > these statements:
: > >
: > > rs.CursorType=3 'Static cursor
: > > rs.LockType=3 ' Optimistic lock
: > >
: > > That should do it. The first property defines a
: > > recordset as one
: > > that will allow updates (there are others, but for
: > > your purposes
: > > this should be sufficient) and the second allows writing to the
: > > recordset (among other things).
: > >
: > > Larry Woods - MCSD, MCT
: > >
: > >
: > >
: > > > -----Original Message-----
: > > > From: Omar Esquivel [mailto:omare@u...]
: > > > Sent: Friday, July 19, 2002 10:01 PM
: > > > To: Access ASP
: > > > Subject: [access_asp] Help! -- I get error '800a0cb3'
: > > >
: > > >
: > > >
: > > > Hi,
: > > >
: > > > I'm a newbie on ASP with databases, and I'm trying to
: > > > write a record to a
: > > > database with fields on a web form to fields on that
: > > database.
: > > >
: > > > After I hit the submit button, I get this error:
: > > >
: > > > ADODB.Recordset error '800a0cb3'
: > > > Object or provider is not capable of performing
: > > > requested operation.
: > > >
: > > >
: > > > I should note that the Access Database is still empty,
: > > > with no records on
: > > > it, I'm trying this on a Windows NT 4 Workstation PC
: > > > with IIS 4 installed
: > > > on it, and this is the sample of the code I'm using to
: > > > try to write the
: > > > record to the database.
: > > > Am I missing something?, what am I doing wrong? ...
: > > > please I need help
: > > > deperately. My job depends on it.
: > > > THANx, here's the code:
: > > >
: > > > where "REQUEST" is the name of the Table and SUPPORT my DSN
: > > > --------------------------
: > > > Dim RS
: > > > Set RS=Server.CreateObject("ADODB.Recordset")
: > > > RS.Open "request", "DSN=support"
: > > >
: > > > 'Get fields from Web Form ---------------
: > > >
: > > > RS.AddNew
: > > > RS.Fields("nAnt") = Request.Form("frmAnt")
: > > > RS.Fields("UsrName") = Request.Form("frmName")
: > > > RS.Fileds("UsrDept") = Request.Form("frmDept")
: > > > RS.Fields("Problem") = Request.Form("frmProblem")
: > > > RS.Update
: > > >
: > > >
: > > >
: >
: >
: >
:
:
: _________________________________________________________________
: Surf the Web without missing calls! Get MSN Broadband.
: http://resourcecenter.msn.com/access/plans/freeactivation.asp
:
:
: