Page 1 of 1

Database Gadget

Posted: Tue Dec 16, 2003 2:49 pm
by hteamspy
Hi everyone,

I am a purebasic user since last year, and i'am a french developper to.
For my office i used Visual Basic, and i would like to begin using PB for my work developpement.
But, there is a very big inconveniant : NO DATABASE GADGET.

And i think that if PB would like to enter on the "Professional" Developpers Office it's a obligation to have a simple access to database.

It was just a sugestion....

Thanks for reading, and thanks for all the works accomplied by Fred and all of you on this Forum. :D

Spy (http://www.soluce-dev.com)

Re: Database Gadget

Posted: Tue Dec 16, 2003 2:59 pm
by PB
> i think that if PB would like to enter on the "Professional"
> Developpers Office it's a obligation to have a simple access to database.

What's wrong with these commands for database access?

http://www.purebasic.com/documentation/ ... index.html

(I haven't used databases myself, but surely these are what you need?).

Posted: Tue Dec 16, 2003 4:51 pm
by hteamspy
Yes, that's right, you can use database with PB.
But use them for big database and multiple command is very hard ( for me ! )
When u use VB, you have a datagadget with allows u to connect to a databse, u have Datalist which allows you to see result.
Creating and reading a recordset is very easy......

So yes PB allow us to use database, but if you have something to set it more easy, i'am OK :)

Spy

Posted: Wed Dec 17, 2003 3:34 pm
by Karbon
Yes, that's right, you can use database with PB.
But use them for big database and multiple command is very hard ( for me ! )
Why would the size of the database make it harder or easier - you access the database the same way regardless of the data.
When u use VB, you have a datagadget with allows u to connect to a databse, u have Datalist which allows you to see result.
Creating and reading a recordset is very easy......
Creating and reading a data set is very easy in PB too - check out the resources site and the code archive for some examples (www.reelmediaproductions.com/pb and www.purearea.net). You do need to understand SQL a bit but I'd be happy to help you if you get stuck there..
So yes PB allow us to use database, but if you have something to set it more easy, i'am OK
You just have to adjust your thinking away from VB when working in PureBasic, we do things a little different around here! (Better, we think!)

Good luck, feel free to ask more questions once you take a look at some examples and the docs!

Databases

Posted: Thu Dec 18, 2003 3:31 am
by Fangbeast
hteamspy wrote:Yes, that's right, you can use database with PB.
But use them for big database and multiple command is very hard ( for me ! )
When u use VB, you have a datagadget with allows u to connect to a databse, u have Datalist which allows you to see result.
Creating and reading a recordset is very easy......

So yes PB allow us to use database, but if you have something to set it more easy, i'am OK :)

Spy
Isn't the DataGadget the same thing as the ODBC database connect window?? (Correct me if I am wrong please) Using Ring's ODBC database connection code as the skeleton, you could make your own DataGadget tailored to your requirements (and probably a lot simpler that the ODBC control itself.)

As for the DataList, I believe VB uses a simple ListControl (Our equivalent would be a ListIconGadget) which uses the API to add or remove collumns as needed and there was an example posted in the forum on just that so you could make your own simple data list control the way you liked it.

You can use PB's commands to determine the number of collumns and their types, convert them all to string, use the API command to add the number of collumns you need and then use AddGadgetItem to add the data to your "DataList"

Regards

Posted: Thu Dec 18, 2003 11:11 am
by Fred
The idea of a DataBaseGadget() is good, and it could be an extension of a GridGadget() (something like Excel one, with each cell editable). Some rumors say than a freak coder is thinking about one :wink:

Bah!!

Posted: Thu Dec 18, 2003 12:52 pm
by Fangbeast
Fred wrote:The idea of a DataBaseGadget() is good, and it could be an extension of a GridGadget() (something like Excel one, with each cell editable). Some rumors say than a freak coder is thinking about one :wink:
Damn Fred, you just put me out of work!! (/me falls out of his chair laughing)

Posted: Thu Dec 18, 2003 1:59 pm
by freak
Fred wrote:Some rumors say than a freak coder is thinking about one :wink:
Hum, I must have missed those 8O

Posted: Thu Dec 18, 2003 4:54 pm
by Fred
:oops:

Posted: Thu Dec 18, 2003 4:58 pm
by LarsG
freak wrote:
Fred wrote:Some rumors say than a freak coder is thinking about one :wink:
Hum, I must have missed those 8O
come on, freak... spill the beans!!! :twisted:

Spilled beans

Posted: Fri Dec 19, 2003 7:38 am
by Fangbeast
LarsG wrote:
freak wrote:
Fred wrote:Some rumors say than a freak coder is thinking about one :wink:
Hum, I must have missed those 8O
come on, freak... spill the beans!!! :twisted:
Too late, he spilled the beans already and there is this ruddy great beanstalk at the back of my house.