Results 1 to 5 of 5

Thread: Lianja and OleDB

  1. #1
    Lianja MVP
    Join Date
    Feb 2012
    Location
    Berea, KY, USA
    Posts
    1,948

    Lianja and OleDB

    In theory, OleDB is just another activex class. (As to why I would care: let's just say it's an important edge condition.)

    Anyway, the following code runs from within VFP (after having moved the northwind directory from vfp samples to c:\temp, so I didn't have to mess with progra~1 etc): The driver itself is downloaded from here: http://www.microsoft.com/en-us/downl....aspx?id=14839

    oConn = createobject("ADODB.Connection")oRS = createobject("ADODB.Recordset")
    lcConnString = "Provider=vfpoledb;Data Source=C:\Temp\Northwind\northwind.dbc"
    oconn.ConnectionString = lcConnString
    oconn.Open()
    oRS.Open("select * from customers",oconn)
    ? oRS.Fields("companyname").Value
    oRS.Movenext()
    ? ors.Fields("companyname").Value

    This works in VFPl In Lianja, oRS.Fields(....) produces an error: METHOD 'FIELDS' not found.

    Is this an infelicity in ActiveX compatibility, or is it something special about the "ADODB.Recordset" class?

    thanks,

    Hank

  2. #2
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    5,771
    You can SET DEBUG ON and you will see helpful information about what the ActiveX is exposing and how Lianja is interacting with it.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  3. #3
    Lianja MVP
    Join Date
    Feb 2012
    Location
    Berea, KY, USA
    Posts
    1,948
    Quote Originally Posted by barrymavin View Post
    You can SET DEBUG ON and you will see helpful information about what the ActiveX is exposing and how Lianja is interacting with it.
    Wow: that's cool! That (debug_client.txt) has almost all the informaton needed for intellisense (except the names of the parameters).

    Anyway, here's the entry for Fields of the Recordset class:

    Code:
    File ../../rco_activex.cpp at line 225 PROPERTY name=Fields type=IDispatch*
    Looks like a pointer to IDispatch, if I'm reading it right.

    thanks,

    Hank

  4. #4
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    5,771
    Yes its returning it a property not a method. Thats the issue right there. Ticket it i'll see if i can proxy it as method.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  5. #5
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    5,771
    This is an old post but this should all be working as expected in v1.3.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Journey into the Cloud
Join us