Creating a database browse

Just starting out? Need help? Post your questions and find answers here.
AussiePup
User
User
Posts: 19
Joined: Fri Jun 20, 2003 4:47 pm
Location: Chapel Hill, NC

Creating a database browse

Post by AussiePup »

I'm an old Clipper programmer. When I wanted to show a browse of dBase records, it was easy. I finally figured out how to open a sql server database in PB. Now I just need to know how to show a browse on a screen, both editable and view only. I have searched the help file and have been unable to find anything relevant to this task. Can anyone help me?

Thanks,

AussiePup
Regards,

Martin
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8452
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Post by netmaestro »

Once you get a query loaded you can fill a listicon gadget with its fields and that makes a good browse. For editing you have to do a bit more work but it's pretty easy too. Create a window and put some string gadgets on it to take the fields, identify them with textgadgets and put some buttons on the bottom to search, step forward and back, and update. When the update button gets pushed, you'll build an SQL Update command from the fields and execute it. I have some simple programs that do this with SQLite3 (PBOSL) and I can post them if you need something to work from.
BERESHEIT
AussiePup
User
User
Posts: 19
Joined: Fri Jun 20, 2003 4:47 pm
Location: Chapel Hill, NC

Database Browse

Post by AussiePup »

NetMaestro,

Thank you so much for responding. It would be great if you have some code that shows how you are doing this. Hard to believe, but I am just now trying to make the transition into windows programming. I have tried several times before, but gave up since I had plenty of Clipper work. Now it's really slowed down and I have the time to give it a serious try. I see you are in Canada. I did a lot of Clipper programming for a company in Richmond, which is a suburb of Toronto. Anyway, please either upload your examples or email to me: martin@brody1.com

Thanks again,

AussiePup
Regards,

Martin
Straker
Enthusiast
Enthusiast
Posts: 701
Joined: Wed Apr 13, 2005 10:45 pm
Location: Idaho, USA

Post by Straker »

PureBasic is not a 4GL/xBase/Client-Server type scripting language. It is a lower-level than that. Although the commands exist to access the database, the visual controls to easily manipulate the data do not exist unless you write them or use a gadget written by someone else. Maybe Xombie has something like this?

I am an old Clipper (Summer '87) coder. Haven't touched it since 1990.
Image Image
Coolman
Enthusiast
Enthusiast
Posts: 103
Joined: Sat Sep 03, 2005 4:07 pm

Re: Database Browse

Post by Coolman »

AussiePup wrote:NetMaestro,

Thank you so much for responding. It would be great if you have some code that shows how you are doing this. Hard to believe, but I am just now trying to make the transition into windows programming. I have tried several times before, but gave up since I had plenty of Clipper work. Now it's really slowed down and I have the time to give it a serious try. I see you are in Canada. I did a lot of Clipper programming for a company in Richmond, which is a suburb of Toronto. Anyway, please either upload your examples or email to me: martin@brody1.com

Thanks again,

AussiePup

See here :

http://www.xharbour.org/

for purebasic, search 'egrid' 'xgrid' in forum

Sorry for my bad english...
Post Reply