Hi Everyone,
I am trying to overcome a rather annoying issue, ages back we wrote a
program that included the MySQL++ libraries and it worked great!
However recently it has just decided to start segmentation faulting. I don't
know why!
This is the code that is causing the seg fault:
vector<string> sql::grabip()
{
logger log;
log.input("About to query!");
log.input("making query for counting IPs to be used");
Query q = conn->query();
log.input("declared Q object");
q << "SELECT `ipaddress` FROM `ipaddrs_included` WHERE `accounted` =
1";
std::vector<mysqlpp::Row> v;
q.storein(v);
vector<string> ipAddress;
int count = 0;
while (count < v.size())
{
stringstream ss;
ss << v[count]["ipaddress"];
string input;
ss >> input;
ipAddress.push_back(input);
count++;
}
return ipAddress;
}
The program segfaults when the function q.storein(v) is executed. it does
not get past this line.
I have verified the SQL and checked the output of the database for possible
rouge data, but alas I have been unable to find anything causing this!
Could someone please help me recover from this issue?
Thanks
Karl.
Karl Kloppenborg
Head of Development
Phone: 1300 884 839 (AU Only - Business Hours)
Website: AU <http://www.crucial.com.au/> http://www.crucial.com.au| US
<http://www.crucialp.com/> http://www.crucialp.com
Description: cid:image001.gif@stripped
Attachment: [text/html]
Attachment: [text/html]
Attachment: [text/html]