View Single Post
Old 09-17-2012, 07:21 PM   PM User | #4
dalezjc
New Coder

 
Join Date: Jun 2006
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
dalezjc is an unknown quantity at this point
My apology. I was trying to sanitize my code and really jumbled it up. So here's what I'm trying to do.

I want the hyperlink that calls/links to test5.asp to pull the parenteventid and kpname, and the pass that to the exeutable in test5.asp.

Below is the test5.asp that I should have posted:

Code:
<%
Response.Buffer = false
Dim kpname, parenteventid
Function ChkString(string)
If string = "" Then string = " "
ChkString = Replace(string, "'", "'")
End Function

kpname = ChkString(Request.QueryString("kpname"))
parenteventid = ChkString(Request.QueryString("parenteventid"))

set Conn=Server.CreateObject("ADODB.Connection")
set rsqdb = server.CreateObject("ADODB.Recordset")

Conn.open "Provider=sqloledb;Server=server;Initial Catalog=qdb;UID=;PWD=;"

mysql = "SELECT ParentEventID, KPname " _
& " FROM event " _
& " where parenteventid = '" & Request.QueryString("parenteventid") &"' "
Set RS = conn.execute (mysql)

Set WShell = CreateObject("WScript.Shell")
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"" "
Set WShell = nothing

However, I can't figure out the correct syntax for the kpname variable in the command line. I've tried multiple double-quotes/single-quotes with/without spaces. Eventually, everything will get pulled.

Thanks again.

Dale
dalezjc is offline   Reply With Quote