Results 1 to 2 of 2

Thread: [RESOLVED] MySql - Error with stored

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2005
    Posts
    87

    Resolved [RESOLVED] MySql - Error with stored

    Hi! Well, I have been fighting with this stored for quite a time... honestly I dont know whats the problem here. I checked it and re made it many times but nothing. Does any1 knows the problem?

    Thanks!!

    DELIMITER $$;

    DROP PROCEDURE IF EXISTS `sistema`.`NuevoProducto`$$

    CREATE DEFINER=`root`@`localhost` PROCEDURE `NuevoProducto`(IDProd int, Cod varchar, Descri varchar, Foto varchar, Rub int, SubRub int, FechaA date, IDUsu int, Empre int, Sucur int)
    BEGIN
    INSERT INTO Productos(IdProducto, Codigo, Descripcion, FotoPath, Rubro, SubRubro, FechaAlta, UserALTA, Empresa, Sucursal) Values (IDProd, Cod, Descri, Foto, Rub, SubRub, FechaA, IDUsu, Empre, Sucur);
    END$$

    DELIMITER ;$$
    (0 row(s) affected)
    (0 ms taken)

    Error Code : 1064
    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' Descri varchar, Foto varchar, Rub int, SubRub int, FechaA date, IDUsu int, Empr' at line 1
    (0 ms taken)

  2. #2

    Thread Starter
    Lively Member
    Join Date
    Jan 2005
    Posts
    87

    Re: MySql - Error with stored

    Solved::

    vb Code:
    1. DELIMITER $$;
    2.  
    3. DROP PROCEDURE IF EXISTS`NuevoProducto`$$
    4.  
    5. CREATE PROCEDURE `NuevoProducto`(
    6. IN IDProd int,
    7. IN Cod varchar(20),
    8. IN Descri varchar(20),
    9. IN Foto varchar(20),
    10. IN Rub int,
    11. IN SubRub int,
    12. IN FechaA date,
    13. IN IDUsu int,
    14. IN Empre int,
    15. IN Sucur int)
    16. BEGIN
    17. INSERT INTO Productos(IdProducto, Codigo, Descripcion, FotoPath, Rubro, SubRubro, FechaAlta, UserALTA, Empresa, Sucursal)
    18. VALUES(IDProd, Cod, Descri, Foto, Rub, SubRub, FechaA, IDUsu, Empre, Sucur);
    19. END$$
    20.  
    21. DELIMITER ;$$

Posting Permissions

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



Click Here to Expand Forum to Full Width