[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.odbcnet

Empty string and null value problem with PostgreSQL as well.

MattStan

4/10/2002 6:24:00 PM

Hi,

I know similar posts have been made but not AFAIK concerning PostgreSQL.

Using odbc.net with the PostgreSQL ODBC driver and database there seems
to be both the problem concerning empty string values in table columns
and the problem with null values.

If a varchar or text type was inserted into a table with "" (the empty
string) the runtime error is this:

"Unhandled Exception: Microsoft.Data.Odbc.OdbcException: NO_DATA"

But if the varchar or text type was inserted with NULL then the error
is:

"Unhandled Exception: System.InvalidCastException: Specified cast is not
valid."

Does anyone know the best workaround for this problem?

I know Microsoft are trying to resolve this problem but is there a time
scale on this?

Thanks and regards,

Matthew
3 Answers

(Hussein Abuthuraya(MSFT))

4/10/2002 9:32:00 PM

0

MattStan

4/11/2002 3:08:00 PM

0

Thanks you for your reply Hussein. Do you know when the SP1 for
Microsoft Data Access Components 2.7 will be released? This will have
the empty string fix included in it but will it also have a fix for the
NULL value problem?

Thanks,

..matthew


"Hussein Abuthuraya(MSFT)" wrote:
>
> Hi Matthew,
>
> There is a Fix for this error as per the following KB article:
>
> FIX: ODBC Driver Mgr. Reports SQL_NO_DATA_FOUND for ANSI Driver
> ID: Q319243
> http://support.microsoft.com/default.aspx?scid=kb;en-...
>
> To get the fix, you have to contact PSS as indicated in the article.
>
> Thanks,
> Hussein Abuthuraya
> Microsoft Developer Support
>
> This posting is provided "AS IS" with no warranties, and confers no rights. You assume all risk for your use. © 2002 Microsoft Corporation. All rights reserved
>
> Are you secure? For information about the Microsoft Strategic Technology Protection Program and to order your FREE Security Tool Kit, please visit
> http://www.microsoft.co....

(Hussein Abuthuraya(MSFT))

4/11/2002 7:57:00 PM

0