THIS is what you were not doing in the first two code postings:
Look at your own code (here on multiple lines for clarity):
Code:
wshell.run "D:/InCharge8T2/SAM.Adapters/smarts/bin/sm_arclient.exe " _
& " --server=""remedyserver"" --user=""smartsid"" --password=""smartsid"" " _
& " createEntry ""InCharge SAM Schema"" 2 c ""smarts"" 7 e 1 8 c """ _
& KPname & """ 1042601003 c ""Server"" 1042601004 c ""exchange-server"" " _
& " 1042601007 d ""Paging File Usage High; Paging File Usage% is 98.84; >TH = 95"" "
See? You were using the BARE VARIABLE NAME
kpname.
And that variable came from THIS LINE in your code:
Code:
kpname = ChkString(Request.QueryString("kpname"))
And, as I previously pointed out, since you are *NOT* passing that in the ACTUAL querystring from the first page, it will of course be BLANK!
***********
Again...MAKE UP YOUR MIND. You *CAN* pass kpname in the querystring from the first page, if you wish. Easy to change the code on the first page to do so.
Or you can get it from the recordset.
But it makes no sense to create the recordset and than just ignore the value from the recordset.
Personally, I would get rid of all the sql on that second page, if the ONLY purpose is to get
kpname, and just pass
kpname in the querystring.
You do that in your FIRST PAGE by changing this code:
Code:
<a href="test5.asp?parenteventid=<%response.write rsqdb("parenteventid")%>">
<%response.write rsqdb("ParentEventID")%></a>
to this:
Code:
<%
' you *REALLY* need to URLEncode when you put stuff in a query string:
eid = Server.URLEncode(rsqdb("parenteventid"))
kpname = Server.URLEncode(rsqdb("kpname"))
%>
<a href="test5.asp?parenteventid=<%=eid%>&kpname=<%=kpname%>">
<%=rsqdb("ParentEventID")%>
</a>
Oh...and do learn to use <%=xxx%> in place of <%response.write xxx%>. It makes no difference to ASP but it makes your code tons easier to read and write.