Page 1 of 1

Creating a database browse

Posted: Sat Jun 24, 2006 1:06 am
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

Posted: Sat Jun 24, 2006 3:05 am
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.

Database Browse

Posted: Sat Jun 24, 2006 3:51 am
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

Posted: Sat Jun 24, 2006 4:34 pm
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.

Re: Database Browse

Posted: Sun Jun 25, 2006 2:39 pm
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...