|
-
Jun 16th, 2000, 12:08 AM
#1
Thread Starter
Member
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
-
Jun 17th, 2000, 04:12 AM
#2
Guru
like this?
set rsRAM = conn.Execute("Select * from TVIMAIN WHERE SYSCAT Like '*" & Request.QueryString("SystemId") & "*' AND ITEMTYPE = 'RAM'")
-
Jun 18th, 2000, 08:38 PM
#3
Thread Starter
Member
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
-
Jun 18th, 2000, 10:37 PM
#4
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
-
Jun 18th, 2000, 10:42 PM
#5
Thread Starter
Member
Yes... that worked perfect... Thank you both for your help...
Kind Regards,
Hakan
-
Jun 18th, 2000, 11:06 PM
#6
Guru
My bad, nice catch Negative0
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|