Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Try to connect a paradox table( log.db ) since succes
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Try to connect a paradox table( log.db ) since succes
Miscellaneous
Thread ID:
01542559
Message ID:
01542559
Views:
77
hi all

I try to connect a paradox table (log.db) with new adapter VFP9 class.
I have no error but .... no table in the data session ...?
What is bad in my code ?
 LOCAL oPrivatecParamCR,;
    oCA,;
    gboblinkdir,;
    CFILEDATA,;
    cConnectString
  *------------------------------------
   *------------------------------------
  m.gboblinkdir = ADDBS("C:\Program Files\Megacom_Telecom\EasyCall\data\")

 
  m.oCA = NEWOBJECT( "CursorAdapter") && cursorAdapter" )

  m.cConnectString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+ ;
    M.gboblinkdir + ";Extended Properties=Paradox 7.x"
  *------------------------------------

  WITH m.oCA
  
    .ADOCODEPAGE = 1252 
    .ADDPROPERTY( "oconnection" , CREATEOBJECT( "adodb.connection" ) )
    .oconnection.ConnectionString = m.cConnectString

    .oconnection.OPEN()


    .Setconnection ( .oconnection )
    *-- Foxpro n'accepte pas de chiffre ds un alias !
    .ALIAS 	= "Aliaslog" && "Aliaslog"
    .TABLES	= "log" && log.db
    .DATASOURCE.cursorlocation = 3
    .DATASOURCE.locktype= 3
    .BUFFERMODEOVERRIDE = 5
    *------------------------------------

    .SELECTCMD		=	"select * from " + .TABLES
      .oconnection.execute( "select * from " + .TABLES )


    IF !.CURSORFILL( .F. , .F. ) && lire les données existantes
      AERROR( laErrors )
      * =ErrorMsg(  laErrors[2] )
      STORE laErrors[2] TO _CLIPTEXT
      MESSAGEBOX(  laErrors[2] )
    ELSE
      lnretval = .T.
      SET
    ENDIF
Next
Reply
Map
View

Click here to load this message in the networking platform