Hi
I have an adp with SQL 2000 backend. I am trying to execute a stored procedure via Visual Basic using:
Private Sub Command1_Click()
On Error GoTo Err_Command1_Click
Dim stDocName As String
DoCmd.SetWarnings (False)
DoCmd.OpenStoredProcedure "Append"
DoCmd.SetWarnings (True)
Exit_Command1_Click:
Exit Sub
Err_Command1_Click:
MsgBox Err.Description
Resume Exit_Command1_Click
End Sub
The problem that I have is that I get an error message saying:
Microsoft Access can't find the object 'Append.'
Its sat quite happily in my database and I can execute it manually if I want to.
The stored procedure actually works though:
Alter PROCEDURE [dbo].Append AS
set nocount on
INSERT INTO [Training History] ( EmployeeID, TrainingDate, TrainingProvider, TrainingType, TrainingNotes )
SELECT [Employee Data].EmployeeID, [Employee Data].TempTrainingDate, [Employee Data].TempTrainingProvider, [Employee Data].TempTrainingType, [Employee Data].TempTrainingNotes
FROM [Employee Data]
where employeeid is not null and TempTrainingDate is not null
The data that I want to insert goes into the table OK
Any help much appreciated!
Thanks
George
I have an adp with SQL 2000 backend. I am trying to execute a stored procedure via Visual Basic using:
Private Sub Command1_Click()
On Error GoTo Err_Command1_Click
Dim stDocName As String
DoCmd.SetWarnings (False)
DoCmd.OpenStoredProcedure "Append"
DoCmd.SetWarnings (True)
Exit_Command1_Click:
Exit Sub
Err_Command1_Click:
MsgBox Err.Description
Resume Exit_Command1_Click
End Sub
The problem that I have is that I get an error message saying:
Microsoft Access can't find the object 'Append.'
Its sat quite happily in my database and I can execute it manually if I want to.
The stored procedure actually works though:
Alter PROCEDURE [dbo].Append AS
set nocount on
INSERT INTO [Training History] ( EmployeeID, TrainingDate, TrainingProvider, TrainingType, TrainingNotes )
SELECT [Employee Data].EmployeeID, [Employee Data].TempTrainingDate, [Employee Data].TempTrainingProvider, [Employee Data].TempTrainingType, [Employee Data].TempTrainingNotes
FROM [Employee Data]
where employeeid is not null and TempTrainingDate is not null
The data that I want to insert goes into the table OK
Any help much appreciated!
Thanks
George