-
What would be the proper sytax to combine these two line of code...
I am kinda lost with all these single and double quotation marks..
Sniplet #1
============================================================
set rsRAM = conn.Execute("Select * from TVIMAIN WHERE SYSCAT Like '" _
& Request.QueryString("SystemId") &"' AND ITEMTYPE = 'RAM'")
============================================================
Sniplet #2
============================================================
Like '*' & 'd' & '*'
============================================================
The second sniplet would need to go around the Request.Querystring less the 'd' in the first sniplet
To maybe explain it a little simpler the 'd' in the second sniplet is what I would like to replace with the request.query string in the first sniplet but have the code read in the same layout as the first sniplet of code
Kind Regards,
Hakan
-
like this?
set rsRAM = conn.Execute("Select * from TVIMAIN WHERE SYSCAT Like '*" & Request.QueryString("SystemId") & "*' AND ITEMTYPE = 'RAM'")
-
Thanks again Tom... I have inserted your code in place of my exsisting code and have come to notice that my dropdown box is coming back with an error. Within the drop down box the error reads:
ADODB.Field error '80020009' Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record. /tvi/system_config.asp, line 0
I have checked to code for what I can recognize as typo's but I could not find any... I checked my drop down box code for typo's also could not find any. I checked the DB to make sure that maybe I had not played around with the Column names or something... Everything checked out...
Any Ideas??
Kind Regards,
Hakan
-
The wildcard character fro ADO is % not * so try this statement:
Code:
set rsRAM = conn.Execute("Select * from TVIMAIN WHERE SYSCAT Like '%" & Request.QueryString("SystemId") & "%' AND ITEMTYPE = 'RAM'")
Hope this helps
-
Yes... that worked perfect... Thank you both for your help...
Kind Regards,
Hakan
-
My bad, nice catch Negative0