PDA

View Full Version : Code works with access/msde but not sql server



shervell
06-27-2002, 01:23 PM
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>

glenngv
06-28-2002, 07:10 AM
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>