Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jun 2002
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy Code works with access/msde but not sql server

    I've upgraded access2000 with MSDE TO SQL Server & my ASP code that worked fine now only submits the string "letter" for type no matter what selection on the form is made. I've looked at the code & it appears that maybe the value for entrytype isn't being updated,I'm really not sure what could cause this as everything else with the web pages work fine with SQL Server...except this. Is MoveFirst & MoveNext not supported when you migrate?

    Can you anyone help?

    Heres the declarations for the form select box:

    <%
    set rsEntryTypes = Server.CreateObject("ADODB.Recordset")
    rsEntryTypes.ActiveConnection = MM_OLEBDSQLSvrMaintenance_STRING
    rsEntryTypes.Source = "SELECT EntryType FROM dbo.tblEntryTypes"
    rsEntryTypes.CursorType = 0
    rsEntryTypes.CursorLocation = 2
    rsEntryTypes.LockType = 3
    rsEntryTypes.Open()
    rsEntryTypes_numRows = 0
    %>

    &

    then later:

    <td class="body" nowrap>
    <select name="selectType" class="body">
    <option value="Select">Select</option>
    <%
    While (NOT rsEntryTypes.EOF)
    %>
    <option value="<%=(rsEntryTypes.Fields.Item("EntryType").Value)%>" ><%=(rsEntryTypes.Fields.Item("EntryType").Value)%></option>
    <%
    rsEntryTypes.MoveNext()
    Wend
    If (rsEntryTypes.CursorType > 0) Then
    rsEntryTypes.MoveFirst
    Else
    rsEntryTypes.Requery
    End If
    %>
    </select>
    <input type="hidden" name="hiddenField" value="<%=Request.QueryString("CompanyID")%>">
    <input type="hidden" name="GroupCo" value="<%=Request.Cookies("DATASET")%>">
    </td>
    </tr>

  • #2
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    10,946
    Thanks
    0
    Thanked 236 Times in 233 Posts

    Re: Code works with access/msde but not sql server

    when you click View-Source, what are the value of the option tags, are they not the same?

    Originally posted by shervell
    I've upgraded access2000 with MSDE TO SQL Server & my ASP code that worked fine now only submits the string "letter" for type no matter what selection on the form is made. I've looked at the code & it appears that maybe the value for entrytype isn't being updated,I'm really not sure what could cause this as everything else with the web pages work fine with SQL Server...except this. Is MoveFirst & MoveNext not supported when you migrate?

    Can you anyone help?

    Heres the declarations for the form select box:

    <%
    set rsEntryTypes = Server.CreateObject("ADODB.Recordset")
    rsEntryTypes.ActiveConnection = MM_OLEBDSQLSvrMaintenance_STRING
    rsEntryTypes.Source = "SELECT EntryType FROM dbo.tblEntryTypes"
    rsEntryTypes.CursorType = 0
    rsEntryTypes.CursorLocation = 2
    rsEntryTypes.LockType = 3
    rsEntryTypes.Open()
    rsEntryTypes_numRows = 0
    %>

    &

    then later:

    <td class="body" nowrap>
    <select name="selectType" class="body">
    <option value="Select">Select</option>
    <%
    While (NOT rsEntryTypes.EOF)
    %>
    <option value="<%=(rsEntryTypes.Fields.Item("EntryType").Value)%>" ><%=(rsEntryTypes.Fields.Item("EntryType").Value)%></option>
    <%
    rsEntryTypes.MoveNext()
    Wend
    If (rsEntryTypes.CursorType > 0) Then
    rsEntryTypes.MoveFirst
    Else
    rsEntryTypes.Requery
    End If
    %>
    </select>
    <input type="hidden" name="hiddenField" value="<%=Request.QueryString("CompanyID")%>">
    <input type="hidden" name="GroupCo" value="<%=Request.Cookies("DATASET")%>">
    </td>
    </tr>


  •  

    Posting Permissions

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