Link to home
Start Free TrialLog in
Avatar of tacobell1234
tacobell1234

asked on

Cursortype management with Dreamweaver CS3

Hello,

I recently upgraded to CS3 from Dreamweaver MX and was surprised to discover that the automatic coding for Recordsets had changed quite a lot. The software now generates commands rather than recordsets.  (SEE BELOW)
Problem is, the default cursortype generated by the new code is obviously not the one I need (ie '1'), and some fields in my asp page aren't getting populated.

Would anyone know how to get Dreamweaver CS3 to kindly let me choose my cursortype, and lacking this, how to change it manually ?
Set Recordset7 = Server.CreateObject("ADODB.Recordset")
Recordset7.ActiveConnection = MM_ttt_STRING
Recordset7.Source = "SELECT * FROM fff WHERE fff = " + Replace(Recordset7__MMColParam, "'", "''") + ""
Recordset7.CursorType = 1
Recordset7.CursorLocation = 2
Recordset7.LockType = 1
Recordset7.Open()
 
became this:
 
Set Recordset1_cmd = Server.CreateObject ("ADODB.Command")
Recordset1_cmd.ActiveConnection = MM_ttt_STRING
Recordset1_cmd.CommandText = "SELECT * FROM tttt WHERE ID_tttt = ?" 
Recordset1_cmd.Prepared = true
Recordset1_cmd.Parameters.Append Recordset1_cmd.CreateParameter("param1", 5, 1, -1, Recordset1__MMColParam) ' adDouble
Set Recordset1 = Recordset1_cmd.Execute

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Jason C. Levine
Jason C. Levine
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial