Both Script dont work, mi setup is :i have two odbc conections in a windows 2008R2 64 bits which is where i have forefront TMG installed i send the TMG logs to a remote SQL 2005 server , i create like i say two odbc connections just to run the vbscripts “DSN=BaseTMGW and “DSN=BaseTMGF one is for te Firewall database and the otherone is for the Web database, for that reason i have two scripts , the TMG i sending the logs ok , but the databases are geting biger and bigger and y need that two scripts to schedule a task that can delete logs older than: “delete FROM WebProxyLog WHERE logtime <= getdate()-60" and the error im getting is:
(4,34) Microsoft Vbscript compilation error Invalid caracter
Thanks in advance for you help
-------------------------------------------------------------------------------------------
Const adOpenStatic = 3
Const adLockOptimistic = 3
Const adUseClient = 3
Set objConnection = CreateObject(“ADODB.Connection”)
objConnection.ConnectionTimeout=1200
objConnection.Open “DSN=BaseTMGW;UID=PTMGUSR;PWD=K/00RdWjFK0Dg8MFF4MEX7”
objConnection.EXECUTE “delete FROM WebProxyLog WHERE logtime <= getdate()-60"
objConnection.Close
--------------------------------------------------------------------------------------------
Const adOpenStatic = 3
Const adLockOptimistic = 3
Const adUseClient = 3
Set objConnection = CreateObject(“ADODB.Connection”)
objConnection.ConnectionTimeout=1200
objConnection.Open “DSN=BaseTMGF;UID=PTMGUSR;PWD=K/00RdWjFK0Dg8MFF4MEX7”
objConnection.EXECUTE “delete FROM Firewall WHERE logtime <= getdate()-60"
objConnection.Close