Hi all,
I have what seems to be a simple question. However, I can't find much online info on this question.
I have two pages the 1st has hyperlinks to an asp page. the hyperlink is passing a parameter:
Ex: ...=" target="_blank">See account table:</a>
This is passing the FIELD parameter with value acconame (i hope)
The ASP page has simple syntax like this:
Page 2-------------------
<% set Conn = Server.CreateObject("ADODB.Connection"
Conn.open "MyDB", "user" ,""
SQL="SELECT ::Field:: from acco "
set RS = Conn.Execute(SQL)
%>
<P>
<TABLE BORDER=1>
<TR>
<% For i = 0 to RS.Fields.Count - 1 %>
<TD><B><%= RS(i).Name %></B></TD>
<% Next %>
</TR>
<% DO While Not RS.EOF %>
<TR>
<% For i = 0 to RS.Fields.Count - 1 %>
<TD VALIGN=TOP>
<%= RS(i) %>
</TD>
<% Next %>
</TR>
<%
RS.MoveNext
Loop
RS.Close
Conn.Close
%>
</Table>
------------------
My questions is in regards to the SQL syntax. If I "hard code" the SQL, it works fine, but when I try to call in the parameter, it does not work.
I got the idea of using the :arameter:: from MS Frontpage, but have no clue if this is correct syntax.
Any thoughts on how to pass and then call a variable(parameter) I would appreciate it.
Regards,
Mike
I have what seems to be a simple question. However, I can't find much online info on this question.
I have two pages the 1st has hyperlinks to an asp page. the hyperlink is passing a parameter:
Ex: ...=" target="_blank">See account table:</a>
This is passing the FIELD parameter with value acconame (i hope)
The ASP page has simple syntax like this:
Page 2-------------------
<% set Conn = Server.CreateObject("ADODB.Connection"
Conn.open "MyDB", "user" ,""
SQL="SELECT ::Field:: from acco "
set RS = Conn.Execute(SQL)
%>
<P>
<TABLE BORDER=1>
<TR>
<% For i = 0 to RS.Fields.Count - 1 %>
<TD><B><%= RS(i).Name %></B></TD>
<% Next %>
</TR>
<% DO While Not RS.EOF %>
<TR>
<% For i = 0 to RS.Fields.Count - 1 %>
<TD VALIGN=TOP>
<%= RS(i) %>
</TD>
<% Next %>
</TR>
<%
RS.MoveNext
Loop
RS.Close
Conn.Close
%>
</Table>
------------------
My questions is in regards to the SQL syntax. If I "hard code" the SQL, it works fine, but when I try to call in the parameter, it does not work.
I got the idea of using the :arameter:: from MS Frontpage, but have no clue if this is correct syntax.
Any thoughts on how to pass and then call a variable(parameter) I would appreciate it.
Regards,
Mike