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 » Developing U++ » U++ TheIDE and Library: Releases and ChangeLogs » SQLApp example...
SQLApp example... [message #5360] Fri, 15 September 2006 22:50 Go to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Quite complex, therefore I am posting it here for review. (There were requests for this).

BTW, it crashes at the end because there is bug in Sqlite3 plugin when you use global SQL. I will fix that soon.

Re: SQLApp example... [message #5363 is a reply to message #5360] Sat, 16 September 2006 01:06 Go to previous messageGo to next message
zsolt is currently offline  zsolt
Messages: 698
Registered: December 2005
Location: Budapest, Hungary
Contributor
Cool, but in book.cpp this would be better:
void SQLApp::EditBook()
{
	if(!book.IsCursor())
		return;
	BookDlg dlg;
	int q = book.GetKey();
	SQL * Select(dlg.ctrls).From(BOOK).Where(ID == q);
	if(!dlg.ctrls.Fetch(SQL))
		return;
	if(dlg.Run() != IDOK)
		return;
	SQL * dlg.ctrls.Update(BOOK).Where(ID == q);
	Query(q);
}
Re: SQLApp example... [message #5365 is a reply to message #5363] Sat, 16 September 2006 08:49 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
zsolt wrote on Fri, 15 September 2006 19:06

Cool, but in book.cpp this would be better:
void SQLApp::EditBook()
{
	if(!book.IsCursor())
		return;
	BookDlg dlg;
	int q = book.GetKey();
	SQL * Select(dlg.ctrls).From(BOOK).Where(ID == q);
	if(!dlg.ctrls.Fetch(SQL))
		return;
	if(dlg.Run() != IDOK)
		return;
	SQL * dlg.ctrls.Update(BOOK).Where(ID == q);
	Query(q);
}



Ooops, thanks Smile

Mirek
Previous Topic: SqlExp deeply refactored
Next Topic: SQLite and Sql changes
Goto Forum:
  


Current Time: Sat May 04 11:02:06 CEST 2024

Total time taken to generate the page: 0.03867 seconds