Re: Either BOF or EOF is True Help

Hi Gale,
Sorry, I didn't mean to lead you on a wild goose chase! :o)
I wasn't quite clear on the exact problem, and I'm a total
novice at all
this stuff anyway!
I've not seen two recordsets combined like that before. I
assume that's
possible because there is no WHERE clause in either?
Anyway, as long as you have it sorted! :o))
Nath.
"Gale Coleman" <[email protected]> wrote in
message
news:[email protected]...
> Hi Nath,
>
> On the previous page I make two recordsets like so:
>
> <%
> 'Recordsets used to insert into database
> set rsClients = Server.CreateObject("ADODB.Recordset")
> rsClients.ActiveConnection = MM_connNewdatabase_STRING
> rsClients.Source = "SELECT * FROM CLIENTSW ORDER BY
CASENUM DESC"
> rsClients.CursorType = 0
> rsClients.CursorLocation = 2
> rsClients.LockType = 3
> rsClients.Open()
> rsClients_numRows = 0
>
> set rsEligibility =
Server.CreateObject("ADODB.Recordset")
> rsEligibility.ActiveConnection =
MM_connNewdatabase_STRING
> rsEligibility.Source = "SELECT * FROM ELIGIBILITY"
> rsEligibility.CursorType = 0
> rsEligibility.CursorLocation = 2
> rsEligibility.LockType = 3
> rsEligibility.Open()
> rsEligibility_numRows = 0
>
> %>
>
> Then I have it grab stuff from the form and insert into
database like so
> with a requery of the database which always pulls the
correct id number
> from
> the casenum field (so far anyway) and makes it equal
Session ("UserID")
> like
> so: Session("UserID")=rsClients("CASENUM"):
>
> <%If SubmitFail <> True Then %>
> <%
> 'Insert record into recordset when form is submitted
> If Request("MM_insert")<> "" Then
> rsClients.AddNew
> rsClients("CFname")=Request.form("FirstName")
> rsClients("CLname")=Request.form("LastName")
> rsClients("SFname")=Request.form("spousefirst")
> rsClients("SLname")=Request.form("spouselast")
> rsClients("CAddress")=Request.form("Address")
> rsClients("CCity")=Request.form("City")
> rsClients("CState")=Request.form("State")
> rsClients("CZip")=Request.form("ZipCode")
> rsClients("CAcode")=DoNull(Request.form("AreaCode"))
> rsClients("CPhone")=Request.form("PhoneNumber")
> rsClients("Citizen")=Request.form("Citizen")
> rsClients("CStatus")=Request.form("CitizenType")
> rsClients("Maritals")=Request.form("MaritalStatus")
> rsClients("LiveAr")=Request.form("LiveWhere")
> rsClients("Bdate")=Request.form("Birthdate")
> rsClients("Sex")=Request.form("sex")
> rsClients("Children")=Request.form("Children")
> rsClients("Adults")=Request.form("Adults")
> rsClients("Know")=Request.form("know")
> rsClients("SSN")=Request.form("ssn")
> rsClients("Summary")=Request.form("Description")
> rsClients("Race")=Request.form("Race")
> rsClients("Casetype")=("H")
> rsClients("Snum")=("2")
> rsClients("Pcode")=("99")
> rsClients("Dopen")= Date()
> rsClients("OfficeNum")=("1")
> rsClients("Language")=("E")
> rsClients("TIntake") = ("W")
>
> rsEligibility.AddNew
> rsEligibility("FNadv")=Request.form("AdverseFirst")
> rsEligibility("LNadv")=Request.form("AdverseLast")
> rsEligibility("CFname")=Request.form("FirstName")
> rsEligibility("CLname")=Request.form("LastName")
> rsEligibility("Children")=Request.form("Children")
> rsEligibility("Adults")=Request.form("Adults")
> rsEligibility("Snum")=("2")
> rsEligibility("Pcode")=("99")
> rsEligibility("Dopen")= Date()
> rsEligibility("OfficeNum") = ("1")
>
rsEligibility("Income1A")=CLng(Request.Form("monthly1")*12)
>
rsEligibility("Income2A")=CLng(Request.form("monthly2")*12)
>
rsEligibility("Income3A")=CLng(Request.form("monthly3")*12)
>
rsEligibility("Income4A")=CLng(Request.form("monthly4")*12)
>
rsEligibility("Income5A")=CLng(Request.form("monthly5")*12)
> rsEligibility("IncomeT")=
>
rsEligibility("Income1A")+rsEligibility("Income2A")+rsEligibility("Income3A"
> )+rsEligibility("Income4A")+rsEligibility("Income5A")
> rsEligibility("Income1N")=Request.form("incomesource1")
> rsEligibility("Income2N")=Request.form("incomesource2")
> rsEligibility("Income3N")=Request.form("incomesource3")
> rsEligibility("Income4N")=Request.form("incomesource4")
> rsEligibility("Income5N")=Request.form("incomesource5")
> rsEligibility("Asset1A")=
CLng(Request.form("assetamount1"))
>
rsEligibility("Asset2A")=CLng(Request.form("assetamount2"))
>
rsEligibility("Asset3A")=CLng(Request.form("assetamount3"))
>
rsEligibility("Asset4A")=CLng(Request.form("assetamount4"))
>
rsEligibility("Asset5A")=CLng(Request.form("assetamount5"))
>
rsEligibility("AssetT")=rsEligibility("Asset1A")+rsEligibility("Asset2A")+rs
>
Eligibility("Asset3A")+rsEligibility("Asset4A")+rsEligibility("Asset5A")
> rsEligibility("Asset1N")=Request.form("assetsource1")
> rsEligibility("Asset2N")=Request.form("assetsource2")
> rsEligibility("Asset3N")=Request.form("assetsource3")
> rsEligibility("Asset4N")=Request.form("assetsource4")
> rsEligibility("Asset5N")=Request.form("assetsource5")
> rsEligibility.Update
> rsClients.Update
> rsClients.Requery
> Session("UserID")=rsClients("CASENUM")
> Session("email")=Request.Form("EMailAddress")
> response.redirect "done1.asp"
>
> It then carries the session ID to the next page and
pulls the correct
> record
> out.
>
> I had it written like you suggested, but it was given me
an error so I
> coded
> it like it is in my previous post and it works. I just
hope it continues
> to
> work. I think it is using the svuserid for both
recordsets, correct?
>
> <%
> Dim svuserid
> svuserid = "0"
> if (Session("UserID") <> "") then svuserid =
Session("UserID")
> %>
>
>

Hi Gale,
Sorry, I didn't mean to lead you on a wild goose chase! :o)
I wasn't quite clear on the exact problem, and I'm a total
novice at all
this stuff anyway!
I've not seen two recordsets combined like that before. I
assume that's
possible because there is no WHERE clause in either?
Anyway, as long as you have it sorted! :o))
Nath.
"Gale Coleman" <[email protected]> wrote in
message
news:[email protected]...
> Hi Nath,
>
> On the previous page I make two recordsets like so:
>
> <%
> 'Recordsets used to insert into database
> set rsClients = Server.CreateObject("ADODB.Recordset")
> rsClients.ActiveConnection = MM_connNewdatabase_STRING
> rsClients.Source = "SELECT * FROM CLIENTSW ORDER BY
CASENUM DESC"
> rsClients.CursorType = 0
> rsClients.CursorLocation = 2
> rsClients.LockType = 3
> rsClients.Open()
> rsClients_numRows = 0
>
> set rsEligibility =
Server.CreateObject("ADODB.Recordset")
> rsEligibility.ActiveConnection =
MM_connNewdatabase_STRING
> rsEligibility.Source = "SELECT * FROM ELIGIBILITY"
> rsEligibility.CursorType = 0
> rsEligibility.CursorLocation = 2
> rsEligibility.LockType = 3
> rsEligibility.Open()
> rsEligibility_numRows = 0
>
> %>
>
> Then I have it grab stuff from the form and insert into
database like so
> with a requery of the database which always pulls the
correct id number
> from
> the casenum field (so far anyway) and makes it equal
Session ("UserID")
> like
> so: Session("UserID")=rsClients("CASENUM"):
>
> <%If SubmitFail <> True Then %>
> <%
> 'Insert record into recordset when form is submitted
> If Request("MM_insert")<> "" Then
> rsClients.AddNew
> rsClients("CFname")=Request.form("FirstName")
> rsClients("CLname")=Request.form("LastName")
> rsClients("SFname")=Request.form("spousefirst")
> rsClients("SLname")=Request.form("spouselast")
> rsClients("CAddress")=Request.form("Address")
> rsClients("CCity")=Request.form("City")
> rsClients("CState")=Request.form("State")
> rsClients("CZip")=Request.form("ZipCode")
> rsClients("CAcode")=DoNull(Request.form("AreaCode"))
> rsClients("CPhone")=Request.form("PhoneNumber")
> rsClients("Citizen")=Request.form("Citizen")
> rsClients("CStatus")=Request.form("CitizenType")
> rsClients("Maritals")=Request.form("MaritalStatus")
> rsClients("LiveAr")=Request.form("LiveWhere")
> rsClients("Bdate")=Request.form("Birthdate")
> rsClients("Sex")=Request.form("sex")
> rsClients("Children")=Request.form("Children")
> rsClients("Adults")=Request.form("Adults")
> rsClients("Know")=Request.form("know")
> rsClients("SSN")=Request.form("ssn")
> rsClients("Summary")=Request.form("Description")
> rsClients("Race")=Request.form("Race")
> rsClients("Casetype")=("H")
> rsClients("Snum")=("2")
> rsClients("Pcode")=("99")
> rsClients("Dopen")= Date()
> rsClients("OfficeNum")=("1")
> rsClients("Language")=("E")
> rsClients("TIntake") = ("W")
>
> rsEligibility.AddNew
> rsEligibility("FNadv")=Request.form("AdverseFirst")
> rsEligibility("LNadv")=Request.form("AdverseLast")
> rsEligibility("CFname")=Request.form("FirstName")
> rsEligibility("CLname")=Request.form("LastName")
> rsEligibility("Children")=Request.form("Children")
> rsEligibility("Adults")=Request.form("Adults")
> rsEligibility("Snum")=("2")
> rsEligibility("Pcode")=("99")
> rsEligibility("Dopen")= Date()
> rsEligibility("OfficeNum") = ("1")
>
rsEligibility("Income1A")=CLng(Request.Form("monthly1")*12)
>
rsEligibility("Income2A")=CLng(Request.form("monthly2")*12)
>
rsEligibility("Income3A")=CLng(Request.form("monthly3")*12)
>
rsEligibility("Income4A")=CLng(Request.form("monthly4")*12)
>
rsEligibility("Income5A")=CLng(Request.form("monthly5")*12)
> rsEligibility("IncomeT")=
>
rsEligibility("Income1A")+rsEligibility("Income2A")+rsEligibility("Income3A"
> )+rsEligibility("Income4A")+rsEligibility("Income5A")
> rsEligibility("Income1N")=Request.form("incomesource1")
> rsEligibility("Income2N")=Request.form("incomesource2")
> rsEligibility("Income3N")=Request.form("incomesource3")
> rsEligibility("Income4N")=Request.form("incomesource4")
> rsEligibility("Income5N")=Request.form("incomesource5")
> rsEligibility("Asset1A")=
CLng(Request.form("assetamount1"))
>
rsEligibility("Asset2A")=CLng(Request.form("assetamount2"))
>
rsEligibility("Asset3A")=CLng(Request.form("assetamount3"))
>
rsEligibility("Asset4A")=CLng(Request.form("assetamount4"))
>
rsEligibility("Asset5A")=CLng(Request.form("assetamount5"))
>
rsEligibility("AssetT")=rsEligibility("Asset1A")+rsEligibility("Asset2A")+rs
>
Eligibility("Asset3A")+rsEligibility("Asset4A")+rsEligibility("Asset5A")
> rsEligibility("Asset1N")=Request.form("assetsource1")
> rsEligibility("Asset2N")=Request.form("assetsource2")
> rsEligibility("Asset3N")=Request.form("assetsource3")
> rsEligibility("Asset4N")=Request.form("assetsource4")
> rsEligibility("Asset5N")=Request.form("assetsource5")
> rsEligibility.Update
> rsClients.Update
> rsClients.Requery
> Session("UserID")=rsClients("CASENUM")
> Session("email")=Request.Form("EMailAddress")
> response.redirect "done1.asp"
>
> It then carries the session ID to the next page and
pulls the correct
> record
> out.
>
> I had it written like you suggested, but it was given me
an error so I
> coded
> it like it is in my previous post and it works. I just
hope it continues
> to
> work. I think it is using the svuserid for both
recordsets, correct?
>
> <%
> Dim svuserid
> svuserid = "0"
> if (Session("UserID") <> "") then svuserid =
Session("UserID")
> %>
>
>

Similar Messages

  • Create an Either BOF or EOF is True capture message

    Ok, here's the common error many people get:
    ADODB.Field error '800a0bcd'
    Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
    What happens is I've got a site that my client can add categories and vendors. If she adds a category, but then does not add a vendor that uses that category, it will throw that error. I'd like to add some code that sees that error and says something like "sorry, that category doesn't exist. Click here to go back".
    here's what I've tried, but neither of these worked:
    <
    %If rsDakrat.EOF and rsDakrat.BOF then
    Response.write("yourerrorpage.asp";)
    end if
    %>
    and
    <% If rsDakrat.EOF And rsDakrat.BOF Then %>
    <p>Sorry, that category doesn't exist. Click here to go back</p>
    <% End If %>
    So I guess the first bit of code that says if rs.EOF and rs.BOF then is wrong, unfortunately I have no idea how to make that work.
    Thank you to anyone who can help in advance!!!!

    ok, good point - here's what I've got:
    <%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
    <!--#include virtual="/Connections/data.asp" -->
    <%
    If rsDakrat.BOF And rsDakrat.EOF Then
         Response.redirect "empty.asp"
    End If
    %>
    <%
    Dim rsDakrat__MMColParam
    rsDakrat__MMColParam = "1"
    If (Request.QueryString("catloc") <> "") Then
      rsDakrat__MMColParam = Request.QueryString("catloc")
    End If
    %>
    <%
    Dim rsDakrat
    Dim rsDakrat_cmd
    Dim rsDakrat_numRows
    Set rsDakrat_cmd = Server.CreateObject ("ADODB.Command")
    rsDakrat_cmd.ActiveConnection = MM_data_STRING
    rsDakrat_cmd.CommandText = "SELECT * FROM minotlist WHERE catloc = ? ORDER BY ID ASC"
    rsDakrat_cmd.Prepared = true
    rsDakrat_cmd.Parameters.Append rsDakrat_cmd.CreateParameter("param1", 200, 1, 255, rsDakrat__MMColParam) ' adVarChar
    Set rsDakrat = rsDakrat_cmd.Execute
    rsDakrat_numRows = 0
    %>
    <%
    Dim HLooper1__numRows
    HLooper1__numRows = 16
    Dim HLooper1__index
    HLooper1__index = 0
    rsDakrat_numRows = rsDakrat_numRows + HLooper1__numRows
    %>
    <%
    '  *** Recordset Stats, Move To Record, and Go To Record: declare stats variables
    Dim rsDakrat_total
    Dim rsDakrat_first
    Dim rsDakrat_last
    ' set the record count
    rsDakrat_total = rsDakrat.RecordCount
    ' set the number of rows displayed on this page
    If (rsDakrat_numRows < 0) Then
      rsDakrat_numRows = rsDakrat_total
    Elseif (rsDakrat_numRows = 0) Then
      rsDakrat_numRows = 1
    End If
    ' set the first and last displayed record
    rsDakrat_first = 1
    rsDakrat_last  = rsDakrat_first + rsDakrat_numRows - 1
    ' if we have the correct record count, check the other stats
    If (rsDakrat_total <> -1) Then
      If (rsDakrat_first > rsDakrat_total) Then
        rsDakrat_first = rsDakrat_total
      End If
      If (rsDakrat_last > rsDakrat_total) Then
        rsDakrat_last = rsDakrat_total
      End If
      If (rsDakrat_numRows > rsDakrat_total) Then
        rsDakrat_numRows = rsDakrat_total
      End If
    End If
    %>
    <%
    ' *** Recordset Stats: if we don't know the record count, manually count them
    If (rsDakrat_total = -1) Then
      ' count the total records by iterating through the recordset
      rsDakrat_total=0
      While (Not rsDakrat.EOF)
        rsDakrat_total = rsDakrat_total + 1
        rsDakrat.MoveNext
      Wend
      ' reset the cursor to the beginning
      If (rsDakrat.CursorType > 0) Then
        rsDakrat.MoveFirst
      Else
        rsDakrat.Requery
      End If
      ' set the number of rows displayed on this page
      If (rsDakrat_numRows < 0 Or rsDakrat_numRows > rsDakrat_total) Then
        rsDakrat_numRows = rsDakrat_total
      End If
      ' set the first and last displayed record
      rsDakrat_first = 1
      rsDakrat_last = rsDakrat_first + rsDakrat_numRows - 1
      If (rsDakrat_first > rsDakrat_total) Then
        rsDakrat_first = rsDakrat_total
      End If
      If (rsDakrat_last > rsDakrat_total) Then
        rsDakrat_last = rsDakrat_total
      End If
    End If
    %>
    <%
    Dim MM_paramName
    %>
    <%
    ' *** Move To Record and Go To Record: declare variables
    Dim MM_rs
    Dim MM_rsCount
    Dim MM_size
    Dim MM_uniqueCol
    Dim MM_offset
    Dim MM_atTotal
    Dim MM_paramIsDefined
    Dim MM_param
    Dim MM_index
    Set MM_rs    = rsDakrat
    MM_rsCount   = rsDakrat_total
    MM_size      = rsDakrat_numRows
    MM_uniqueCol = ""
    MM_paramName = ""
    MM_offset = 0
    MM_atTotal = false
    MM_paramIsDefined = false
    If (MM_paramName <> "") Then
      MM_paramIsDefined = (Request.QueryString(MM_paramName) <> "")
    End If
    %>
    <%
    ' *** Move To Record: handle 'index' or 'offset' parameter
    if (Not MM_paramIsDefined And MM_rsCount <> 0) then
      ' use index parameter if defined, otherwise use offset parameter
      MM_param = Request.QueryString("index")
      If (MM_param = "") Then
        MM_param = Request.QueryString("offset")
      End If
      If (MM_param <> "") Then
        MM_offset = Int(MM_param)
      End If
      ' if we have a record count, check if we are past the end of the recordset
      If (MM_rsCount <> -1) Then
        If (MM_offset >= MM_rsCount Or MM_offset = -1) Then  ' past end or move last
          If ((MM_rsCount Mod MM_size) > 0) Then         ' last page not a full repeat region
            MM_offset = MM_rsCount - (MM_rsCount Mod MM_size)
          Else
            MM_offset = MM_rsCount - MM_size
          End If
        End If
      End If
      ' move the cursor to the selected record
      MM_index = 0
      While ((Not MM_rs.EOF) And (MM_index < MM_offset Or MM_offset = -1))
        MM_rs.MoveNext
        MM_index = MM_index + 1
      Wend
      If (MM_rs.EOF) Then
        MM_offset = MM_index  ' set MM_offset to the last possible record
      End If
    End If
    %>
    <%
    ' *** Move To Record: if we dont know the record count, check the display range
    If (MM_rsCount = -1) Then
      ' walk to the end of the display range for this page
      MM_index = MM_offset
      While (Not MM_rs.EOF And (MM_size < 0 Or MM_index < MM_offset + MM_size))
        MM_rs.MoveNext
        MM_index = MM_index + 1
      Wend
      ' if we walked off the end of the recordset, set MM_rsCount and MM_size
      If (MM_rs.EOF) Then
        MM_rsCount = MM_index
        If (MM_size < 0 Or MM_size > MM_rsCount) Then
          MM_size = MM_rsCount
        End If
      End If
      ' if we walked off the end, set the offset based on page size
      If (MM_rs.EOF And Not MM_paramIsDefined) Then
        If (MM_offset > MM_rsCount - MM_size Or MM_offset = -1) Then
          If ((MM_rsCount Mod MM_size) > 0) Then
            MM_offset = MM_rsCount - (MM_rsCount Mod MM_size)
          Else
            MM_offset = MM_rsCount - MM_size
          End If
        End If
      End If
      ' reset the cursor to the beginning
      If (MM_rs.CursorType > 0) Then
        MM_rs.MoveFirst
      Else
        MM_rs.Requery
      End If
      ' move the cursor to the selected record
      MM_index = 0
      While (Not MM_rs.EOF And MM_index < MM_offset)
        MM_rs.MoveNext
        MM_index = MM_index + 1
      Wend
    End If
    %>
    <%
    ' *** Move To Record: update recordset stats
    ' set the first and last displayed record
    rsDakrat_first = MM_offset + 1
    rsDakrat_last  = MM_offset + MM_size
    If (MM_rsCount <> -1) Then
      If (rsDakrat_first > MM_rsCount) Then
        rsDakrat_first = MM_rsCount
      End If
      If (rsDakrat_last > MM_rsCount) Then
        rsDakrat_last = MM_rsCount
      End If
    End If
    ' set the boolean used by hide region to check if we are on the last record
    MM_atTotal = (MM_rsCount <> -1 And MM_offset + MM_size >= MM_rsCount)
    %>
    <%
    ' *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters
    Dim MM_keepNone
    Dim MM_keepURL
    Dim MM_keepForm
    Dim MM_keepBoth
    Dim MM_removeList
    Dim MM_item
    Dim MM_nextItem
    ' create the list of parameters which should not be maintained
    MM_removeList = "&index="
    If (MM_paramName <> "") Then
      MM_removeList = MM_removeList & "&" & MM_paramName & "="
    End If
    MM_keepURL=""
    MM_keepForm=""
    MM_keepBoth=""
    MM_keepNone=""
    ' add the URL parameters to the MM_keepURL string
    For Each MM_item In Request.QueryString
      MM_nextItem = "&" & MM_item & "="
      If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then
        MM_keepURL = MM_keepURL & MM_nextItem & Server.URLencode(Request.QueryString(MM_item))
      End If
    Next
    ' add the Form variables to the MM_keepForm string
    For Each MM_item In Request.Form
      MM_nextItem = "&" & MM_item & "="
      If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then
        MM_keepForm = MM_keepForm & MM_nextItem & Server.URLencode(Request.Form(MM_item))
      End If
    Next
    ' create the Form + URL string and remove the intial '&' from each of the strings
    MM_keepBoth = MM_keepURL & MM_keepForm
    If (MM_keepBoth <> "") Then
      MM_keepBoth = Right(MM_keepBoth, Len(MM_keepBoth) - 1)
    End If
    If (MM_keepURL <> "")  Then
      MM_keepURL  = Right(MM_keepURL, Len(MM_keepURL) - 1)
    End If
    If (MM_keepForm <> "") Then
      MM_keepForm = Right(MM_keepForm, Len(MM_keepForm) - 1)
    End If
    ' a utility function used for adding additional parameters to these strings
    Function MM_joinChar(firstItem)
      If (firstItem <> "") Then
        MM_joinChar = "&"
      Else
        MM_joinChar = ""
      End If
    End Function
    %>
    <%
    ' *** Move To Record: set the strings for the first, last, next, and previous links
    Dim MM_keepMove
    Dim MM_moveParam
    Dim MM_moveFirst
    Dim MM_moveLast
    Dim MM_moveNext
    Dim MM_movePrev
    Dim MM_urlStr
    Dim MM_paramList
    Dim MM_paramIndex
    Dim MM_nextParam
    MM_keepMove = MM_keepBoth
    MM_moveParam = "index"
    ' if the page has a repeated region, remove 'offset' from the maintained parameters
    If (MM_size > 1) Then
      MM_moveParam = "offset"
      If (MM_keepMove <> "") Then
        MM_paramList = Split(MM_keepMove, "&")
        MM_keepMove = ""
        For MM_paramIndex = 0 To UBound(MM_paramList)
          MM_nextParam = Left(MM_paramList(MM_paramIndex), InStr(MM_paramList(MM_paramIndex),"=") - 1)
          If (StrComp(MM_nextParam,MM_moveParam,1) <> 0) Then
            MM_keepMove = MM_keepMove & "&" & MM_paramList(MM_paramIndex)
          End If
        Next
        If (MM_keepMove <> "") Then
          MM_keepMove = Right(MM_keepMove, Len(MM_keepMove) - 1)
        End If
      End If
    End If
    ' set the strings for the move to links
    If (MM_keepMove <> "") Then
      MM_keepMove = Server.HTMLEncode(MM_keepMove) & "&"
    End If
    MM_urlStr = Request.ServerVariables("URL") & "?" & MM_keepMove & MM_moveParam & "="
    MM_moveFirst = MM_urlStr & "0"
    MM_moveLast  = MM_urlStr & "-1"
    MM_moveNext  = MM_urlStr & CStr(MM_offset + MM_size)
    If (MM_offset - MM_size < 0) Then
      MM_movePrev = MM_urlStr & "0"
    Else
      MM_movePrev = MM_urlStr & CStr(MM_offset - MM_size)
    End If
    %>
    <html><!-- InstanceBegin template="/Templates/main2.dwt.asp" codeOutsideHTMLIsLocked="false" -->
    <head>
    <!-- InstanceBeginEditable name="doctitle" -->
    <title>Dakrat.com</title>
    <!-- InstanceEndEditable -->
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <!-- InstanceBeginEditable name="head" -->
    <link href="http://www.dakrat.com/main.css" rel="stylesheet" type="text/css" />
    <!-- InstanceEndEditable -->
    <link href="../../main.css" rel="stylesheet" type="text/css">
    </head>
    <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
    <div align="center">
    <table id="Table_01" width="1158" border="0" cellpadding="0" cellspacing="0">
        <tr>
            <td colspan="5"><div align="center"><table width="944" border="0" cellspacing="2" cellpadding="2">
      <tr>
        <td><div align="right" class="toplinks"><strong><span class="toplinks"><a href="http://www.dakrat.com/advertise-with-dakrat.asp" >Advertise with us</a></span> | <span class="toplinks"><a href="http://www.dakrat.com/contact.asp">Contact</a></span></strong></div></td>
      </tr>
    </table></div></td>
        </tr>
        <tr>
            <td colspan="5">
                <img src="../../images/drhp_02.png" width="1158" height="333" alt="North Dakota Business Directory"></td>
        </tr>
        <tr>
            <td>
        <img src="../../images/midsp.gif" width="88" height="1" alt=""></td>
            <td id="leftsidebkg"><img src="../../images/spacer.gif" width="85" height="10" alt="DakRat.com" /></td>
            <td align="left" valign="top" class="centerbk"><table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td><img src="../../images/cntrbk_01.jpg" alt="" width="799" height="34" align="top"></td>
      </tr>
      <tr>
        <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td height="178" align="center" valign="top"><!-- InstanceBeginEditable name="body" -->
    <table width="100%" border="0" align="center" cellpadding="1" cellspacing="1">
                            <tr>
                              <td align="left" valign="middle"><a href="javascript:history.go(-1)" onMouseOver="self.status=document.referrer;return true">&laquo; Back</a> | <a href="http://www.dakrat.com/index2.asp">Dakrat.com Home</a></td>
      </tr>
                            <tr>
                              <td align="left" valign="middle"><div>
                                <h1 class="mainheaderblue"><a href="index.asp">Minot</a> - <%=(rsDakrat.Fields.Item("catloc").Value)%></h1>
                              </div></td>
      </tr>
                            <tr>
                              <td width="873" align="left" valign="top"><table width="100%" border="0" cellspacing="1" cellpadding="2">
                                <tr>
                                  <td><table>
                                    <%
    startrw = 0
    endrw = HLooper1__index
    numberColumns = 4
    numrows = 4
    while((numrows <> 0) AND (Not rsDakrat.EOF))
        startrw = endrw + 1
        endrw = endrw + numberColumns
    %>
                                    <tr align="center" valign="top">
                                      <%
    While ((startrw <= endrw) AND (Not rsDakrat.EOF))
    %>
                                      <td><table width="172" border="0" cellpadding="4" cellspacing="2">
                                        <tr>
                                          <td width="100%"><div align="center" class="mainboldtxt"><a href="detail.asp?ID=<%=(rsDakrat.Fields.Item("ID").Value)%>"><strong><%=(rsDakrat.Fields. Item("titleloc").Value)%></strong></a></div></td>
                                        </tr>
                                      </table></td>
                                      <%
        startrw = startrw + 1
        rsDakrat.MoveNext()
        Wend
        %>
                                    </tr>
                                    <%
    numrows=numrows-1
    Wend
    %>
                                  </table><br /></td>
                                </tr>
                                <tr>
                                  <td align="left" class="maintxt">Page:
                                  <%
    TM_counter = 0
    For i = 1 to rsDakrat_total Step MM_size
    TM_counter = TM_counter + 1
    TM_PageEndCount = i + MM_size - 1
    if TM_PageEndCount > rsDakrat_total Then TM_PageEndCount = rsDakrat_total
    if i <> MM_offset + 1 then
    Response.Write("<a href=""" & Request.ServerVariables("URL") & "?" & MM_keepMove & "offset=" & i-1 & """>")
    Response.Write(TM_counter & "</a>")
    else
    Response.Write("<strong>" & TM_counter & "</strong>")
    End if
    if(TM_PageEndCount <> rsDakrat_total) then Response.Write(" | ")
    next
    %></td>
                                </tr>
                              </table></td>
      </tr>
                            </table>
    <!-- InstanceEndEditable --></td>
                </tr>
              </table></td>
      </tr>
      <tr>
        <td> </td>
      </tr>
    </table>
        </td>
            <td id="rightsidebkg"><img src="../../images/spacer.gif" width="79" height="10" alt="DakRat.com" /></td>
            <td>
                <img src="../../images/midsp.gif" width="110" height="1" alt=""></td>
        </tr>
        <tr>
            <td colspan="5">
                <img src="../../images/drhp_08.png" width="1158" height="62" alt=""></td>
        </tr>
    </table>Copyright 2011 &copy; DakRat.com | Site designed by Kreative Graphik</div>
    </body>
    <!-- InstanceEnd --></html>
    <%
    rsDakrat.Close()
    Set rsDakrat = Nothing
    %>
    and just incase, here's the connection string:
    <%
    ' FileName="Connection_ado_conn_string.htm"
    ' Type="ADO"
    ' DesigntimeType="ADO"
    ' HTTP="true"
    ' Catalog=""
    ' Schema=""
    Dim MM_data_STRING
    MM_data_STRING = "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=" & Server.MapPath("\db\data\data.mdb")
    %>

  • My ipod touch is not working and it won't connect to itunes either what do I do? HELP PLEASE!!!

    My ipod touch is not working and it won't connect to itunes either what do I do? HELP PLEASE!!!

    My ipod touch is not working and it won't connect to itunes either what do I do? HELP PLEASE!!!

  • My MacBookPro is continuously buzzing, the backlights are not working although it should be on. Tried to cover the sensor, but it's not that. Also, it's telling me that I have no batteries and the charging is not working either.... Any help? PLEASE!!!!

    My MacBookPro is continuously buzzing, the backlights are not working although it should be on. Tried to cover the sensor, but it's not that. Also, it's telling me that I have no batteries and the charging is not working either.... Any help? PLEASE!!!!

    Intel-based Macs: Resetting the System Management Controller (SMC)

  • Every time I try to open my 2 year old copy of CS6, it takes me to the trial window. Updating either failed entirely or didn't help.

    Apparently, there was a patch to fix this very same problem one year ago — i’ve tried it and it hasn’t helped. The first attempt failed to install. The second attempt supposedly succeeded but failed to help. I then tried going to the latest update -- 13.0.6 i believe -- but the exact same thing happened. It either failed to update successfully, or didn't help.
    I’ve looking through my adobe account, and I can’t find CS6 registered with my products. Theres a copy of Elements 10 registered to the date when I believe my CS6 purchase occured, but whether this is new or not, I don’t know. I never peruse my adobe account enough to compare. Regardless, the serial number failed to help.
    If there is anyone that can assist me, it would be greatly appreciated. I have a lot of work I need to be able to get back to.

    Sign in, activation, or connection errors | CS5.5 and later
    Download CS6 products
    For anything beyond that you will have to provide proper system info and other details, which you haven't done so far.
    Mylenium

  • ITunes on one computer is not accessible on another computer, but the reverse is true -- help, troubleshoot

    My 2009 iMac can connect to my 2013 iMac, but not the reverse. My 2009 can play anything from the 2013 iTunes, but not the reverse. 
    When this problem happened there was also a problem of the sound not working on the 2013 iMac. I went through all the standard procedures for both issues eventually resetting PRAM and finally reinstalling Yosemite, which did not fix either problem. 
    Next, I found an article that had me go into the Audio MDMI app to fix the sound. Perfect. Now the 2013 has sound but still can not connect to the 2009; however, the 2013 can connect to the Macbook and Apple TV. Since I've reinstalled the OS and it can connect to the network and other devices I'm assuming that there is a setting someplace which is set to not connect with the 2009. Is there anything  I can check, either an app or through Terminal?
    I've looked online for over an hour but I can't find anything to help in this particular situation.

    Both computers are logged into the same iTunes account and are on the home sharing network. All of the correct settings have been selected. The problem is intermittent. Sometimes they connect, sometimes they don't. It's not consistent.
    Just a few hours ago I connected the two via Ethernet to transfer files. They worked fine, 60 GB in 19 minutes. Later I went back to transfer about 10GB and they wouldn't connected except through Wi-Fi. Once again, 2009 can get into 2013 but not the other way around. It's driving me nuts.
    At present 2013 is only showing a wi-fi connection to the Time Machine, not the other two computers.
    Any more things to look for?

  • I was wondering if I could use Boot Camp and install Windows 7 on my black Macbook. I don't see where I can tell what year it is from in the about this mac option either...? Please help. I am afraid that my mac is considered vintage now :(

    I read somewhere earlier that if my macbook is vintage, then I can't install windows/bootcamp. Maybe this is too big a venture for me to undertake anyway, but just in case I wanted to get a little help before I dig too deep...  I think it was late 2006 or early 2007 when I purchased my black Macbook.

    To see which model you have go to the Apple in the upper left corner and select About This Mac, then click on More Info. When System Profiler comes up check the Model Identifier and post it back here.
    model 1,1 (Early 2006)
    model 2,1 (Late 2006 & Mid 2007)
    model 3,1 (Late 2007)
    model 4,1 (Early 2008) 
    model 5,1 (Late 2008, Aluminum Unibody)
    model 5,2 (Early 2009, 2.0GHz Model Only)
    model 5,2 (Mid 2009, 2.13GHz Model Only)
    model 6,1 (Late 2009, White Unibody)
    model 7,1 (Mid 2010)

  • I want to save my Bookmarks, but unable to find either Import or Export options, Kindly help

    In Earlier version Firefox use to have Import & Export options under File menu, but in the new version 7.0.1, I cannot find Import & Export options, as I was trying to save my Bookmarks. Kindly help.
    Thanks & Regards,
    Subodh.

    Hi Subodh. I have encountered the exact same problem. It seems that the Import & Export options under the File menu are now removed starting from version 7. This leaves another exact (yet longer) way to do this.
    Here's the article that explains everything: https://support.mozilla.com/en-US/kb/Importing%20bookmarks%20and%20other%20data%20from%20other%20browsers?s=import+bookmarks&r=0&as=s

  • In "about this mac" menu it shows that i have 4,6GB on movies on my mac. but its not true. help please

    hi everybody.
    when i go to the apple symbol on the top left corner , and than on more info and than on storage, itshows me that various things which are ok, but also it shows me that i have 4,6 GB movies on my mac somewhere. i'm 100% sure there is not a single movie on my mac. how can i find out where this movies are , if i have them. could it be that i hide them by accident? or why does he show me that???
    please see screenshot so you know what i'm talking about.
    please help me.
    thanks

    hi,
    i just done that, but the only movies it showed me are the movies from my iphoto library. small movies i made with my camera. there are not enough movies to ad up to 4.6 GB.
    sorry.
    any other suggestions please

  • S700 gigaworks true help and recommendations

    hi all , i just returned my s700 system for warranty cause when i plugged them in to test them a sound came from the subwoofer and then smoke started to come out of them , i sent them to the retailer and they are sending new ones , the problem is that i dont want them to fail again , any recommendation as to how should use them , should i leave them on or stand by , or turn the subwoofer off , everytime , , any thing that would help me not get the same problem is appreciated , thanx in advance , and i hope this only happens rarely .
    omegaferrari

    I suggest you buy a voltage stabilizer to protect the system. You need also a fan to cool down the temperature of heat sink at the back of subwoofer. If you don't want to use it more than 1/2 hours,?you better turn off it completely. While in standby mode, it also consume current and release heat?as well. Hope these can help you.

  • I have a MBP from.....mid 2012 (or 2011, not sure) And im running bootcamp with sp1 windows 7 ultimate, I want to use the 1T toshiba hardrive (3.0 usb) and it dosnt show up in either mac nor windows. Please help, been stuck like this forever.

    Well....I, as a noob, wrote everything in the title *shy smile*

    What are the system requirements for that model hard drive?  The few 1T's that I saw on Toshiba's website were only compatible with Windows.  None make no mention of Macs. 

  • EOF BOF error

    I am trying to edit DB records (Microsoft Access 2003) using
    a form created in Dreamweaver 8. I juse JavaScript since I use it a
    little on web pages, but don't know much - as opposed to VBscript
    where I really know nothing!
    I have a search page by ID and a results page for that search
    that work as they should. I mention that because that's basically
    what is not working on my EDIT page.
    To edit, I have a search page by ID and a results page (that
    has the update behavior on it). If I use the search to edit page
    without a filter, it retrieves and displays the records, all 844 of
    them. If I add a filter to the recordset to filter by ID so that I
    only retreive one record to edit, it crashes. Either "live data" or
    exiting out an trying the page brings the same error:
    ADODB.Field error '800a0bcd'
    Either BOF or EOF is True, or the current record
    has been deleted. Requested operation requires
    a current record.
    /rfisd/Sands2/IDresultstoEdit_z9v7o2rnaj.asp, line 451
    Line 451 is:
    <input
    value="<%=((rsEditSandS.Fields.Item("creator").Value))%>"
    name="creator" type="text" id="creator" size="36">
    Heres the recordset:
    <%
    var rsEditSandS_cmd = Server.CreateObject ("ADODB.Command");
    rsEditSandS_cmd.ActiveConnection = MM_conSands_STRING;
    rsEditSandS_cmd.CommandText = "SELECT * FROM tblScoSeq WHERE
    id = ?";
    rsEditSandS_cmd.Prepared = true;
    rsEditSandS_cmd.Parameters.Append(rsEditSandS_cmd.CreateParameter("param1",
    5, 1, -1, rsEditSandS__MMColParam)); // adDouble
    var rsEditSandS = rsEditSandS_cmd.Execute();
    var rsEditSandS_numRows = 0;
    %>
    Here's where I set the default to 12:
    <%
    var rsEditSandS__MMColParam = "12";
    if (String(Request.QueryString("id")) != "undefined"
    String(Request.QueryString("id")) != "") {
    rsEditSandS__MMColParam = String(Request.QueryString("id"));
    %>
    Here's where I display the ID. It's not an input because I
    don't want the user to change it.
    <div align="center" class="style2" title="Leave this field
    alone. The Identification number will appear once you have
    submitted your document. Use Document List or Quicklist to find the
    number for your
    records."><%=(rsEditSandS.Fields.Item("id").Value)%></div>
    I just don't understand why the message is caused by the
    filter since the sample id (12) does exist. The database is not
    empty - there are 844 records. The connection tests successfully in
    Dreamweaver. The recordset tests successfully in in dreamweaver
    filtered and un-filtered. If I go to the DSN configuration, that
    tests (in DW) as a good connection too, and it IS going to the .mdb
    that I think it is, and the driver is the Microsoft Access Driver.
    I've compared the working Search/Results pages to the
    non-working Search/Results for Editing (which also has an update
    behavior on it, but it's not getting that far in the code). I'd
    appreciate any suggestions for things to check.
    TIA

    It's not finding a value in the field named "creator". Do you
    have such a
    field in your recordset?
    Nancy Gill
    Adobe Community Expert
    BLOG:
    http://www.dmxwishes.com/blog.asp
    Author: Dreamweaver 8 e-book for the DMX Zone
    Co-Author: Dreamweaver MX: Instant Troubleshooter (August,
    2003)
    Technical Editor: DMX 2004: The Complete Reference, DMX 2004:
    A Beginner's
    Guide, Mastering Macromedia Contribute
    Technical Reviewer: Dynamic Dreamweaver MX/DMX: Advanced PHP
    Web Development
    "bolin" <[email protected]> wrote in message
    news:[email protected]...
    >I am trying to edit DB records (Microsoft Access 2003)
    using a form created
    >in
    > Dreamweaver 8. I juse JavaScript since I use it a little
    on web pages,
    > but
    > don't know much - as opposed to VBscript where I really
    know nothing!
    >
    > I have a search page by ID and a results page for that
    search that work as
    > they should. I mention that because that's basically
    what is not working
    > on my
    > EDIT page.
    >
    > To edit, I have a search page by ID and a results page
    (that has the
    > update
    > behavior on it). If I use the search to edit page
    without a filter, it
    > retrieves and displays the records, all 844 of them. If
    I add a filter to
    > the
    > recordset to filter by ID so that I only retreive one
    record to edit, it
    > crashes. Either "live data" or exiting out an trying the
    page brings the
    > same
    > error:
    >
    >
    > ADODB.Field error '800a0bcd'
    >
    > Either BOF or EOF is True, or the current record
    > has been deleted. Requested operation requires
    > a current record.
    >
    > /rfisd/Sands2/IDresultstoEdit_z9v7o2rnaj.asp, line 451
    >
    > Line 451 is:
    >
    > <input
    value="<%=((rsEditSandS.Fields.Item("creator").Value))%>"
    > name="creator" type="text" id="creator" size="36">
    >
    > Heres the recordset:
    > <%
    > var rsEditSandS_cmd = Server.CreateObject
    ("ADODB.Command");
    > rsEditSandS_cmd.ActiveConnection = MM_conSands_STRING;
    > rsEditSandS_cmd.CommandText = "SELECT * FROM tblScoSeq
    WHERE id = ?";
    > rsEditSandS_cmd.Prepared = true;
    >
    rsEditSandS_cmd.Parameters.Append(rsEditSandS_cmd.CreateParameter("param1",
    > 5,
    > 1, -1, rsEditSandS__MMColParam)); // adDouble
    >
    > var rsEditSandS = rsEditSandS_cmd.Execute();
    > var rsEditSandS_numRows = 0;
    > %>
    >
    > Here's where I set the default to 12:
    >
    > <%
    > var rsEditSandS__MMColParam = "12";
    > if (String(Request.QueryString("id")) != "undefined"
    > String(Request.QueryString("id")) != "") {
    > rsEditSandS__MMColParam =
    String(Request.QueryString("id"));
    > }
    > %>
    >
    > Here's where I display the ID. It's not an input because
    I don't want the
    > user to change it.
    >
    > <div align="center" class="style2" title="Leave this
    field alone. The
    > Identification number will appear once you have
    submitted your document.
    > Use
    > Document List or Quicklist to find the number for your
    >
    records."><%=(rsEditSandS.Fields.Item("id").Value)%></div>
    >
    > I just don't understand why the message is caused by the
    filter since the
    > sample id (12) does exist. The database is not empty -
    there are 844
    > records.
    > The connection tests successfully in Dreamweaver. The
    recordset tests
    > successfully in in dreamweaver filtered and un-filtered.
    If I go to the
    > DSN
    > configuration, that tests (in DW) as a good connection
    too, and it IS
    > going to
    > the .mdb that I think it is, and the driver is the
    Microsoft Access
    > Driver.
    >
    > I've compared the working Search/Results pages to the
    non-working
    > Search/Results for Editing (which also has an update
    behavior on it, but
    > it's
    > not getting that far in the code). I'd appreciate any
    suggestions for
    > things
    > to check.
    >
    > TIA
    >
    >

  • BOF EOF HOW TO  KEEP IT FROM ERRORING OUT

    I'm getting the following error. It's in the head of my page.
    ADODB.Field error '800a0bcd'
    Either BOF or EOF is True, or the current record has been
    deleted.
    Requested operation requires a current record.
    /PAGENAME_test.asp, line 119
    This is the actual code
    <%
    if ((Request.ServerVariables("Request_Method") = "POST" ))
    then
    'WA Universal Email object="CDONTS NewMail"
    'Send Loop Once Per Entry
    WA_Universal_Email_1_SendMail("" &
    BEGIN LINE 119----------------------------------------------
    cStr((rsLostPassword.Fields.Item("Email").Value)) & "")
    END LINE 119------------------------------------------------
    'Send Mail All Entries
    if ("https://www.domainname.com/login.asp"<>"") then
    Response.Redirect("https://www.domainname.com/login.asp")
    end if
    end if
    %>

    Find the ASP FAQ. This problem is answered there as are many
    other ASP
    issues.
    <%= Clinton Gallagher
    NET csgallagher AT metromilwaukee.com
    URL
    http://clintongallagher.metromilwaukee.com/
    MAP
    http://wikimapia.org/#y=43038073&x=-88043838&z=17&l=0&m=h
    "Lee" <[email protected]> wrote in message
    news:eo60lc$kk0$[email protected]..
    > I'm getting the following error. It's in the head of my
    page.
    >
    > -------------------
    > ADODB.Field error '800a0bcd'
    >
    > Either BOF or EOF is True, or the current record has
    been deleted.
    > Requested operation requires a current record.
    >
    > /PAGENAME_test.asp, line 119
    >
    > --------------------
    > This is the actual code
    > --------------------
    >
    > <%
    > if ((Request.ServerVariables("Request_Method") = "POST"
    )) then
    > 'WA Universal Email object="CDONTS NewMail"
    > 'Send Loop Once Per Entry
    > WA_Universal_Email_1_SendMail("" &
    > BEGIN LINE
    119----------------------------------------------
    > cStr((rsLostPassword.Fields.Item("Email").Value)) &
    > END LINE
    119------------------------------------------------
    > 'Send Mail All Entries
    > if ("https://www.domainname.com/login.asp"<>"")
    then
    >
    Response.Redirect("https://www.domainname.com/login.asp")
    > end if
    > end if
    > %>

  • Do while hitting EOF ??

    How do I code this properly so that when I hit the EOF we
    fall out of the
    loop? What I have below isn't working...
    do while ((rsmodules.Fields.Item("Regimen").Value) = CurrReg)
    and not
    (rsmodules.eof)
    'snip the stuff to do
    rsmodules.MoveNext()
    loop
    I get ...
    ADODB.Field error '800a0bcd'Either BOF or EOF is True, or the
    current
    record has been deleted. Requested operation requires a
    current record.
    Thanks much for the help.

    Thanks Pete ... yes and no, but I can probably figure it out
    beyond here
    with that tip.
    Basically this is a sub loop within a larger loop... so I
    don't really want
    this subloop to continue until EOF ... I want it to go until
    the field
    Regimen doesn't match CurrReg (which is the high level loop).
    "PeteC" <[email protected]> wrote in message
    news:fk8rjl$825$[email protected]..
    > HX wrote:
    >> do while ((rsmodules.Fields.Item("Regimen").Value) =
    CurrReg) and not
    >> (rsmodules.eof)
    >> 'snip the stuff to do
    >> rsmodules.MoveNext()
    >> loop
    >
    > If you hit EOF, you won't be able to examine the value
    of Fields. You need
    > to split the loop as follows;(this is pseudocode, not
    any particular
    > language...)
    >
    > do while not rsmodules.eof
    > if ((rsmodules.Fields.Item("Regimen").Value) = CurrReg)
    then
    > ' Do stuff
    > endif
    >
    > rsmodules.movenext()
    > loop
    >
    > Hope this helps.
    >
    > Pete.
    > --
    > Peter Connolly
    >
    http://www.kpdirection.com
    > Utah
    >

  • ADODB.Field (0x800A0BCD) - please help

    Hi
    I'm trying to create a page where I can create a new category with one form (form1) and also amend and delete using another form (form2).
    However when I preview in browser, I get:
    ADODB.Field (0x800A0BCD)
    Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
    /edufurniture/new_product.asp, line 209
    I've underlined in bold line 209, which is near the end of the code below.
    <%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
    <!--#include file="Connections/conn_edufurniture.asp" -->
    <%
    Dim MM_editAction
    MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME"))
    If (Request.QueryString <> "") Then
      MM_editAction = MM_editAction & "?" & Server.HTMLEncode(Request.QueryString)
    End If
    ' boolean to abort record edit
    Dim MM_abortEdit
    MM_abortEdit = false
    %>
    <%
    ' IIf implementation
    Function MM_IIf(condition, ifTrue, ifFalse)
      If condition = "" Then
        MM_IIf = ifFalse
      Else
        MM_IIf = ifTrue
      End If
    End Function
    %>
    <%
    If (CStr(Request("MM_insert")) = "form1") Then
      If (Not MM_abortEdit) Then
        ' execute the insert
        Dim MM_editCmd
        Set MM_editCmd = Server.CreateObject ("ADODB.Command")
        MM_editCmd.ActiveConnection = MM_conn_edufurniture_STRING
        MM_editCmd.CommandText = "INSERT INTO osc_product_categories (categories_name, catergories_image, catergories_alt) VALUES (?, ?, ?)"
        MM_editCmd.Prepared = true
        MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param1", 202, 1, 255, Request.Form("cat_name")) ' adVarWChar
        MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param2", 202, 1, 45, Request.Form("cat_image")) ' adVarWChar
        MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param3", 202, 1, 255, Request.Form("cat_alt")) ' adVarWChar
        MM_editCmd.Execute
        MM_editCmd.ActiveConnection.Close
        ' append the query string to the redirect URL
        Dim MM_editRedirectUrl
        MM_editRedirectUrl = "new_product.asp"
        If (Request.QueryString <> "") Then
          If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0) Then
            MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString
          Else
            MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString
          End If
        End If
        Response.Redirect(MM_editRedirectUrl)
      End If
    End If
    %>
    <%
    ' *** Delete Record: construct a sql delete statement and execute it
    If (CStr(Request("MM_delete")) = "form2" And CStr(Request("MM_recordId")) <> "") Then
      If (Not MM_abortEdit) Then
        ' execute the delete
        Set MM_editCmd = Server.CreateObject ("ADODB.Command")
        MM_editCmd.ActiveConnection = MM_conn_edufurniture_STRING
        MM_editCmd.CommandText = "DELETE FROM osc_product_categories WHERE categories_id = ?"
        MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param1", 5, 1, -1, Request.Form("MM_recordId")) ' adDouble
        MM_editCmd.Execute
        MM_editCmd.ActiveConnection.Close
        ' append the query string to the redirect URL
        ' Dim MM_editRedirectUrl
        MM_editRedirectUrl = "new_product.asp"
        If (Request.QueryString <> "") Then
          If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0) Then
            MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString
          Else
            MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString
          End If
        End If
        Response.Redirect(MM_editRedirectUrl)
      End If
    End If
    %>
    <%
    If (CStr(Request("MM_update")) = "form2") Then
      If (Not MM_abortEdit) Then
        ' execute the update
        'Dim MM_editCmd
        Set MM_editCmd = Server.CreateObject ("ADODB.Command")
        MM_editCmd.ActiveConnection = MM_conn_edufurniture_STRING
        MM_editCmd.CommandText = "UPDATE osc_product_categories SET categories_name = ?, catergories_image = ?, catergories_alt = ? WHERE categories_id = ?"
        MM_editCmd.Prepared = true
        MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param1", 202, 1, 255, Request.Form("cat_name")) ' adVarWChar
        MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param2", 202, 1, 45, Request.Form("cat_image")) ' adVarWChar
        MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param3", 202, 1, 255, Request.Form("cat-alt")) ' adVarWChar
        MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param4", 5, 1, -1, MM_IIF(Request.Form("MM_recordId"), Request.Form("MM_recordId"), null)) ' adDouble
        MM_editCmd.Execute
        MM_editCmd.ActiveConnection.Close
        ' append the query string to the redirect URL
        ' Dim MM_editRedirectUrl
        MM_editRedirectUrl = "new_product.asp"
        If (Request.QueryString <> "") Then
          If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0) Then
            MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString
          Else
            MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString
          End If
        End If
        Response.Redirect(MM_editRedirectUrl)
      End If
    End If
    %>
    <%
    Dim rec_categories
    Dim rec_categories_cmd
    Dim rec_categories_numRows
    Set rec_categories_cmd = Server.CreateObject ("ADODB.Command")
    rec_categories_cmd.ActiveConnection = MM_conn_edufurniture_STRING
    rec_categories_cmd.CommandText = "SELECT * FROM osc_product_categories"
    rec_categories_cmd.Prepared = true
    Set rec_categories = rec_categories_cmd.Execute
    rec_categories_numRows = 0
    %>
    <%
    Dim Repeat1__numRows
    Dim Repeat1__index
    Repeat1__numRows = -1
    Repeat1__index = 0
    rec_categories_numRows = rec_categories_numRows + Repeat1__numRows
    %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    <style type="text/css">
    <!--
    @import url("_admin/admin_css.css");
    -->
    </style>
    </head>
    <body>
    <p>Add New Category
    </p>
    <p> </p>
    <form id="form1" name="form1" method="POST" action="<%=MM_editAction%>">
    <fieldset>
    <label for="Category Name"> New Category name:
    <input name="cat_name" type="text" class="form_field" size="30" maxlength="50" />
    </label>
    <label for="Category Image"> New Category Image:
    <input name="cat_image" type="text" class="form_field" size="30" maxlength="50" />
    </label>
    <label for="Category Image"> New Category alt text:
    <input name="cat_alt" type="text" class="form_field" size="30" maxlength="50" />
    </label>
    </fieldset>
    <input name="Submit" type="submit" value="Submit" />
    <input type="hidden" name="MM_insert" value="<%=cStr(Request.Form("cat_alt"))%>" />
    <input type="hidden" name="MM_insert" value="form1" />
    </form>
    <p> </p>
    <p>Existing Categories</p>
    <form id="form2" name="form2" method="POST" action="<%=MM_editAction%>">
      <table width="950`" border="1" cellspacing="1" cellpadding="1">
        <tr>
          <th width="187" scope="col">Catergory ID</th>
          <th width="223" scope="col">Catergory Name</th>
          <th width="245" scope="col">Category Image</th>
          <th width="122" scope="col">Category Alt</th>
          <th width="122" scope="col">Amend/Delete</th>
        </tr>
        <tr>
          <%
    While ((Repeat1__numRows <> 0) AND (NOT rec_categories.EOF))
    %>
          <td><label><%=(rec_categories.Fields.Item("categories_id").Value)%>        </label></td>
          <td><label>
            <input type="text" name="cat_name2" id="cat_name" />
            <%=(rec_categories.Fields.Item("categories_name").Value)%></label></td>
          <td><label>
          <img src="_images/<%=(rec_categories.Fields.Item("catergories_image").Value)%>" width="100" height="34" />
    <input type="text" name="cat_image2" id="cat_image" />
            <%=(rec_categories.Fields.Item("catergories_image").Value)%>      </label></td>
          <td><input type="text" name="cat-alt" id="cat-alt" />
            <%=(rec_categories.Fields.Item("catergories_alt").Value)%></td>
          <td><label>
            <input type="submit" name="cat-Amend" id="cat-Amend" value="Amend" />
            <input type="submit" name="cat-delete" id="cat-delete" value="Delete" />
          </label></td>
          <%
      Repeat1__index=Repeat1__index+1
      Repeat1__numRows=Repeat1__numRows-1
      rec_categories.MoveNext()
    Wend
    %>
        </tr>
      </table>
      <input type="hidden" name="MM_recordId" value="<%= rec_categories.Fields.Item("categories_id").Value %>" />
      <input type="hidden" name="MM_delete" value="form2" />
      <input type="hidden" name="MM_update" value="form2" />
    </form>
    <p> </p>
    <p> </p>
    <p> </p>
    </body>
    </html>
    <%
    rec_categories.Close()
    Set rec_categories = Nothing
    %>
    any help would be gratefully received.
    John

    Hi
    Thanks for the help so far.
    The code still causes a problem:
    Microsoft VBScript compilation  (0x800A0400)
    Expected statement
    /edufurniture/new_product.asp, line 216
    End If ' end NOT rec_categories.EOF Or NOT rec_categories.BOF
    I've inserted the code as follows:
    <%While ((Repeat1__numrows <> 0) AND (NOT rec_categories.EOF)) %>
    <form id="form2" name="form2" method="POST" action="<%=MM_editAction%>">
      <table width="950`" border="1" cellspacing="1" cellpadding="1">
        <tr>
          <th width="187" scope="col">Catergory ID</th>
          <th width="223" scope="col">Catergory Name</th>
          <th width="245" scope="col">Category Image</th>
          <th width="122" scope="col">Category Alt</th>
          <th width="122" scope="col">Amend/Delete</th>
        </tr>
        <tr>
          <%
    While ((Repeat1__numRows <> 0) AND (NOT rec_categories.EOF))
    %>
          <td><label><%=(rec_categories.Fields.Item("categories_id").Value)%>        </label></td>
          <td><label>
            <input type="text" name="cat_name2" id="cat_name" />
            <%=(rec_categories.Fields.Item("categories_name").Value)%></label></td>
          <td><label>
          <img src="_images/<%=(rec_categories.Fields.Item("catergories_image").Value)%>" width="100" height="34" />
    <input type="text" name="cat_image2" id="cat_image" />
            <%=(rec_categories.Fields.Item("catergories_image").Value)%>      </label></td>
          <td><input type="text" name="cat-alt" id="cat-alt" />
            <%=(rec_categories.Fields.Item("catergories_alt").Value)%></td>
          <td><label>
            <input type="submit" name="cat-Amend" id="cat-Amend" value="Amend" />
            <input type="submit" name="cat-delete" id="cat-delete" value="Delete" />
          </label></td>
          <%
      Repeat1__index=Repeat1__index+1
      Repeat1__numRows=Repeat1__numRows-1
      rec_categories.MoveNext()
    Wend
    %>
        </tr>
      </table>
      <input type="hidden" name="MM_recordId" value="<%= rec_categories.Fields.Item("categories_id").Value %>" />
      <input type="hidden" name="MM_delete" value="form2" />
      <input type="hidden" name="MM_update" value="form2" />
    </form>
    <% End If ' end NOT rec_categories.EOF Or NOT rec_categories.BOF %>   ----------Line 216
    John

Maybe you are looking for

  • Oracle BPM 11g Workspace -  Load Management Among Users

    Hi, We are using version Oracle BPM 11g - 11.1.1.5 Feature Pack. Kindly throw light how to distribute work among users in a group. This can be achieved using group rules in BPM workspace. 1. Logged in as weblogic in bpm workspace. 2. Go to Preference

  • Build new database through scripts must understand spanish character sets.

    Hello Gurus, I need some simple advice, a good chance for some quick points for you. I have never built a database to understand any other character set other than American English. I now have to build a database that will be used for Spanish charact

  • Datagrid: Custom Itemrenderer

    Hello, my Datagrid consists of a variable number of columns that are handled by the same Itemrenderer. Now I have the problem that I can't find out which column I belong to when I am in the override set data function. Any hints how i can back track t

  • Incopy files not updating

    Having a problem with Incopy files not updating after designers on Indesign prepare packages on second round of revisions. First, the designers create an Indesign file and prepare a newly created Incopy package. The editors are able to open the packa

  • Take 2 Help

    I just put the take two update on my ATV. I like the new settings and features, but after viewing things for about 5 min the tv screen goes black and then says that there is no signal coming from the ATV. Any ideas as to what the change is?