Saturday, February 25, 2012

Macro

Has anyone ever tried to run a stored procedure through a macro before?? And If so do you get a message that says that the stored procedure exectuted successfully but a macro Halt macro message that says "Action Failed"?? Now the stored procedure executes just fine its just that the macro itself is having some trouble. Can anyone help me?? pleaseFrom where you're trying to execute, I've never come across in SQL server.|||Probably way off here but is it possible a return value that is expected but not given?|||This is the stored procedure I am using

CREATE PROCEDURE [InsertTerms]
AS
INSERT INTO [GamingCommissiondb].[dbo].[TERMINATION] ( [TM #],
[FirstName],
[LastName],
[SocialSecurityNumber],
[DateHired],
[Status],
[Title],
[DepartmentName])

SELECT a.TM#, a.FirstName, a.LASTNAME, a.SSN#, a.HIREDATE, a.STATUS, a.JOBTITLE, a.DEPT#
FROM EmployeeGamingLicense AS a
WHERE a.STATUS = 'TERMINATED'
IF @.@.Error <> '0'
RETURN
GO

this is the macro that executes it|||Why not just use a pass thu?|||IF @.@.Error <> '0'
RETURN
GO

In your case, 0 is always returned. Does the data get inserted? Does the macro always indicate "Action Failed"?|||Yes the data does get inserted, and yes the macro is always indicates failed action|||Access xp has no problems with this, access 2000 apparently has a problem|||Do the sprocs get listed in your macro drop down list?

I betcha it's a connectivity thing...

No comments:

Post a Comment