Page 1 of 1

FIVEODBC

Posted: Tue Nov 08, 2005 12:14 pm
by Silvio
I make tests but it not run
I can Sho w a mdb files on listbox but i cannot edit or insert a record
I read Fiveodbc but there is not a test program
Some can explain me how can I insert a record into Mdb file with xharbour and fivewin
regards

Posted: Thu Nov 10, 2005 8:54 am
by Antonio Linares
Silvio,

If you mean the FiveODBC RDD, then it is just available for 16 bits. For 32 bits you may use ADO.

Please do a search at news://news.fivetechsoft.com for ADO.

Posted: Thu Nov 10, 2005 8:12 pm
by Silvio
thanks

Code: Select all

// prova con ADO


#include "Fivewin.ch"


Function Main()

Local oRS,oLbx


      oRS = CREATEOBJECT( "ADODB.Recordset" )
      oRS:Open( "SELECT * FROM Prodotti ORDER BY Codice","Provider=Microsoft.Jet.OLEDB.4.0;Data Source=ecom.mdb",0,3 )


// Creo il list box e i bottoni


        DEFINE DIALOG oDlg FROM 3, 3 TO 28, 79 TITLE "Gestione Prodotti"
         @ 0,  1 SAY " &Prodotti"  OF oDlg






         @ 1, 1 LISTBOX oLbx FIELDS  oRS:Fields( "Codice" ):value,;
                                     oRS:Fields( "Prodotto" ):Value,;
                                     oRS:Fields( "Categoria" ):Value,;
                                     oRS:Fields( "Scategoria" ):Value ;
                             HEADER "Codice", "Prodotto","Categoria","Scategoria" ;
                             SIZE 284, 137 OF oDlg


   @ 9,  1 BUTTON "&Nuovo"    OF oDlg  SIZE 40, 12
   @ 9,  8 BUTTON "&Modifica" OF oDlg  SIZE 40, 12
   @ 9, 15 BUTTON "&Cancella" OF oDlg  SIZE 40, 12
   @ 9, 22 BUTTON "&Ricerca" OF oDlg  SIZE 40, 12
   @ 9, 29 BUTTON "&Stampa"  OF oDlg  SIZE 40, 12
   @ 9, 40 BUTTON "&Uscita"   OF oDlg ACTION oDlg:End()         SIZE 40, 12

   ACTIVATE DIALOG oDlg



    oRS:Close()
    RETURN NIL
It not run why ?