File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

MySQL 5.0 and stored procedures..

 
Balaji Loganathan
author and deputy
Bartender
Posts: 3150
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Have anyone tried using stored procedure in mysql 5.0?.
I am quite familiar in using stored procedure with MS sql server, but somehow i am always getting "check your syntax error" in mysql 5.0 while trying stored procedure.

If you some good links that you have tried already, please let me know.
Cheers
Balaji
 
Talhah Mafawalla
Greenhorn
Posts: 24
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Balaji,

You can try searching for stored procedures on the following link:
http://dev.mysql.com/doc/refman/5.0/en/

Or download the MySQL documentation on this link:
http://dev.mysql.com/doc/index.html

Hope this helps
 
Mathias Nilsson
Ranch Hand
Posts: 367
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A test




.. Works. Every line must end with ;
 
Balaji Loganathan
author and deputy
Bartender
Posts: 3150
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mathias,
Thanks for the test code. Sorry for my late reply.
I still couldn't able to get through with it. I am using windows mysql administrator connected to redhat mysql5.0.

If i have a simple table called "Employee" with two columns Name & Age
Table: Employee
Column1: Name - VARCHAR(255)
Column2: Age - INT

then how would the stored procedure for inserting datas will look like ?
 
Balaji Loganathan
author and deputy
Bartender
Posts: 3150
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Finally i got it working, i will soon write here how i did it.
 
Balaji Loganathan
author and deputy
Bartender
Posts: 3150
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Balaji Loganathan:
Finally i got it working, i will soon write here how i did it.

Well here is a very well written document.. http://dev.mysql.com/tech-resources/articles/mysql-storedprocedures.pdf
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic