[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: back-sql, FreeTDS ODBC driver and UnixODBC ODBC Driver Manager (ITS#1581)



Hello Dan,

looks like your ODBC driver does not implement binding parameters to
parameterized queries (those with ?s in WHERE clause).
This complements well with your interactive utility working  - because in
the interactive utility you do not use parameterized queries.
The call that is probably not implemented is SQLBindParameter, but parameter
support is rather fundamental thing, so I doubt it is so easy to add it
without significant rewrites...

----- Original Message -----
From: <dmelomed@home.com>
To: <openldap-its@OpenLDAP.org>
Sent: Tuesday, February 05, 2002 6:11 AM
Subject: back-sql, FreeTDS ODBC driver and UnixODBC ODBC Driver Manager
(ITS#1581)


> Full_Name: Dan Melomedman
> Version: 2.0.21
> OS: Linux
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (68.45.81.209)
>
>
> Note: this problem is specific to FreeTDS ODBC driver for UnixODBC driver
> manager only. FreeTDS ODBC driver is not complete, however it is hopeful
to know
> which features are needed by back-sql to possibly implement them in the
FreeTDS
> ODBC driver.
>
> This is RH 6.2, with OpenLDAP 2.0.21, and unixODBC. I am using FreeTDS
ODBC
> driver to connect to MS SQL 7.0. The "isql" utility connects to the
> database
> and queries do work, however when starting slapd here's the trace message
> (the back-sql schema and test data and metadata have been loaded into the
> DB):
>
> slapd startup: initiated.
> ==>backsql_db_open(): testing RDBMS connection
> backsql_db_open(): subtree search SQL condition not specified (use
> subtree_cond directive in slapd.conf)
> backsql_db_open(): setting 'ldap_entries.dn LIKE CONCAT('%',?)' as default
> backsql_db_open(): objectclass mapping SQL statement not specified (use
> oc_query directive in slapd.conf)
> backsql_db_open(): setting 'SELECT
> id,name,keytbl,keycol,create_proc,delete_proc,expect_return FROM
> ldap_oc_mappings' by default
> backsql_db_open(): attribute mapping SQL statement not specified (use
> at_query directive in slapd.conf)
> backsql_db_open(): setting 'SELECT
>
name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_r
> eturn FROM ldap_attr_mappings WHERE oc_map_id=?' by default
> backsql_db_open(): entry insertion SQL statement not specified (use
> insentry_query directive in slapd.conf)
> backsql_db_open(): setting 'INSERT INTO ldap_entries
> (dn,oc_map_id,parent,keyval) VALUES (?,?,?,?)' by default
> backsql_db_open(): entry deletion SQL statement not specified (use
> delentry_query directive in slapd.conf)
> backsql_db_open(): setting 'DELETE FROM ldap_entries WHERE id=?' by
default
> ==>backsql_get_db_conn()
> ==>backsql_open_db_conn()
> backsql_open_db_conn(): connected, adding to tree
> <==backsql_open_db_conn()
> backsql_get_db_conn(): first call -- reading schema map
> ==>load_schema_map()
> load_schema_map(): error binding param for at_query:
> Return code: -1
> Native error code: 0
> SQL engine state: IM001
> Message: [unixODBC][Driver Manager]Driver does not support this function
> <==backsql_get_db_conn()
> ==>backsql_free_db_conn()
> backsql_free_db_conn(): closing db connection
> ==>backsql_close_db_conn()
> <==backsql_close_db_conn()
> <==backsql_free_db_conn()
> backsql_db_open(): test failed, schema map not loaded - exiting
> backend_startup: bi_db_open 0 failed!
> slapd shutdown: initiated
> ==>backsql_db_close()
> <==backsql_db_close()
>
> I am thinking the answer lies here: "Message: [unixODBC][Driver
> Manager]Driver does not support this function"; but I just need to confirm
it
> with you. Does this really mean my ODBC driver is lacking functionality,
> or the problem is possibly somewhere else? Thanks much.