I need some help.
I have a sql select statement that I would like to place in an include file.
The SQL select statement is fed variables from the page.
For Instance
<%
Dim manuID, CatID
manuID=6
CatID="'part','processor'"
Dim objRS
Set objRs = Server.Createobject("ADODB.Recordset")
objRs.Open "SELECT Brand, ProdID, ProdURL, ProdSKU, Category, ThumbImageURL, LinkText, ProdURL, ProdMiniDescription, manufacturer, ThumbAltText FROM TABLE WHERE Manufacturer='"& manuID & "' and Category in ("& catID &")", objCn, 1, 3
%>
The recordset is used later in the page via a sub procedure.
What I did was move the code from DIM objRS to the closing bracket to my connections include file and then the sub stopped working.
Any tips?
tried it as a sub and function
I have a sql select statement that I would like to place in an include file.
The SQL select statement is fed variables from the page.
For Instance
<%
Dim manuID, CatID
manuID=6
CatID="'part','processor'"
Dim objRS
Set objRs = Server.Createobject("ADODB.Recordset")
objRs.Open "SELECT Brand, ProdID, ProdURL, ProdSKU, Category, ThumbImageURL, LinkText, ProdURL, ProdMiniDescription, manufacturer, ThumbAltText FROM TABLE WHERE Manufacturer='"& manuID & "' and Category in ("& catID &")", objCn, 1, 3
%>
The recordset is used later in the page via a sub procedure.
What I did was move the code from DIM objRS to the closing bracket to my connections include file and then the sub stopped working.
Any tips?
tried it as a sub and function