Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Tue Dec 12, 2017 3:37 am
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Help PostgreSQLDatabase
PostPosted: Thu Feb 21, 2013 10:27 pm 
Offline
User avatar

Joined: Wed Sep 20, 2006 5:12 pm
Posts: 680
Location: Puerto Rico
if i use PostgreSQLDatabase i have to use example PostgreSQLRecorset,PostgreSQLDatabaseField
and so on.
: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: Help PostgreSQLDatabase
PostPosted: Fri Feb 22, 2013 1:02 am 
Offline
User avatar

Joined: Tue Jan 04, 2011 3:02 am
Posts: 1236
Location: Jönköping, Sweden
I can't really figure out the question :/

Realmente no puedo entender la pregunta :/
Si tiene problemas para encontrar las palabras inglesas, Google Translate podría ayudar :)

_________________
Image http://www.linkedin.com/in/albinkiland
Dev. iMac 27" + 2x22" LG (2.8GHz Intel Core i7, 12GB RAM, 120GB SSD) OS X 10.8
Xojo Pro 2013r1


Top
 Profile  
Reply with quote  
 Post subject: Re: Help PostgreSQLDatabase
PostPosted: Fri Feb 22, 2013 1:13 am 
Offline
User avatar

Joined: Wed Sep 20, 2006 5:12 pm
Posts: 680
Location: Puerto Rico
if use PostgreSQLDatabase class I have to use the Recordset From PostgreSQL or native class from RS

_________________
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: Help PostgreSQLDatabase
PostPosted: Sun Feb 24, 2013 6:50 pm 
Offline

Joined: Sat Dec 04, 2010 9:14 pm
Posts: 918
I use the native class.

Dim osql as new cSmartSQL

osql.StatementType = eStatementType.Type_Select
osql.AddTable "account"
osqL.AddFieldS "authority_level", "corp_email", "corp_phone", "corp_address2", "is_gblelec_superuser", "lic_paid", "usr_lic_qty", "email","pw","fname", "lname","display_name", "account_type", "corpid", "acc_subscript_start_date","acc_subscript_last_renewal", "acc_subscript_expiration","web_enabled","corp_name","corp_address","corp_country", "master_login", "master_pw", "user_count", "corp_login", "corp_city", "corp_state", "corp_postcode", "site_lic_qty", "usrint_lic_qty"

osql.ClearWhereClause
'osql.AddComplexWhereClause "account.email = "+Em + " AND account.pw = "+ Pwrd
osql.AddSimpleWhereClause "corp_name", SQLs(CoName),"account"

#if TargetWeb
RsAccount= Session.db.SQLSelect(osql.SQL)

if Session.db.Error = true then
dbMessage = Session.db.ErrorMessage
dbErrorNo = Session.db.ErrorCode
Return 0 'Return a 0, The calling code should check the dberrorno to see if it is zero also, to determine if there are no records or an error occurred
end if

#else
RsAccount= db.SQLSelect(osql.SQL)
if db.Error = true then
dbMessage = db.ErrorMessage
dbErrorNo = db.ErrorCode
Return 0 'Return a 0, The calling code should check the dberrorno to see if it is zero also, to determine if there are no records or an error occurred
end if
#endif

RecordsRetrieved = RsAccount.RecordCount
If RecordsRetrieved = 1 and FilVars = True then FillVars

Return RecordsRetrieved

Exception e as RuntimeException
System.Log (System.LogLevelDebug, "Unknown exception in: clsAccount.getKey0_AccLogin " + e.Type + " ." )
MsgBox("An exception in: clsAccount.getKey0_AccLogin" + e.Type + " .")


Tim


Top
 Profile  
Reply with quote  
 Post subject: Re: Help PostgreSQLDatabase
PostPosted: Sun Feb 24, 2013 9:26 pm 
Offline

Joined: Wed Mar 22, 2006 11:15 am
Posts: 712
Location: Southern California
jetpr wrote:
if i use PostgreSQLDatabase i have to use example PostgreSQLRecorset,PostgreSQLDatabaseField
and so on.
:idea:


You should use the RecordSet and DatabaseField classes. I seem to recall a discussion on another list where RS confirmed that the database specific subclasses of these should not auto complete in the IDE, are considered private, and may disappear in the future.

Obviously you use the publicly documented PostgreSQLDatabase if you're connecting to Postgres. But use the generic classes for records and fields.

This also lets you easily switch databases should the need arise.

_________________
Daniel L. Taylor
Custom Controls for Real Studio WE!
Visit: http://www.webcustomcontrols.com/


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 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:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group