Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Sat Dec 16, 2017 11:18 pm
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: is a way to change or create a global Properties
PostPosted: Sun Feb 17, 2013 5:00 pm 
Offline
User avatar

Joined: Wed Sep 20, 2006 5:12 pm
Posts: 680
Location: Puerto Rico
i need to add Properties or to change
Examples

Dim Conn As PostgreSQLDatabase

but i need to Change By Code to Dim Conn As REALSQLDatabase
:idea:

_________________
Thanks for any contribution and God blesses all (I start Using RS in 10/12/2010)
Mac Mini with Lion v10.7.5 and Real Studio 2012r1 Pro And Windows 7 RS2012r1 Personal and Linux RS2012r1 Personal Register user
my Hobbies R/C Turbines Jets Models


Top
 Profile  
Reply with quote  
 Post subject: Re: is a way to change or create a global Properties
PostPosted: Sun Feb 17, 2013 8:17 pm 
Offline
User avatar

Joined: Mon Feb 05, 2007 5:21 pm
Posts: 600
Location: New York, NY
You cannot change the declaration of a property. If you define it as a RealSQLDatabase, it will remain a RealSQLDatabase and only that.

But that doesn't mean there are no options. You can define a property as its base class, then assign one of its subclasses. For example, you declare your property as
Conn As Database

Database is the base class for all other kinds of database so you can, for example:
Conn = new RealSQLDatabase

Later, you can say:
Conn = new PostgreSQLDatabase

But to use any feature that is unique to a PostgreSQLDatabase, you must typecast it first.
PostgresSQLDatabase( Conn ).Listen( something )

You can also declare Conn as a Variant and store anything in it, but you'll always have to typecast it.

_________________
Kem Tekinay
MacTechnologies Consulting
http://www.mactechnologies.com/

Need to develop, test, and refine regular expressions? Try RegExRX.


Top
 Profile  
Reply with quote  
 Post subject: Re: is a way to change or create a global Properties
PostPosted: Sun Feb 17, 2013 8:36 pm 
Offline
User avatar

Joined: Wed Sep 20, 2006 5:12 pm
Posts: 680
Location: Puerto Rico
Thanks
:)

_________________
Thanks for any contribution and God blesses all (I start Using RS in 10/12/2010)
Mac Mini with Lion v10.7.5 and Real Studio 2012r1 Pro And Windows 7 RS2012r1 Personal and Linux RS2012r1 Personal Register user
my Hobbies R/C Turbines Jets Models


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 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