Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ SQL » BUG with "Run to cursor (in debug)"
BUG with "Run to cursor (in debug)" [message #34868] Thu, 15 December 2011 15:59 Go to next message
forlano is currently offline  forlano
Messages: 1185
Registered: March 2006
Location: Italy
Senior Contributor
Hello,

I am having strange problem. I need to debug my program. In debug mode (and optimal as well) everything is OK but fails in case of "Run to cursor (in debug)". It stops to a simply SQL.Fetch(), i.e. somewhere here

bool Sqlite3Connection::Fetch() {
	ASSERT(NULL != current_stmt);
	if (!got_row_data)
		return false;
	if (got_first_row) {
		got_first_row = false;
		return true;
	}
	ASSERT(got_row_data);
	int retcode = sqlite3_step(current_stmt);
	if ((retcode != SQLITE_DONE) && (retcode != SQLITE_ROW))
		session.SetError(sqlite3_errmsg(db), String("Fetching prepared statement: ")+current_stmt_string );
	got_row_data = (retcode==SQLITE_ROW);
	return got_row_data;
}


and message
index.php?t=getfile&id=3594&private=0
What is it?

Unfortunately it is not easy to prepare a test case.
(U++ 4295, latest stable TDM-GCC)

Thanks,
Luigi

EDIT: I have commented the line
ASSERT(NULL != current_stmt);
to remove the error mesage, but the database is not properly read... I mean some table are not read at all, while are read in optimal mode Shocked

[Updated on: Thu, 15 December 2011 16:49]

Report message to a moderator

Re: BUG with "Run to cursor (in debug)" [message #34889 is a reply to message #34868] Fri, 16 December 2011 10:38 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
forlano wrote on Thu, 15 December 2011 09:59

Hello,

I am having strange problem. I need to debug my program. In debug mode (and optimal as well) everything is OK but fails in case of "Run to cursor (in debug)". It stops to a simply SQL.Fetch(), i.e. somewhere here

bool Sqlite3Connection::Fetch() {
	ASSERT(NULL != current_stmt);
	if (!got_row_data)
		return false;
	if (got_first_row) {
		got_first_row = false;
		return true;
	}
	ASSERT(got_row_data);
	int retcode = sqlite3_step(current_stmt);
	if ((retcode != SQLITE_DONE) && (retcode != SQLITE_ROW))
		session.SetError(sqlite3_errmsg(db), String("Fetching prepared statement: ")+current_stmt_string );
	got_row_data = (retcode==SQLITE_ROW);
	return got_row_data;
}


and message
index.php?t=getfile&id=3594&private=0
What is it?

Unfortunately it is not easy to prepare a test case.
(U++ 4295, latest stable TDM-GCC)

Thanks,
Luigi

EDIT: I have commented the line
ASSERT(NULL != current_stmt);
to remove the error mesage, but the database is not properly read... I mean some table are not read at all, while are read in optimal mode Shocked


This error basically means that there was error in SQL. It should be unrelated to debugging.

The easy and quick way is to activate SQL trace (SetTrace) and then check the log (Alt+L). Actually, to activate SQL trace is not necessarry, but it is always a good idea.... Smile
Previous Topic: More .sch files?
Next Topic: sql script question
Goto Forum:
  


Current Time: Sat Apr 20 03:41:38 CEST 2024

Total time taken to generate the page: 0.04725 seconds