Nugs
asked on
Recordset filtering
Hey there again,
I was wondering, i have a asp page setup to filter the recordset acording to the URL parameter and the column in the database called sectCode .. eg. when the url parameter reads ?sectCode=web then it filters all the records with "web" in the db's sectCode field. What i want to be able to do is give the records the ability to be in more than one section. So the sectCode filed in the database will read "web, print" and when filtering for web, it will find the records, and when filtering for print it will find the record. Is there a way i can do this?
Nugs
I was wondering, i have a asp page setup to filter the recordset acording to the URL parameter and the column in the database called sectCode .. eg. when the url parameter reads ?sectCode=web then it filters all the records with "web" in the db's sectCode field. What i want to be able to do is give the records the ability to be in more than one section. So the sectCode filed in the database will read "web, print" and when filtering for web, it will find the records, and when filtering for print it will find the record. Is there a way i can do this?
Nugs
ASKER
Yes i thought there would be a little SQL to do the trick, not sur how to implement that so if you could i would appreciate any help.
Here is the current recordset code for the page:
<%
Dim SectionSlides__MMColParam
SectionSlides__MMColParam = "1"
If (Request.QueryString("Sect Code") <> "") Then
SectionSlides__MMColParam = Request.QueryString("SectC ode")
End If
%>
<%
Dim SectionSlides
Dim SectionSlides_numRows
Set SectionSlides = Server.CreateObject("ADODB .Recordset ")
SectionSlides.ActiveConnec tion = MM_portfolioConn_STRING
SectionSlides.Source = "SELECT * FROM SectionSlides WHERE SectCode = '" + Replace(SectionSlides__MMC olParam, "'", "''") + "'"
SectionSlides.CursorType = 0
SectionSlides.CursorLocati on = 2
SectionSlides.LockType = 1
SectionSlides.Open()
SectionSlides_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index
Repeat1__numRows = -1
Repeat1__index = 0
SectionSlides_numRows = SectionSlides_numRows + Repeat1__numRows
%>
Would i change the following line?
SectionSlides.Source = "SELECT * FROM SectionSlides WHERE SectCode = '" + Replace(SectionSlides__MMC olParam, "'", "''") + "'"
Thanks for the help!
Nugs
Here is the current recordset code for the page:
<%
Dim SectionSlides__MMColParam
SectionSlides__MMColParam = "1"
If (Request.QueryString("Sect
SectionSlides__MMColParam = Request.QueryString("SectC
End If
%>
<%
Dim SectionSlides
Dim SectionSlides_numRows
Set SectionSlides = Server.CreateObject("ADODB
SectionSlides.ActiveConnec
SectionSlides.Source = "SELECT * FROM SectionSlides WHERE SectCode = '" + Replace(SectionSlides__MMC
SectionSlides.CursorType = 0
SectionSlides.CursorLocati
SectionSlides.LockType = 1
SectionSlides.Open()
SectionSlides_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index
Repeat1__numRows = -1
Repeat1__index = 0
SectionSlides_numRows = SectionSlides_numRows + Repeat1__numRows
%>
Would i change the following line?
SectionSlides.Source = "SELECT * FROM SectionSlides WHERE SectCode = '" + Replace(SectionSlides__MMC
Thanks for the help!
Nugs
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If you have the source i'll have a look.....
I dont think DW set dialog boxes can cope with this " complex instructions " ummmm complex my A***** lol
Simple stuff yeh.....
G