I have a routine written in vb6 which accesses data (held in msaccess 2000) - since moving the db to a server the routine fails with 'err 3134'
code is as follows (has been running fine standalone for three years)
"
Private Sub cmdReimburse_Click()
Dim PrelunaDBS As Database
Set PrelunaDBS = OpenDatabase(LocationDB)
X = MsgBox("Are you sure you want to do this ? - this process will write all payments to the history file and zero all balances", vbYesNo, "Preluna Payments - Warning !"
If X = 6 Then
On Error GoTo NoPayments
dtaPayments.Refresh
dtaPayments.Recordset.MoveFirst
While Not dtaPayments.Recordset.EOF
dtaPayments.Recordset.Edit
dtaPayments.Recordset("Reimbursed"
= Date$
dtaPayments.Recordset.Update
dtaPayments.Recordset.MoveNext
Wend
'SQLStmt = "insert into Payments in 'c:\program files\prelunapayments\history.mdb' select * from Payments;"
SQLStmt = "insert into Payments in " & LocHistoryDB & " select * from Payments;"
PrelunaDBS.Execute SQLStmt, dbFailOnError
SQLStmt = "delete * from payments;"
PrelunaDBS.Execute SQLStmt, dbFailOnError
X = MsgBox("Clear All Payments Processing Completed", vbOKOnly)
Else
Exit Sub
End If
NoPayments:
If Err = 3021 Then
X = MsgBox("There are no payments to be reimbursed", vbOKOnly)
Exit Sub
End If
End Sub
"
code is as follows (has been running fine standalone for three years)
"
Private Sub cmdReimburse_Click()
Dim PrelunaDBS As Database
Set PrelunaDBS = OpenDatabase(LocationDB)
X = MsgBox("Are you sure you want to do this ? - this process will write all payments to the history file and zero all balances", vbYesNo, "Preluna Payments - Warning !"
If X = 6 Then
On Error GoTo NoPayments
dtaPayments.Refresh
dtaPayments.Recordset.MoveFirst
While Not dtaPayments.Recordset.EOF
dtaPayments.Recordset.Edit
dtaPayments.Recordset("Reimbursed"
dtaPayments.Recordset.Update
dtaPayments.Recordset.MoveNext
Wend
'SQLStmt = "insert into Payments in 'c:\program files\prelunapayments\history.mdb' select * from Payments;"
SQLStmt = "insert into Payments in " & LocHistoryDB & " select * from Payments;"
PrelunaDBS.Execute SQLStmt, dbFailOnError
SQLStmt = "delete * from payments;"
PrelunaDBS.Execute SQLStmt, dbFailOnError
X = MsgBox("Clear All Payments Processing Completed", vbOKOnly)
Else
Exit Sub
End If
NoPayments:
If Err = 3021 Then
X = MsgBox("There are no payments to be reimbursed", vbOKOnly)
Exit Sub
End If
End Sub
"