Results 1 to 5 of 5

Thread: adOpenForwardOnly

  1. #1
    BillyWanjo Guest

    Default adOpenForwardOnly

    Hi,<BR><BR>Could someone please read through this? I&#039m getting an error writing to a db; in the following code: <BR><BR>&#060;% <BR>Option Explicit <BR>Dim strConnect <BR>%&#062; <BR><BR>&#060;!-- #include file="datasource.asp" --&#062; <BR><BR><BR>&#060;!-- Open database and write new records to it --&#062; <BR><BR>&#060;% <BR>Dim rsCard <BR>Set rsCard = Server.CreateObject("ADODB.Recordset") <BR>rsCard.Open "Cards", strConnect, adOpenForwardOnly, adLockOptimistic, adCmdTable <BR><BR>rsCard("borderpic") = Request.Form("borderpic") <BR>rsCard("bodypic") = Request.Form("bodypic") <BR>rsCard("titletext") = Request.Form("titletext") <BR>rsCard("titlefont") = Request.Form("titlefont") <BR>rsCard("tune") = Request.Form("tune") <BR>rsCard("email") = Request.Form("email") <BR>rsCard.Update <BR><BR>rsCard.Close <BR>set rsCard = Nothing <BR>%&#062; <BR><BR><BR>... it says "adOpenForwardOnly" isn&#039t a variable. I&#039m assuming this is because I&#039ve got Option Explicit up there, but why is it getting flustered about a function parameter? I&#039ve tried changing it - adOpenStatic - and it does the same thing. Where am I missing the point? <BR><BR>Just in case, the contents of datasource.asp are: <BR><BR>&#060;% <BR>strConnect = "Provider=Microsoft.Jet.OLEDB.4.0;" &_ <BR>"Data Source=pages.mdb;" &_ <BR>"Persist Security Info=False" <BR>%&#062; <BR><BR><BR>Many thanks, <BR><BR>BW

  2. #2
    Join Date
    Dec 1969

    Default RE: adOpenForwardOnly

    Are you including that silly file ???<BR>Cos i think you need that to use text versions of the cursor lock type etc.<BR><BR>HTH

  3. #3
    Eddie Campbell Guest

    Default RE: adOpenForwardOnly

    adOpenForwardOnly is defined in the whcih you will need to include into your page OR simply replace it with 0 (zero) as this is what adOpenForwardOnly is set to in the file.

  4. #4
    BillyWanjp Guest

    Default Thanks! Fast, too! But...

    That&#039s sorted it. Thanks a lot guys.

  5. #5
    Eddie Campbell Guest

    Default Whats the but... ?<eop>


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts