I am having some difficulty integrating sql into a basic vbscript
What i would like to do-
Connect to the DB and query V_ticket - if no rows are returned have a message pop up. (ultimately ill include a net send command)
If rows are found the script exits.
conn= "DSN=TRAIN;UID=xxx ;PWD=yyyy"
' Begin by getting a connection to the database
set adoConn = CreateObject ("ADODB.Connection")
' Associate a recordset object with the connection
set adoRecord = CreateObject ("ADODB.RecordSet")
adoRecord.ActiveConnection = adoConn
query = "select count(*) FROM dba.v_ticket where add_user = 'ivr01'"
IF adoRecord.Open (query) = 0then
answer=MsgBox("Rows Found",65,"Rows Found")