Results 1 to 3 of 3

Thread: DSNLess connection to Lianja Sql Server

  1. #1

    DSNLess connection to Lianja Sql Server

    Hi, can connect with following data source
    [LianjaDemo]
    Driver = Lianja
    DATABASE = ODBC:RECITAL:SERVERNAME=10.231.92.232;USERNAME=?;P ASSWORD=?;DATABASE=southwind;

    isql test
    [root@lnxdev ~]# isql -v lianjademo
    +---------------------------------------+
    | Connected! |
    | |
    | sql-statement |
    | help [tablename] |
    | quit |
    | |
    +---------------------------------------+
    SQL> select count(1) from employees
    +-----------+
    | Count(1) |
    +-----------+
    | 9 |
    +-----------+
    SQLRowCount returns 1
    1 rows fetched
    SQL>

    Connecting from console with following connection string fails (Lianja Sql Server and App builder on Linux)
    lcDSNLess='DRIVER=Lianja ODBC Driver;SERVER=10.231.92.232;DATABASE=southwind;Uid =?;Pwd=?;'

    lnConnHandle=SQLSTRINGCONNECT(lcDSNLess)
    if lnConnHandle > 0
    sqlexec(lnConnHandle,"select count(*) from employees")
    list
    sqldisconnect(lnConnHandle)
    else
    messagebox("connection failed")
    endif

    what would be missing or wrong?
    Regards

  2. #2
    Lianja Team yvonne.milne's Avatar
    Join Date
    Feb 2012
    Location
    Berkshire, UK
    Posts
    1,842
    Hi,

    Try this:

    Code:
    lcDSNLess='DRIVER=Lianja;SERVER=10.231.92.232;DATABASE=southwind;Uid =?;Pwd=?;'
    The Driver on Linux is installed in odbcinst.ini with the name 'Lianja', which is why your DSN works: 'Driver = Lianja'.

    I will get the documentation updated to show the difference between the Linux and Windows DSNless connections.

    Thanks for pointing this out,

    Yvonne

  3. #3
    Its ok now, thanks

Tags for this Thread

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