Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

anyone know what err 3134 is ???

Status
Not open for further replies.

iono

Programmer
Oct 14, 2001
31
0
0
GB
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
"
 
From Access help:
Code:
Syntax error in INSERT INTO statement. (Error 3134)

You entered an SQL statement that has an invalid INSERT INTO statement.
Possible causes:

·	A reserved word or argument name is misspelled or missing.
·	Punctuation is incorrect.
 
thanks - doesn't explain why it was working before but that gives me some ideas for checking
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top