Re: [Gambas-user] TableView Data from database

2012-09-30 Thread rocko
You are so close Bruce! Actually I dont need to send data back to the database. Thats done with a DataBrowser that displays and updates the entire database. This is a separate entity that gets SOME data form the database IF the daysLeft field in the database is less than a certain amount, 20 days f

Re: [Gambas-user] TableView Data from database

2012-09-30 Thread rocko
Oh yes, but can I do an 'IF Then" that that limits the fields returned from the database? If (daysLeft < 21) Then sResult!DaysLeft = DataView1.Columns1.Daysleft And so on.. On 09/29/2012 03:47 AM, Benoît Minisini wrote: > Le 29/09/2012 05:11, rocko a écrit : >> Ok that makes a

Re: [Gambas-user] TableView Data from database

2012-09-29 Thread Benoît Minisini
Le 29/09/2012 05:11, rocko a écrit : > Ok that makes a little more sense. > But I have some questions. > > Do I have to use a TableView? > Originally I used DataView but that displays all > the fields in the database, I just want to use some > of the fields if certain conditions apply, like > if th

Re: [Gambas-user] TableView Data from database

2012-09-29 Thread Bruce
On Fri, 2012-09-28 at 20:11 -0700, rocko wrote: > Ok that makes a little more sense. > But I have some questions. > > Do I have to use a TableView? Well that depends on whether you want to have some sort of display of the data at all. If you just want to update the data, say on a daily basis, the

Re: [Gambas-user] TableView Data from database

2012-09-29 Thread Tobias Boege
On Thu, 27 Sep 2012, rocko wrote: > I'm using a Table view to view data from an SQLite database. > I would use a dataview but I only need to display some database fields > not all of them. > > This is the code I have so far: > Public Sub Form_Open() > > Dim sResult As Result > Dim id As Integer >

Re: [Gambas-user] TableView Data from database

2012-09-28 Thread rocko
Ok that makes a little more sense. But I have some questions. Do I have to use a TableView? Originally I used DataView but that displays all the fields in the database, I just want to use some of the fields if certain conditions apply, like if the 'Days Left' field is less than 20 days. Then if s

Re: [Gambas-user] TableView Data from database

2012-09-28 Thread Bruce
On Fri, 2012-09-28 at 19:27 -0700, rocko wrote: > Huh? > I'm sorry Bruce I'm not following. > I want the fields to update when the form opens. > Just the ID, Location and Days Left fields. > Unless a row is selected in the tableview, Tableview1.Row will be -1. (You can check that in the debugger.)

Re: [Gambas-user] TableView Data from database

2012-09-28 Thread rocko
Huh? I'm sorry Bruce I'm not following. I want the fields to update when the form opens. Just the ID, Location and Days Left fields. On 09/28/2012 07:17 PM, Bruce wrote: > On Fri, 2012-09-28 at 18:55 -0700, rocko wrote: >> I get a "Bad Row Index" error when I do that. >> >> >> On 09/28/2012 12:07

Re: [Gambas-user] TableView Data from database

2012-09-28 Thread Bruce
On Fri, 2012-09-28 at 18:55 -0700, rocko wrote: > I get a "Bad Row Index" error when I do that. > > > On 09/28/2012 12:07 AM, Алексей Беспалов wrote: > > It do that: > > > > sResult = DB.Edit("inventory", id = &1, ID) > > sResult!id = ID > > 'sResult!location = TableView1.Columns[1].

Re: [Gambas-user] TableView Data from database

2012-09-28 Thread rocko
I get a "Bad Row Index" error when I do that. On 09/28/2012 12:07 AM, Алексей Беспалов wrote: > It do that: > > sResult = DB.Edit("inventory", id = &1, ID) > sResult!id = ID > 'sResult!location = TableView1.Columns[1]. > * sResult!location = TableView1[TableView1.Row, 1].Text* > sResult.

Re: [Gambas-user] TableView Data from database

2012-09-28 Thread Алексей Беспалов
It do that: sResult = DB.Edit("inventory", id = &1, ID) sResult!id = ID 'sResult!location = TableView1.Columns[1]. * sResult!location = TableView1[TableView1.Row, 1].Text* sResult.Update 2012/9/28 rocko > I'm using a Table view to view data from an SQLite database. > I would use a datav

[Gambas-user] TableView Data from database

2012-09-27 Thread rocko
I'm using a Table view to view data from an SQLite database. I would use a dataview but I only need to display some database fields not all of them. This is the code I have so far: Public Sub Form_Open() Dim sResult As Result Dim id As Integer TableView1.Columns.Count = 3 TableView1.Rows.Cou