Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Thu Oct 18, 2018 4:24 am
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 11 posts ] 
Author Message
 Post subject: Example Database Application
PostPosted: Tue Mar 26, 2013 2:52 pm 
Offline
User avatar

Joined: Fri Oct 10, 2008 7:14 pm
Posts: 94
Does someone have a "useful" RB Database example application. For me something like a SIMPLE contact list where you can navigate forward and backward with textfields being populated and ready for update as desired. I don't find the examples shipped with 2012r2 very helpful.

Also, I understand that the datasource should not be used but is there an alternative to having textfields that you have to move data back and forth between the database and the edit fields on the screen.

Some basic guidance would be greatly appreciated.

thanks
bill


Top
 Profile  
Reply with quote  
 Post subject: Re: Example Database Application
PostPosted: Tue Mar 26, 2013 4:03 pm 
Offline
Site Admin
User avatar

Joined: Fri Sep 30, 2005 9:35 am
Posts: 987
Location: South Portland, Maine
The Eddie's Electronics example included in the Sample Application folder contains a full-blown DB app for both desktop and web. It may be more complex than you want, though.

I am working on simpler DB examples for 2013r1.

You might also check out the DB videos on our YouTube channel:

http://www.youtube.com/realsoftwarevideo

_________________
Paul Lefebvre
Developer Evangelist
Xojo, Inc.


Top
 Profile  
Reply with quote  
 Post subject: Re: Example Database Application
PostPosted: Tue Mar 26, 2013 4:24 pm 
Offline
User avatar

Joined: Fri Oct 10, 2008 7:14 pm
Posts: 94
Thanks Paul,

I just wasn't looking far enough in the examples. I only looked at the database folder and never saw the sample applications folder.

Sorry,
b


Top
 Profile  
Reply with quote  
 Post subject: Re: Example Database Application
PostPosted: Tue Mar 26, 2013 4:28 pm 
Offline
User avatar

Joined: Fri Oct 10, 2008 7:14 pm
Posts: 94
Can't believe I missed this - it is just about EXACTLY what I was looking for.

thanks again Paul,

bill


Top
 Profile  
Reply with quote  
 Post subject: Re: Example Database Application
PostPosted: Wed Mar 27, 2013 3:22 am 
Offline
User avatar

Joined: Fri Jul 09, 2010 7:16 am
Posts: 103
Location: Den Haag, Netherlands
I found a little bug in Eddie's Electronics Desktop and Web app.
When using the Dutch currency notation, the Total value in the InvoiceDetailsWindow goes wrong.
It should be $8.893,92 and not $8,89.

Image

_________________
MacBook Pro (late 2008), OSX Mountain Lion 10.8.2, Real Studio 2012r2


Top
 Profile  
Reply with quote  
 Post subject: Re: Example Database Application
PostPosted: Wed Mar 27, 2013 9:53 am 
Offline
User avatar

Joined: Fri Oct 10, 2008 7:14 pm
Posts: 94
I need a little explanation. In the Eddies Electronics sample application. In the Project Tab - why did he create a new class of OrdersDatabase instead of just using a RealSQLDatabase class. Seems to be going out of the way.


Top
 Profile  
Reply with quote  
 Post subject: Re: Example Database Application
PostPosted: Wed Mar 27, 2013 10:14 am 
Offline
Site Admin
User avatar

Joined: Fri Sep 30, 2005 9:35 am
Posts: 987
Location: South Portland, Maine
plunkettphoto wrote:
I need a little explanation. In the Eddies Electronics sample application. In the Project Tab - why did he create a new class of OrdersDatabase instead of just using a RealSQLDatabase class. Seems to be going out of the way.

OrdersDatabase is a subclass of RealSQLDatabase. Doing it this way serves two purposes:

1.) It provides a place to encapsulate all DB access code which is great for code re-use. If you look at the web version of Eddie's Electronics, you'll see it uses the exact same class for its data access.

2.) Should you need to change to a different database in the future, you only have to change the OrdersDatabase class, rather than everywhere in your app where you might be using RealSQLDatabase.

_________________
Paul Lefebvre
Developer Evangelist
Xojo, Inc.


Top
 Profile  
Reply with quote  
 Post subject: Re: Example Database Application
PostPosted: Wed Mar 27, 2013 10:26 am 
Offline
User avatar

Joined: Fri Oct 10, 2008 7:14 pm
Posts: 94
Thanks Paul, very clear explanation

Next question is where is the class "toolbar" that is used for "customerdeatilstoolbar" defined? I can't locate it.

Also, what is and where is the UtilLib? Is that a third party utility library?

thanks again,
b


Top
 Profile  
Reply with quote  
 Post subject: Re: Example Database Application
PostPosted: Wed Mar 27, 2013 10:29 am 
Offline
User avatar

Joined: Fri Oct 10, 2008 7:14 pm
Posts: 94
please ignore question about the "ToolBar" - just a brain "hiccup"...


Top
 Profile  
Reply with quote  
 Post subject: Re: Example Database Application
PostPosted: Wed Mar 27, 2013 10:34 am 
Offline
Site Admin
User avatar

Joined: Fri Sep 30, 2005 9:35 am
Posts: 987
Location: South Portland, Maine
plunkettphoto wrote:
what is and where is the UtilLib? Is that a third party utility library?

UtilLib is a module in the project.

It filters out non-numeric stuff so that it can be saved in the DB. And I think it has a bug that is causing the problem with Dutch currency (and probably others that use a comma as a decimal separator) mentioned by paulsondervan.

_________________
Paul Lefebvre
Developer Evangelist
Xojo, Inc.


Top
 Profile  
Reply with quote  
 Post subject: Re: Example Database Application
PostPosted: Wed Mar 27, 2013 10:38 am 
Offline
User avatar

Joined: Fri Oct 10, 2008 7:14 pm
Posts: 94
I seem to be answering my questions. UtilLib is just his utility module where he can add methods.

I have the same thing I just call it GlobalModule instead.

Sorry for being such a newbie when I should know the answers....

b


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group