Kebabmeister
Programmer
The code below moves files between locations and then reports activity. The code works fine in actuate but when I try to run it from the server it throws up the error "Unterminated string constant"
Any help gratefully received.
Function Fetch( ) As AcDataRow
Dim Row As DataRow1
Dim Result As Integer
Dim Filename As String
Dim ComparisonStr As String
If Row Is Nothing Then
Set Row = New DataRow1
AddRow(Row)
End If
If b_UserRequestedExit = True Then
Exit Function
End If
ExtendSearchPath(LivePath)
chdir(LivePath)
Filename = InputBox("Enter the query name to archive","Archive Query","<Query Name>")
ComparisonStr = FindFile(FileName + Extension)
If ComparisonStr = "" and Ucase(FileName) <> "QUIT" Then
Result = MsgBox("Query not found",MB_OK,"Failed Query Archiving")
ElseIf ComparisonStr <> "" Then
Result = MsgBox("Confirm Query Archiving?",MB_OKCANCEL,"Archive Query")
If result = 1 Then
Name (Livepath + Filename + Extension) As (ArchivePath + FileName + Extension)
End If
End If
If ComparisonStr <> "" Then
Row.Filename = "Archived <" + FileName + ">"
Row.WhenDone = Now
Else
Row.Filename = "Failed Archiving <" + FileName + ">"
Row.WhenDone = Now
End If
If Ucase(FileName) = "QUIT" Then
Row.Filename = "Quit Command"
Row.WhenDone = Now
b_UserRequestedExit = True
End If
Set Fetch = Row
End Function
Any help gratefully received.
Function Fetch( ) As AcDataRow
Dim Row As DataRow1
Dim Result As Integer
Dim Filename As String
Dim ComparisonStr As String
If Row Is Nothing Then
Set Row = New DataRow1
AddRow(Row)
End If
If b_UserRequestedExit = True Then
Exit Function
End If
ExtendSearchPath(LivePath)
chdir(LivePath)
Filename = InputBox("Enter the query name to archive","Archive Query","<Query Name>")
ComparisonStr = FindFile(FileName + Extension)
If ComparisonStr = "" and Ucase(FileName) <> "QUIT" Then
Result = MsgBox("Query not found",MB_OK,"Failed Query Archiving")
ElseIf ComparisonStr <> "" Then
Result = MsgBox("Confirm Query Archiving?",MB_OKCANCEL,"Archive Query")
If result = 1 Then
Name (Livepath + Filename + Extension) As (ArchivePath + FileName + Extension)
End If
End If
If ComparisonStr <> "" Then
Row.Filename = "Archived <" + FileName + ">"
Row.WhenDone = Now
Else
Row.Filename = "Failed Archiving <" + FileName + ">"
Row.WhenDone = Now
End If
If Ucase(FileName) = "QUIT" Then
Row.Filename = "Quit Command"
Row.WhenDone = Now
b_UserRequestedExit = True
End If
Set Fetch = Row
End Function