Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > MySQL
|
MySQL General discussion about the MySQL database.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the MySQL section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 23rd, 2006, 02:10 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default Syntax Error -- BUG REPORT Solved

--I have solved this problem by rolling back my version of Query Browser to 1.1.20; if you take any of the following code and paste it into that version of query browser it will execute fine, placing it in 1.2.3 beta will cause syntax errors.

Ok,
I have been screwing around with this for 3 hours now and can not figure this out. I am using MySQL 5.0, Query Browser 1.2.3 beta, and Administrator 1.1.

I used the MySQL migration tool to pull in an old Access Database and this worked beautifully and without error so I started up Query Browser and went to create a stored procedure and Query Browser gave me its default template:

Code:
DELIMITER $$

DROP PROCEDURE IF EXISTS `zips1`.`uspTest` $$
CREATE PROCEDURE `zips1`.`uspTest` ()
BEGIN

END $$

DELIMITER ;
I went about my business building the SP and went to execute it, and I got a 1064 error (Syntax error) so I went back and looked at my code and couldnt find anything that jumped out at me.

Eventually i had removed all of my code and tried to simply execute the above syntax (that was generated by Query Browser) and it fails as well with a 1064 error of:

Code:
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 'DELIMITER $$

DROP PROCEDURE IF EXISTS `zips1`.`uspTest` $$
CREATE PROCEDURE ' at line 1
If I do this:

Code:
CREATE PROCEDURE uspTEST()
SELECT * from [TABLE];
Query browser creates the stored procedure and it works fine but if I go and do something like this:

Code:
CREATE PROCEDURE uspTEST()
DECLARE myVariable int;
Query Browser barks about the DECLARE statement being incorrect! Can someone explain to me what exactly is going on?

--Stole this from a moderator

I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.
__________________
===============================================
Doug Parsons
Wrox online library: Wrox Books 24 x 7
Did someone here help you? Click on their post!
"Easy is the path to wisdom for those not blinded by themselves."
===============================================
 
Old October 5th, 2006, 01:38 PM
Registered User
 
Join Date: Oct 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Change the DELIMITER statement to delimiter. In other words, from all CAPS to no caps. That did it for us ;)

Seems a little stupid but that was the cause of our troubles for nearly an hour

BTW we're using mysql version 5.0.24a and the gui tools version 5.0-r3






Similar Threads
Thread Thread Starter Forum Replies Last Post
Bolding some record of report [Solved] Svenzardda Access VBA 4 July 18th, 2007 08:04 AM
Colouring first record of report [Solved] Svenzardda Access VBA 1 July 18th, 2007 06:44 AM
excell error (maybe bug) bayfx2 Excel VBA 1 March 25th, 2007 11:21 PM
Syntax Error in Report Query mateenmohd Access 3 May 1st, 2005 03:41 AM
DoCmd.Open Report Bug - Please help! bridog39 Access VBA 2 June 29th, 2004 03:45 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.