dbTalk Databases Forums  

Getting Locking errors with simple query call ???

mailing.database.mysql-plusplus mailing.database.mysql-plusplus


Discuss Getting Locking errors with simple query call ??? in the mailing.database.mysql-plusplus forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Lance Additon
 
Posts: n/a

Default Getting Locking errors with simple query call ??? - 05-21-2005 , 12:01 AM






Hello everyone, I'm just trying to grab one column of information and I
keep getting the exception thrown by this snippet of code in
coonection.cpp

if (lock()) {
if (throw_excptns) {
throw BadQuery("lock failed");
}
else {
return Result();
}
}

Here's what I do to get the error...

void GetEntryNumber(Connection* con){

Query entry_query = con->query();
entry_query << "select Entry_Number from db_environment";
Result EntryNumRow = entry_query.store(); <---THIS IS WHERE IT
ERRORS
Row Entry = EntryNumRow.fetch_row();


return;

}

My OS = Win XP Pro and im using the new SQL server 5.0.4-beta-max

Thanks!!

Lance



--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw


Reply With Quote
  #2  
Old   
Chris Frey
 
Posts: n/a

Default Re: Getting Locking errors with simple query call ??? - 05-21-2005 , 09:43 AM






On Fri, May 20, 2005 at 11:01:37PM -0600, Lance Additon wrote:
Quote:
Hello everyone, I'm just trying to grab one column of information and I
keep getting the exception thrown by this snippet of code in
coonection.cpp
Just a guess... do you have other threads using mysql at the same time?

- Chris


--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw



Reply With Quote
  #3  
Old   
Warren Young
 
Posts: n/a

Default Re: Getting Locking errors with simple query call ??? - 05-23-2005 , 10:15 AM



Lance Additon wrote:

Quote:
if (lock()) {
I just looked into Connections use of its locking facility a few days
ago, and it was my impression that it was only used to prevent multiple
simultaneous connection attempts. If I'm right, the only way for a lock
to continue to be asserted is if you aren't establishing a connection
correctly. Check the obvious things: can other MySQL programs connect
to that database using that user name and such, etc.

--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.