Porting MySQL stored procedures?

I am having problems porting some stored procedures to regular MySQL statements.

We have stuff like this example

http://dev.mysql.com/doc/refman/5.0/en/stored-programs-defining.html

BEGIN SET @x = 0; REPEAT SET @x = @x + 1; UNTIL @x> p1 END REPEAT; END

Where many statements are executed. Multiple If statements and variable declarations, 9 yards total. But for some reason I can't just copy and paste the stored procedure logic into the MySQL Query Browser and execute and execute it when the query is executed with a C # program

I tried to port these queries via parameterized queries in C #, but I still get "check manual error" every time = O

I really need help, I can't find the answer anywhere on the internet. Am I completely screwed up trying to get consistent execution without stored procedures?

Is this the only way to do it for transferring logic to a real program? (I really don't want to do this)

+2


source to share


1 answer


Edit: I'm having trouble understanding reading. This link says that loop constructs only work in saved programs, so you're out of luck I guess.



+1


source







All Articles