Results 1 to 5 of 5

Thread: VFP ODBC primer

  1. #1
    Senior Member
    Join Date
    Jan 2014

    VFP ODBC primer

    Hi guys

    Looking to use VFP ODBC driver to connect Lianja app to be able to add data to existing VFP table. Lots of you must have done something similar.

    Never used ODBC before and read quite a lot but the 1st steps to getting it up and running seem illusive and are never mentioned.

    1. Where can we download the VFP ODBC driver(s) from? We've downloaded and installed just about everything that says it is a VFP ODBC driver but none appear in the ODBC Data Sources in windows (32 or 64 bit even after reboot) even though there are drivers for loads of other formats, including Lianja.
    2. Once that is achieved, presumably the username and password are just left blank as "unauthenticated access" has no meaning in VFP?
    3. If the server is on the same network, how do we set up the path to the file?

    Once that is set up, using virtual tables inside Lianja is documented fairly well.

    Virtual tables look like a great idea and flexible too but is ODBC going to be more reliable than using a web service to just send the data to?

    Thanks in advance

    Last edited by SpringBox; 2019-10-28 at 18:27.

  2. #2
    Lianja MVP
    Join Date
    Feb 2012
    Berea, KY, USA
    Hi Simon,

    That newest VFP ODBC Driver produced by Microsoft is for VFP6. DevArt has a driver that works for VFP9 data types, as Barry has mentioned.

    VFP ODBC drivers works just as any ODBC driver works. You just have to know the connection string properties. DevArt will supply that information. In general, has specs for all the common drivers.

    lcConnStr = "your connstring goes here"
    lnHandle = sqlstringconnect(lcConnStr)
    ln = sqlexec(lnHandle,"select fielda, fieldb from tablea","mycursor")
    The connstring info and the sqlexec select string can be used in a Virtual Table.



    PS: unless you have to keep the old code running, the better choice is to move everything over to Lianja.

    PPS: to find the VFP6 ODBC Driver, google (without the quotes) "vfp odbc driver download" I would strongly suggest getting the DevArt ODBC driver to avoid gotchas. I don't have a comprehensive list, but you can find references on the web with a little searching.
    Last edited by HankFay; 2019-10-29 at 10:08.

  3. #3
    Senior Member
    Join Date
    Jan 2014
    Thanks Hank

    That's a big help


  4. #4
    Join Date
    Feb 2012
    You should be aware though, that all those ODBC drivers are not able to run any trigger code, since they're lacking the VFP runtime to interpret that code. Therefore,if an installation relies on Triggers, don't do any Updates, Deletes or Inserts via ODBC.
    BTW: It's a similar problem with Servoy and their Java-based VFP-driver.

  5. #5
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    UK, USA, Thailand
    Blog Entries
    Good info. Also worth pointing out is that Lianja ODBC driver is a proper client server driver using TCPIP network protocol. The server has the full Lianja engine embedded within it so stored procedures and triggers work as expected.
    Principal developer of Lianja, Recital and other products

    Follow me on:




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