gcapp wrote:this code is requesting the field "Parent" from one of the tables in my Access database. So I guess it would be a Request.QueryString. That means it is a $_GET correct?
No, $_GET is a value passed from the querystring (attached to the URL) like this...
http://www.somesite.com?user=fred&age=2 ... status=fat
In this example, the superglobal $_GET array would contain the following values
Code: Select all
$_GET = array(
['user'] => 'fred',
['age'] => 29,
['iq'] => 4,
['status'] => 'fat'
);
If you are pulling information from a database (which it does not look like you ASP code is doing), you would typically be inside of a recordset object...
Code: Select all
<%
' Database connection object
Set cn = Server.CreateObject("ADODB.Connection")
' Database connection string
strConn = "ENTER CONNECTION STRING DETAILS HERE"
' Database connection parameters
strLogin = ""
strPassword = ""
' Connect
cn.open strConn, strLogin, strPassword
' Write a query
sql = "ENTER SOME SQL STATEMENT HERE"
' Open the result the query
Set rs = Server.CreateObject("ADODB.Recordset")
rs.CursorLocation = adUseServer
rs.Open sql, cn, adOpenForwardOnly, adLockReadOnly, adCmdText
' You could also use execute
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Execute sql, cn
%>
This is what your typical connection and query execution might look like in ASP. The code you gave looks like it is taking something from the URL and assigning it to a variable for use in the query later. Please confirm.