[Gambas-user] Adding values to fields in SQLite table??

rocko sunblaster5 at ...626...
Wed Aug 8 18:18:57 CEST 2012


Ok I've tried all the suggestions you all have made and none of them
work.
I don't get any error's printed, the table just wont update.
Should 'rtable' be AS Result or AS String??



On Wed, 2012-08-08 at 15:33 +0930, Adam Ant wrote:
> On Wed, Aug 8, 2012 at 2:59 PM, Fabien Bodard <gambas.fr at ...626...> wrote:
> > Le 8 août 2012 04:49, "Adam Ant" <adamnt42 at ...626...> a écrit :
> >> The answer is:
> >>
> > It's create
> >> rTable=$hConn.create("Inventory",<some request to get the record you
> >> want to update>)
> >> IF rTable.Available then
> >>   rTable!name=txtName.Text
> >>   rTable.Update
> >> END IF
> >>
> >
> > Don't open/ close the db each time
> >
> 
> Yes, sorry Roko (and Fabien), I forgot you were trying to ADD a new row.
> 
> So it's really
>   rTable=$hConn.Create("Inventory")
>   IF rTable.Available then
>     rTable!name=txtName.Text
>     TRY rTable.Update
>     IF ERROR THEN
> '       your update failed, possibly because of a duplicate key
>     ENDIF
>   END IF
> 
> 
> Bruce
> 
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and 
> threat landscape has changed and how IT managers can respond. Discussions 
> will include endpoint security, mobile security and the latest in malware 
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user






More information about the User mailing list