Re: [Gambas-user] Database Results

2010-09-12 Thread Caveat
Hi Tobias Fabien is correct in saying it's a kind of library. For Gambas2 in my Ubuntu installation, the following libraries are automatically installed along with Gambas2: gambas2-gb-db gambas2-gb-db-postgresql gambas2-gb-db-firebird gambas2-gb-db-mysql gambas2-gb-db-form gambas2-gb-db-odbc gam

Re: [Gambas-user] Database Results

2010-09-12 Thread Fabien Bodard
2010/9/12 tobias : > hi, > >> It's a kind of lbrary ... you select gb.db in thecomponents. >> >> >> then >> >> private hcon as new connection >> >> >> Publc sub Main() >> >>   hCon.type = "sqlite3" >>   hCon.Host=user.home &/ "dbpath" >>   hcon.Name = "mydatabase" >>   hcon.open >> >> end >> > > ye

Re: [Gambas-user] Database Results

2010-09-12 Thread tobias
hi, > It's a kind of lbrary ... you select gb.db in thecomponents. > > > then > > private hcon as new connection > > > Publc sub Main() > > hCon.type = "sqlite3" > hCon.Host=user.home &/ "dbpath" > hcon.Name = "mydatabase" > hcon.open > > end > yeah, so this 'kind of library' it l

Re: [Gambas-user] Database Results

2010-09-12 Thread Fabien Bodard
It's a kind of lbrary ... you select gb.db in thecomponents. then private hcon as new connection Publc sub Main() hCon.type = "sqlite3" hCon.Host=user.home &/ "dbpath" hcon.Name = "mydatabase" hcon.open end 2010/9/12 tobias : > hi, > > another question about the databases and gambas

Re: [Gambas-user] Database Results

2010-09-12 Thread tobias
hi, another question about the databases and gambas to the developers: how do i have to imagine exactly the interaction between the (sqlite) driver and my gambas program? what exactly is this 'driver'? is it just a kind of library? (sorry, i'm not so good at this level and i never had to do any

Re: [Gambas-user] Database Results

2010-09-12 Thread tobias
hi, > The biggest help for him will be to read a sql book :)... it was for > me the only way to quit the M$ ADO in the past. But gb.db and result > is suffisely powerfull to manage most part of the db capabilities in a > first time . Then he can learn sql do to more. > > > All depend of the proj

Re: [Gambas-user] Database Results

2010-09-12 Thread Rolf Schmidt
Hi Benoît > But I don't think I can change the interface anymore, it will break a lot > of code. Unless someone finds an unexpected solution. What about a property, which indicate how the result should be delivered. For example in PHP Database Objects you can give a value that says how the data

Re: [Gambas-user] Database Results

2010-09-12 Thread Benoît Minisini
> the next question. > i got a result from a database with some records predefined (fields are > id (serial) and name (string)): > > hResult = hConnection.Exec("select * from test") > > in a for loop i go through all the records by doing: > > FOR iCount = 0 TO hResult.Count - 1 STEP 1 > hResul

Re: [Gambas-user] Database Results

2010-09-12 Thread Fabien Bodard
The biggest help for him will be to read a sql book :)... it was for me the only way to quit the M$ ADO in the past. But gb.db and result is suffisely powerfull to manage most part of the db capabilities in a first time . Then he can learn sql do to more. All depend of the project ... for a littl

Re: [Gambas-user] Database Results

2010-09-12 Thread Caveat
Hi Tobias I can understand your frustration, programming with databases is not so simple in the beginning and there are some new concepts to get your head around. I think the Result object is quite often misunderstood and people often ask: "Why can't the SQL stuff return something simple I can u

Re: [Gambas-user] Database Results

2010-09-11 Thread richard terry
Hi Tobias, If you are new to databases, you could choose to go to the best open source database from the beginning - postgresql. There are a wealth of postgresql books and tutorials around on the web. in Linux, youve got the pgadmin graphical tool and if you also run windows or a virtual mach

Re: [Gambas-user] Database Results

2010-09-11 Thread Fabien Bodard
hResult = hConnection.Create("test") hResult!Name = "Name01" hResult = hConnection.Create("test") hResult!Name = "Name02" hResult = hConnection.Create("test") hResult!Name = "Name03" or for i=0 to 2 hResult = hConnection.Create("test") hResult!Name = "Name0" & i next with db.serial the id i

Re: [Gambas-user] Database Results

2010-09-11 Thread tobias
hi, > For the first question I recomend to you use SQL sentence for insert. You > can write a function where you past name of database table, name of fields > and values and it returns the SQL INSERT sentence. I think it's all people > do (me too!) > > > SQL = "INSERT INTO test (id, name) VALUES (

Re: [Gambas-user] Database Results

2010-09-11 Thread Ricardo Díaz Martín
For the first question I recomend to you use SQL sentence for insert. You can write a function where you past name of database table, name of fields and values and it returns the SQL INSERT sentence. I think it's all people do (me too!) SQL = "INSERT INTO test (id, name) VALUES ('1', 'name01')" h

Re: [Gambas-user] Database Results

2010-09-11 Thread Tobias Boege
hi, >like that ? > >For each hresult > > print hResult!MyField > >next > hmm, this works fine and looks like a pretty good solution! but there's no way to handle a result the same way like an array? this FOR EACH construct is especially for the result records? i need to understand this stuff f

Re: [Gambas-user] Database Results

2010-09-11 Thread Fabien Bodard
like that ? For each hresult print hResult!MyField next 2010/9/11 tobias : > hello mailing list, > > i am absolutely new to databases in general and so to databases in > gambas, too. i plan to use sqlite3 and in general i am understanding the > related stuff part by part but it is very confus

[Gambas-user] Database Results

2010-09-11 Thread tobias
hello mailing list, i am absolutely new to databases in general and so to databases in gambas, too. i plan to use sqlite3 and in general i am understanding the related stuff part by part but it is very confusing with the different classes and i think this complicates my learning process. but to