I am new to VBscript and am trying to pull a record using a variable (numeric) from another record. I keep getting an error and don't know enough to know how to fix it. I am using dreamweaver to build the script. Can someone please help?
Here is may code:
<%
Dim rate_type__mm_var
rate_type__mm_var = "0"
If (Request.Form("custom") <> "") Then
rate_type__mm_var = Request.Form("custom")
End If
Dim rate_type
Dim rate_type_numRows
Set rate_type = Server.CreateObject("ADODB.Recordset")
rate_type.ActiveConnection = MM_kradb_STRING
rate_type.Source = "SELECT * FROM Rate_Information WHERE rate_type_id=" + Replace(rate_type__mm_var, "'", "''") + ""
rate_type.CursorType = 0
rate_type.CursorLocation = 2
rate_type.LockType = 1
rate_type.Open()
rate_type_numRows = 0
rate_type.Close()
Set rate_type = Nothing
%>
Here is may code:
<%
Dim rate_type__mm_var
rate_type__mm_var = "0"
If (Request.Form("custom") <> "") Then
rate_type__mm_var = Request.Form("custom")
End If
Dim rate_type
Dim rate_type_numRows
Set rate_type = Server.CreateObject("ADODB.Recordset")
rate_type.ActiveConnection = MM_kradb_STRING
rate_type.Source = "SELECT * FROM Rate_Information WHERE rate_type_id=" + Replace(rate_type__mm_var, "'", "''") + ""
rate_type.CursorType = 0
rate_type.CursorLocation = 2
rate_type.LockType = 1
rate_type.Open()
rate_type_numRows = 0
rate_type.Close()
Set rate_type = Nothing
%>