I am attempting to retreive and display information relative to its
"product code". Below is an example of what I am doing. It is currently allowing me to see and display ONLY records in which a product code exists. My problem is that I also need to reference other relevant information for any record in which a product code DOES NOT exist, and am having trouble making the bind. Here is code I am using to get (only) the product code information:
If (Request("ProdID") <> "") Then
Set oData = Server.CreateObject("ADODB.Recordset")
oData.ActiveConnection = Application.Value("DSN")
oData.Source = "SELECT * FROM dbo.pd_final" & sPubID & " ORDER BY Mn_srt_ord ASC"
oData.CursorType = 0
oData.CursorLocation = 3
oData.LockType = 3
oData.Open()
sID = Trim(Request("ProdID"))
sFilter = "Pc_prd_cd = '" & sID & "'"
oData.Filter = sFilter
End If
Additionally the 'other' information relative to the same company is displaying in another recordset (by itself) like this:
If (Request("Company") <> "") Then
Set oData = Server.CreateObject("ADODB.Recordset")
oData.ActiveConnection = Application.Value("DSN")
oData.Source = "SELECT * FROM dbo.pd_final" & sPubID & " WHERE Mn_lst_cd = 'S' ORDER BY Mn_coname ASC"
oData.CursorType = 0
oData.CursorLocation = 3
oData.LockType = 3
oData.Open()
sCompany = Trim(Request("Company"))
sFilter = "Mn_acct LIKE '%" & sCompany & "%'"
oData.Filter = sFilter
End If
I dont know how to bring these together to allow me to filter by "product code" while also providing me the information I need on the company ("S"). I can only seem to get one or the other.
Can anyone help me?
Please?
Jared Wuliger
jared@oxcyon.com
www.oxcyon.com