[Gambas-user] Managing databases
    Leonardo Miliani 
    leonardo at ...1237...
       
    Tue Dec 26 15:35:27 CET 2006
    
    
  
I've tried to look at the example projects but I didn't understand how
the DB connections work with Gambas... sorry :-(
I'm creating a project to manage an SQLite3 database in which I'll put
some tables to archive an agenda and other infos.
I would like to know how to select the value of a field in a table....
Let's suppose that my DB will contain these tables and fields:
CODES
typeA
typeB
AGENDA
code
address
phone
I will store 2 name types, typeA and typeB, which will have different
codes. If I will be able to create a new contact I will first look for
the avaible free code (Codes.typeA or Codes.typeB) and then I will
create the contact using in Agenda.code the above code.
I've connected to my SQLite3 DB named archive with this code:
PUBLIC SUB New_contact()
DIM hConnection AS NEW Connection
DIM hTable AS result
DIM TypeA, TypeB AS Integer
  hConnection.Name = Application.Path & "/archive"
  hConnection.Type = "sqlite3"
  hConnection.OPEN
END
But now I don't know how to select the value stored in table CODES and
field TypeA, and how to create a new field in table AGENDA.
Any suggestion will be welcome :-)
-- 
Ciao.
Leo.
Web: www.leonardomiliani.com
E-mail: leonardo at ...1237...
Scegli software opensource - Choose opensource software
    
    
More information about the User
mailing list