![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I need an activeX script that will: Query a table in my database: Select FailReason from ErrorLog where DateOfFileCopy = getDate() I want to store the result in a variable called flds. then: If Flds = 0 Then DTSGlobalVariables("ExecuteTruePath").Value = True Else DTSGlobalVariables("ExecuteTruePath").Value = False End If Help????? I can't fill in the missing pieces (i.e, the get the data part) Thanks |
#3
| |||
| |||
|
|
update: This is as far as i have gotten with this: '************************************************* ******************** * ' Visual Basic ActiveX Script '************************************************* ******************** *** Option Explicit Public Function Main() Dim db as Database, myRecordset as Recordset, mySQLCmdText as string mySQLCmdText = "Select FailReason from [ErrorLog] where [DateOfFileCopy] = getDate()" set myRecordset = db.OpenRecordSet(mySQLCmdText) If myRecordset![FailReason] = 0 Then DTSGlobalVariables("ExecuteTruePath").Value = True Else DTSGlobalVariables("ExecuteTruePath").Value = False End If Main = DTSTaskExecResult_Success End Function ================================================ "JuiceN" wrote: I need an activeX script that will: Query a table in my database: Select FailReason from ErrorLog where DateOfFileCopy = getDate() I want to store the result in a variable called flds. then: If Flds = 0 Then DTSGlobalVariables("ExecuteTruePath").Value = True Else DTSGlobalVariables("ExecuteTruePath").Value = False End If Help????? I can't fill in the missing pieces (i.e, the get the data part) Thanks |
![]() |
| Thread Tools | |
| Display Modes | |
| |