Page 1 of 1

Revdb error occuring because of "pre-fetch"??

Posted: Thu Jan 28, 2010 4:13 pm
by rayjbenet
I have a very simple stack which contains a button script that will connect directly to a MySQL database (over the Internet) and run some simple queries.

There are no handlers for "preOpenStack" "openStack" "preOpenCard" or "openCard"

Whenever I open the stack, I get this error:

"There was an error in connecting to the database. Please check that the connection fields are correct.
Revdb error: Can't connect to MySQL server on 'localhost' (10061)"


To find out when it occurred, I put handlers for the open messages and found that the error occurs AFTER the preOpenStack, but before the other three.

I tried building a standalone to see if that mattered. Same error.

The stack functions perfectly. But it throws an error when it opens. What's happening? Is Rev trying to pre-fetch a connection to a localhost ODBC driver or something?

Rev 4.0.0 gm-1 Enterprise Windows XP SP 3

Thanks.
Ray

Re: Revdb error occuring because of "pre-fetch"??

Posted: Thu Jan 28, 2010 5:41 pm
by bangkok
And furthermore.... why "localhost" ??? ! You said that your DB was distant.

I guess you're using the Database Query Builder ("Please check that the connection fields are correct.") ?

So : you should check the query menu... you might have a second one you forgot to erase.

(advice : you should access your DB by script. You'd have much more control and freedom)

Re: Revdb error occuring because of "pre-fetch"??

Posted: Thu Jan 28, 2010 8:47 pm
by rayjbenet
I am NOT using query builder. As best I can tell, there is no good reason ANY code having anything to do with a database should be executing when the stack is opening.

I have a button on the main card of the stack, that when clicked, will do a database open and a few queries. The database sits on the on-rev server and works perfectly. I don't make any calls involving localhost.

All of my DB access is via script.

So, the Query Builder clue is interesting, though. I've never actually opened the Query Builder. I will now, because I think your hunch that it is throwing the error is correct. In which case, this probably actually a rev bug.

Re: Revdb error occuring because of "pre-fetch"??

Posted: Thu Jan 28, 2010 8:50 pm
by rayjbenet
Brilliant.

It was the Query Builder.

There was an empty Query in there called Query 1.

I deleted it. Saved the stack. Closed the stack. Re-opened the stack - no error.

Thanks for the indirect pointer !

Re: Revdb error occuring because of "pre-fetch"??

Posted: Tue Jul 02, 2013 11:35 pm
by makeshyft
OMG THANK YOU!!!! I had this same problem and couldn't figure out where the hell this error was coming from...it was driving me bonkers for a while.