Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Thu Nov 14, 2019 6:49 pm
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Listbox binding with REALSQLDatabase
PostPosted: Fri Jan 18, 2013 4:32 am 
Offline
User avatar

Joined: Sun Oct 28, 2012 4:54 am
Posts: 264
Location: Herts, UK
Hello fellow RB Guru's :mrgreen:

Having been through the LR and reading Mike Baileys tips under the database forum I don't seem to be able to find any info
on how to bind a 2 column listbox control with a REALSQLDatabase. I am looking to update all listbox rows on a button click event.

Thanks for any help and advice you can offer.

_________________
Real Studio 2012 R2
SysInfo
BackTrack Linux/BackBox Linux/Debian Lenny/Windows 7/Windows 8/OpenWRT/OpenBSD
& Yes it's me in the Avatar


Top
 Profile  
Reply with quote  
 Post subject: Re: Listbox binding with REALSQLDatabase
PostPosted: Fri Jan 18, 2013 9:33 am 
Offline
User avatar

Joined: Sun Aug 05, 2007 10:46 am
Posts: 4931
Location: San Diego, CA
overall the general consensus (and I agree) is

DATA BINDING IS EVIL


Don't do it. it obscures you code, you have no control. use code instead.

_________________
Dave Sisemore
iMac I7[2012], OSX Mountain Lion 10.8.3 RB2012r2.1
Note : I am not interested in any solutions that involve custom Plug-ins of any kind


Top
 Profile  
Reply with quote  
 Post subject: Re: Listbox binding with REALSQLDatabase
PostPosted: Fri Jan 18, 2013 9:40 am 
Offline
User avatar

Joined: Sun Oct 28, 2012 4:54 am
Posts: 264
Location: Herts, UK
:lol: lol

Quote:
DATA BINDING IS EVIL


I presume that I just need to loop through each row and update the recordset one at a time?

_________________
Real Studio 2012 R2
SysInfo
BackTrack Linux/BackBox Linux/Debian Lenny/Windows 7/Windows 8/OpenWRT/OpenBSD
& Yes it's me in the Avatar


Top
 Profile  
Reply with quote  
 Post subject: Re: Listbox binding with REALSQLDatabase
PostPosted: Fri Jan 18, 2013 9:45 am 
Offline
User avatar

Joined: Sun Aug 05, 2007 10:46 am
Posts: 4931
Location: San Diego, CA
Thats what I do

use SQL to fill a recordset

while not rs.eof

listbox1.addrow rs.field("whatever").stringvalue
rs.movenext

wend

_________________
Dave Sisemore
iMac I7[2012], OSX Mountain Lion 10.8.3 RB2012r2.1
Note : I am not interested in any solutions that involve custom Plug-ins of any kind


Top
 Profile  
Reply with quote  
 Post subject: Re: Listbox binding with REALSQLDatabase
PostPosted: Fri Jan 18, 2013 11:22 am 
Offline
Real Software Engineer

Joined: Sat Dec 24, 2005 8:18 pm
Posts: 7858
Location: Canada, Alberta, Near Red Deer
DaveS wrote:
overall the general consensus (and I agree) is

DATA BINDING IS EVIL

Don't do it. it obscures you code, you have no control. use code instead.


IF data bindings had been done more like what Cocoa/Xcode/Interface Builder do then it would have been a good thing.
But they weren't - and have been deprecated for a long time.

_________________
Norman Palardy (Real Software)


Top
 Profile  
Reply with quote  
 Post subject: Re: Listbox binding with REALSQLDatabase
PostPosted: Fri Jan 18, 2013 12:12 pm 
Offline
User avatar

Joined: Fri Sep 30, 2005 11:48 am
Posts: 3554
Location: Lenexa, KS
I've not dealt with Cocoa bindings but my experience in VB6 and old Real Studio was that once you got past 'simple', data binding was less than worthless.

_________________
Bob K.

A blog about being a Real Studio/Xojo developer at http://www.bkeeneybriefs.com


Top
 Profile  
Reply with quote  
 Post subject: Re: Listbox binding with REALSQLDatabase
PostPosted: Fri Jan 18, 2013 12:34 pm 
Offline
User avatar

Joined: Sun Oct 28, 2012 4:54 am
Posts: 264
Location: Herts, UK
Nice one Bob Image

_________________
Real Studio 2012 R2
SysInfo
BackTrack Linux/BackBox Linux/Debian Lenny/Windows 7/Windows 8/OpenWRT/OpenBSD
& Yes it's me in the Avatar


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