Nick Gorham | 16 Oct 2008 17:31
Favicon

test (sorry)

Testing list manager out...

--

-- 
Nick
_______________________________________________
unixODBC-dev mailing list
unixODBC-dev <at> mail.unixodbc.org
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-dev

Marco Vieira | 16 Oct 2008 21:00
Picon

odbc.ini configuration

Hi all,

Could some one help me solving this problem.

in my odbc.ini I'm trying to add the following parameter:

DMEnvAttr = SQL_ATTR_UNIXODBC_ENVATTR={CLASSPATH=/path_for_jar/jarFile.jar}

When i use "isql DEMOBRIDGE" to test my driver on the trace file a get this msg that says that is missing a class from the jarFile.jar.

[ODBC][3855][SQLConnect.c][3576]
                Entry:
                        Connection = 0x8050380
                        Server Name = [DEMOBRIDGE][length = 12 (SQL_NTS)]
                        User Name = [NULL]
                        Authentication = [NULL]
                ENV ATTR [SQL_ATTR_UNIXODBC_ENVATTR=$CLASSPATH=/path_for_jar/jarFile.jar] ret = -1

I've also put jarFile.jar in the jvm that is defined in odbcinst.ini (JvmPath), located in:
a) /path_to_jre/lib
b) /path_to_jre/lib/ext

When testing my driver with isql got the same error in my driver log:

Root exception is java.lang.ClassNotFoundException:......

Thanks in advance for your time.

Best Regards



_______________________________________________
unixODBC-dev mailing list
unixODBC-dev <at> mailman.unixodbc.org
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-dev
Nick Gorham | 16 Oct 2008 21:27
Favicon

Re: odbc.ini configuration

Marco Vieira wrote:

> Hi all,
>
> Could some one help me solving this problem.
>
> in my odbc.ini I'm trying to add the following parameter:
>
> *DMEnvAttr = 
> SQL_ATTR_UNIXODBC_ENVATTR={CLASSPATH=/path_for_jar/jarFile.jar}*
>
> When i use "*isql DEMOBRIDGE*" to test my driver on the trace file a 
> get this msg that says that is missing a class from the jarFile.jar.
>
> *[ODBC][3855][SQLConnect.c][3576]
>                 Entry:
>                         Connection = 0x8050380
>                         Server Name = [DEMOBRIDGE][length = 12 (SQL_NTS)]
>                         User Name = [NULL]
>                         Authentication = [NULL]
>                 ENV ATTR 
> [SQL_ATTR_UNIXODBC_ENVATTR=$CLASSPATH=**/path_for_jar/jarFile.jar**] 
> ret = -1*
>
Hi,

the -1 indicates that it failed to set the value. So for example:

        DMEnvAttr       = 
SQL_ATTR_UNIXODBC_ENVATTR={ORACLE_HOME=/home/nick/product/9.2.0/}

Shows in the log file

        ENV ATTR 
[SQL_ATTR_UNIXODBC_ENVATTR=ORACLE_HOME=/home/nick/product/9.2.0/] ret = 0

I would check where the $ has come from

--

-- 
Nick
_______________________________________________
unixODBC-dev mailing list
unixODBC-dev <at> mailman.unixodbc.org
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-dev

Marco Vieira | 17 Oct 2008 09:43
Picon

Re: odbc.ini configuration

The $ came from test that I've made. In fact I've tested with and without the $, same result.

Any more ideas!?

2008/10/16 Nick Gorham <nick <at> lurcher.org>
Marco Vieira wrote:

Hi all,

Could some one help me solving this problem.

in my odbc.ini I'm trying to add the following parameter:

*DMEnvAttr = SQL_ATTR_UNIXODBC_ENVATTR={CLASSPATH=/path_for_jar/jarFile.jar}*

When i use "*isql DEMOBRIDGE*" to test my driver on the trace file a get this msg that says that is missing a class from the jarFile.jar.

*[ODBC][3855][SQLConnect.c][3576]
               Entry:
                       Connection = 0x8050380
                       Server Name = [DEMOBRIDGE][length = 12 (SQL_NTS)]
                       User Name = [NULL]
                       Authentication = [NULL]
               ENV ATTR [SQL_ATTR_UNIXODBC_ENVATTR=$CLASSPATH=**/path_for_jar/jarFile.jar**] ret = -1*

Hi,

the -1 indicates that it failed to set the value. So for example:

      DMEnvAttr       = SQL_ATTR_UNIXODBC_ENVATTR={ORACLE_HOME=/home/nick/product/9.2.0/}

Shows in the log file

      ENV ATTR [SQL_ATTR_UNIXODBC_ENVATTR=ORACLE_HOME=/home/nick/product/9.2.0/] ret = 0

I would check where the $ has come from

--
Nick
_______________________________________________
unixODBC-dev mailing list
unixODBC-dev <at> mailman.unixodbc.org
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-dev



--
Melhores Cumprimentos,

Marco António Vieira

PS:
Não mostre aos outros os endereços electrónicos dos teus amigos, apaga-os e use "Bcc"  ou "Cco" (cópia oculta), para os reenvios.
Dificulta a propagação de Vírus, Spams e Banners. É para o bem de todos nós.
_______________________________________________
unixODBC-dev mailing list
unixODBC-dev <at> mailman.unixodbc.org
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-dev
Nick Gorham | 17 Oct 2008 10:21
Favicon

Re: odbc.ini configuration

Marco Vieira wrote:

>The $ came from test that I've made. In fact I've tested with and without
>the $, same result.
>
>Any more ideas!?
>  
>

Do you get the -1 without the $

--

-- 
Nick
_______________________________________________
unixODBC-dev mailing list
unixODBC-dev <at> mailman.unixodbc.org
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-dev

Marco Vieira | 17 Oct 2008 11:14
Picon

Re: odbc.ini configuration

Yes.

[ODBC][4511][SQLConnect.c][3576]
                Entry:
                        Connection = 0x8050380
                        Server Name = [DEMOBRIDGE][length = 12 (SQL_NTS)]
                        User Name = [NULL]
                        Authentication = [NULL]
                ENV ATTR [SQL_ATTR_UNIXODBC_ENVATTR=CLASSPATH=/path_to_jarFile.jar] ret = -1



2008/10/17 Nick Gorham <nick <at> lurcher.org>
Marco Vieira wrote:

The $ came from test that I've made. In fact I've tested with and without
the $, same result.

Any more ideas!?
 

Do you get the -1 without the $


--
Nick
_______________________________________________
unixODBC-dev mailing list
unixODBC-dev <at> mailman.unixodbc.org
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-dev



--
Melhores Cumprimentos,

Marco António Vieira

PS:
Não mostre aos outros os endereços electrónicos dos teus amigos, apaga-os e use "Bcc"  ou "Cco" (cópia oculta), para os reenvios.
Dificulta a propagação de Vírus, Spams e Banners. É para o bem de todos nós.
_______________________________________________
unixODBC-dev mailing list
unixODBC-dev <at> mailman.unixodbc.org
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-dev
Nick Gorham | 17 Oct 2008 11:22
Favicon

Re: odbc.ini configuration

Marco Vieira wrote:

>Yes.
>
>[ODBC][4511][SQLConnect.c][3576]
>                Entry:
>                        Connection = 0x8050380
>                        Server Name = [DEMOBRIDGE][length = 12 (SQL_NTS)]
>                        User Name = [NULL]
>                        Authentication = [NULL]
>                ENV ATTR
>[SQL_ATTR_UNIXODBC_ENVATTR=CLASSPATH=/path_to_jarFile.jar] ret = -1
>  
>

Just tried exactly what you have and it seems to work fine,

All I can suggest is try 2.2.13pre, as there may be a change I have 
forgotton in there, and if that still fails, then edit 
DriverManager/__attribute.c abd add some debug in __set_local_attribute 
after the putenv to displat errno and see just why its failing.

--

-- 
Nick
_______________________________________________
unixODBC-dev mailing list
unixODBC-dev <at> mailman.unixodbc.org
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-dev

Marco Vieira | 17 Oct 2008 15:15
Picon

Re: odbc.ini configuration

I'm using unixODBC 2.2.12, I'll give a try to 2.2.13pre

2008/10/17 Nick Gorham <nick <at> lurcher.org>
Marco Vieira wrote:

Yes.

[ODBC][4511][SQLConnect.c][3576]
              Entry:
                      Connection = 0x8050380
                      Server Name = [DEMOBRIDGE][length = 12 (SQL_NTS)]
                      User Name = [NULL]
                      Authentication = [NULL]
              ENV ATTR
[SQL_ATTR_UNIXODBC_ENVATTR=CLASSPATH=/path_to_jarFile.jar] ret = -1
 

Just tried exactly what you have and it seems to work fine,

All I can suggest is try 2.2.13pre, as there may be a change I have forgotton in there, and if that still fails, then edit DriverManager/__attribute.c abd add some debug in __set_local_attribute after the putenv to displat errno and see just why its failing.


--
Nick
_______________________________________________
unixODBC-dev mailing list
unixODBC-dev <at> mailman.unixodbc.org
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-dev

_______________________________________________
unixODBC-dev mailing list
unixODBC-dev <at> mailman.unixodbc.org
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-dev
Tony Khalil | 23 Oct 2008 11:06

HY003 error

Hi there,

 

I am using unixODBC with easysoft ODBC Driver for Linux. I downloaded odbcpp library in order to use it as an intermediate level between ODBC and MSSQL server. When trying to fetch data from the DB I get the following error:

[state HY003][unixODBC][Driver Manager]: Invalid Application Buffer Type.

 This error does not occur if all the fields of the table accessed are of type “int”.

 

Do you have an idea what causes such an error and how could it be solved?

 

Regards,

 

Tony Khalil

===============

 

 

Beirut Office:

Yahchouchi Bldg.

Charles Malek Street – Achrafieh

Beirut – Lebanon

           

Tel: 961 1 213 027

Mob: 961 70839 646 

Fax: 961 1 201 832

           

Paris office:

PRONERGY

5 rue Ampère

91380 CHILLY MAZARIN

 

Tel. +33 1 69194303

Fax. +33 1 69194301

 

 

Dubai Office:

Jebel Ali Free Zone

PO Box: 261 840

LOB 16-236

 

 

_______________________________________________
unixODBC-dev mailing list
unixODBC-dev <at> mailman.unixodbc.org
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-dev
Nick Gorham | 23 Oct 2008 11:15
Favicon

Re: HY003 error

Tony Khalil wrote:

>Hi there,
>
> 
>
>I am using unixODBC with easysoft ODBC Driver for Linux. I downloaded odbcpp
>library in order to use it as an intermediate level between ODBC and MSSQL
>server. When trying to fetch data from the DB I get the following error:
>
>[state HY003][unixODBC][Driver Manager]: Invalid Application Buffer Type.
>
> This error does not occur if all the fields of the table accessed are of
>type “int”.
>
> 
>
>Do you have an idea what causes such an error and how could it be solved?
>
> 
>
I would expect its the functio that checks the buffer type that has 
signaled a invalid type

check_target_type( target_type )

That checks that the SQL Type is one of the folowing:

switch( c_type ) {
case SQL_C_CHAR:
case SQL_C_LONG:
case SQL_C_SHORT:
case SQL_C_FLOAT:
case SQL_C_NUMERIC:
case SQL_C_DEFAULT:
case SQL_C_DATE:
case SQL_C_TIME:
case SQL_C_TIMESTAMP:
case SQL_C_TYPE_DATE:
case SQL_C_TYPE_TIME:
case SQL_C_TYPE_TIMESTAMP:
case SQL_C_INTERVAL_YEAR:
case SQL_C_INTERVAL_MONTH:
case SQL_C_INTERVAL_DAY:
case SQL_C_INTERVAL_HOUR:
case SQL_C_INTERVAL_MINUTE:
case SQL_C_INTERVAL_SECOND:
case SQL_C_INTERVAL_YEAR_TO_MONTH:
case SQL_C_INTERVAL_DAY_TO_HOUR:
case SQL_C_INTERVAL_DAY_TO_MINUTE:
case SQL_C_INTERVAL_DAY_TO_SECOND:
case SQL_C_INTERVAL_HOUR_TO_MINUTE:
case SQL_C_INTERVAL_HOUR_TO_SECOND:
case SQL_C_INTERVAL_MINUTE_TO_SECOND:
case SQL_C_BINARY:
case SQL_C_BIT:
case SQL_C_SBIGINT:
case SQL_C_UBIGINT:
case SQL_C_TINYINT:
case SQL_C_SLONG:
case SQL_C_SSHORT:
case SQL_C_STINYINT:
case SQL_C_ULONG:
case SQL_C_USHORT:
case SQL_C_UTINYINT:
case SQL_C_GUID:
case SQL_C_WCHAR:
case SQL_ARD_TYPE:
case SQL_C_DOUBLE:

Turn on ODBC tracing and see what is being passed into the call to 
SQLBindCol It may be a type I haven't seen.

--

-- 
Nick
_______________________________________________
unixODBC-dev mailing list
unixODBC-dev <at> mailman.unixodbc.org
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-dev


Gmane