Results 1 to 9 of 9

Thread: Macro

  1. #1
    Join Date
    Feb 2004
    Location
    Alpine Califormia
    Posts
    1,789

    Unhappy Unanswered: 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?? please

  2. #2
    Join Date
    Aug 2002
    Location
    Scotland
    Posts
    1,578
    From where you're trying to execute, I've never come across in SQL server.
    --Satya SKJ
    Microsoft SQL Server MVP
    [IMG]http://sqlserver-qa.net/google_bart.gif[/IMG]

  3. #3
    Join Date
    Feb 2004
    Posts
    492
    Probably way off here but is it possible a return value that is expected but not given?

  4. #4
    Join Date
    Feb 2004
    Location
    Alpine Califormia
    Posts
    1,789

    Sql

    This is the stored procedure I am using
    Code:
    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
    Last edited by desireemm; 04-15-09 at 17:23.

  5. #5
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Why not just use a pass thu?
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  6. #6
    Join Date
    Feb 2004
    Posts
    492
    Quote Originally Posted by desireemm
    IF @@Error <> '0'
    RETURN
    GO
    In your case, 0 is always returned. Does the data get inserted? Does the macro always indicate "Action Failed"?

  7. #7
    Join Date
    Feb 2004
    Location
    Alpine Califormia
    Posts
    1,789

    yes

    Yes the data does get inserted, and yes the macro is always indicates failed action

  8. #8
    Join Date
    Feb 2004
    Location
    Alpine Califormia
    Posts
    1,789

    Access 2002 Xp

    Access xp has no problems with this, access 2000 apparently has a problem

  9. #9
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Do the sprocs get listed in your macro drop down list?

    I betcha it's a connectivity thing...
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •