Hi,
Just bought DW8 and I noticed, looking at the code created
when creating a
recordset, that they are very different:
DWMX did this:
<%
Dim rsUser__MMColParam
rsUser__MMColParam = "1"
If (Session("MM_Username") <> "") Then
rsUser__MMColParam = Session("MM_Username")
End If
%>
<%
Dim rsUser
Dim rsUser_numRows
Set rsUser = Server.CreateObject("ADODB.Recordset")
rsUser.ActiveConnection = MM_connNAME_STRING
rsUser.Source = "SELECT * FROM dbo.tblNAME WHERE afield = '"
+
Replace(rsUser__MMColParam, "'", "''") + "'"
rsUser.CursorType = 0
rsUser.CursorLocation = 2
rsUser.LockType = 1
rsUser.Open()
rsUser_numRows = 0
%>
Whereas DW8 does this:
<%
Dim rsSupport__MMColParam
rsSupport__MMColParam = "1"
If (Session("MM_Username") <> "") Then
rsSupport__MMColParam = Session("MM_Username")
End If
%>
<%
Dim rsSupport
Dim rsSupport_cmd
Dim rsSupport_numRows
Set rsSupport_cmd = Server.CreateObject ("ADODB.Command")
rsSupport_cmd.ActiveConnection = MM_connNAME_STRING
rsSupport_cmd.CommandText = "SELECT * FROM dbo.tblNAME WHERE
afield = '" +
Replace(rsSupport__MMColParam, "'", "''") + "'"
rsSupport_cmd.Prepared = true
rsSupport_cmd.Parameters.Append
rsSupport_cmd.CreateParameter("param1", 5,
1, -1, rsSupport__MMColParam) ' adDouble
Set rsSupport = rsSupport_cmd.Execute
rsSupport_numRows = 0
%>
Problem is, we are trying to display an ntext field on our
ASP page but,
using the newly created DW8 recordset, we can't seem to
change the cursor
type from Forward Only to Static, which used to appear in the
properties for
the recordset. Changing to Static used to solve this problem
for us, but
now we're a little stumped. Hope someone can help. Thanks.
Regards
Nath.