Обсуждение: SQLStatistics problem

Поиск
Список
Период
Сортировка

SQLStatistics problem

От
"Robert Lintner"
Дата:
Hi,

i've got a problem with ODBC command SQLStatistics ( and SQLColumns).

I am using PostgreSQL Driver v06-40-0006 und postgresql 6.5.3

I try to retrive some table informations with
 sqlRet = SQLStatistics(   statment_handle,   0L, 0,   // All catalogs   0L, 0,   // All schemas   (SQLTCHAR *)
tableName,strlen(tableName),   SQL_INDEX_ALL,   SQL_QUICK ); // table
 

and get sqlRet == SQL_ERROR (-1)

When I try to get errror information with 
   ret = SQLGetDiagRec( SQL_HANDLE_STMT                         , statment_handle                         , 1
             , Sqlstate                      ,&NativeError                         , MessageText
, 512                         ,&TextLengthPtr );
 

I've got ret == SQL_NO_DATA and no error information :-(


The same statements work with Oracle and M$-Access ODBC-Driver correctly.

Is this feature not supported ?
or do I have to use it in a differnt way ?

Thanks in advance 

Robert





Re: [INTERFACES] SQLStatistics problem

От
Byron Nikolaidis
Дата:

Robert Lintner wrote:
> 
> Hi,
> 
> i've got a problem with ODBC command SQLStatistics ( and SQLColumns).
> 
> I am using PostgreSQL Driver v06-40-0006 und postgresql 6.5.3
> 
> I try to retrive some table informations with
> 
>   sqlRet = SQLStatistics(
>     statment_handle,
>     0L, 0,   // All catalogs
>     0L, 0,   // All schemas
>     (SQLTCHAR *) tableName, strlen(tableName),
>     SQL_INDEX_ALL,
>     SQL_QUICK ); // table
> 
> and get sqlRet == SQL_ERROR (-1)
> 
> When I try to get errror information with
> 
>     ret = SQLGetDiagRec( SQL_HANDLE_STMT
>                           , statment_handle
>                           , 1
>                           , Sqlstate
>                        ,&NativeError
>                           , MessageText
>                           , 512
>                           ,&TextLengthPtr );
> 
> I've got ret == SQL_NO_DATA and no error information :-(
> 
> The same statements work with Oracle and M$-Access ODBC-Driver correctly.
> 
> Is this feature not supported ?
> or do I have to use it in a differnt way ?
> 
> Thanks in advance
> 
> Robert
> 
> ************

I'm not sure how this 3.0 call gets translated to 2.5, but I would have
thought it would work.  Is there any error in the driver's logfile. 
Also, if you do a odbc trace you might see something.

Byron


Problem with numeric and Ms Access

От
Stefano Garavaglia
Дата:
I'm having some problem using postgresql-6.5.3 under linux and
connecting to the database with access on numeric fields.
(using latesest Postgresql odbc driver, .0007)

I don't know if this problem is related to odbc or locale settigs..

When I use the table, Access tell me the numeric filed is a Text
type, but anyway I can retrieve data.

The problem is whan I try to do calculations or assignment: with my
locale setting under windows the decimal point is a comma, so Access
try to insert values like 1234,66 and postgres complains about this
not being a valid numeric representation.

I tried also to set the correct locale under linux, setting LC_*
variables, but it didn't help with using comma instead of point:
pgsql still displays and accept only values like 1234.66

I'm using RedHat 6.1 and postgresql-6.5.3-3 rpms from postgresql.org.

Btw, float are working as expected.

There is a way of telling access "numeric" column is a numeric type?
Or am I doing something wrong?

Thanks in advance.

Ciao,Stefano
--------------------------------------------------------------
| Stefano Garavaglia  |  alter.ego@iol.it      ICQ #14209561 | 
| Milano - Italy      |  http://users.iol.it/alter.ego       |
--------------------------------------------------------------