Re: How to deal with "oid" field when it contains NULL ?

Поиск
Список
Период
Сортировка
От RaviShankar K
Тема Re: How to deal with "oid" field when it contains NULL ?
Дата
Msg-id 001c01c120d2$30680930$0400a8c0@ejan.net
обсуждение исходный текст
Ответ на How to deal with "oid" field when it contains NULL ?  ("RaviShankar K" <ravi@e-jan.co.jp>)
Список pgsql-jdbc
Hi,
 
    I could not mention my question clearly in my previous post.
    My question is,
   
    Will rs.getInt("someBlobColumn") always return 0 when oid type column contains NULL ?
 
Ravi
   
----- Original Message -----
Sent: Thursday, August 09, 2001 PM 05:25
Subject: [JDBC] How to deal with "oid" field when it contains NULL ?

Hi,
 
    I am retrieving value of "oid" field using "getBlob(columnName)" method of ResultSet .
It is working fine if that field contains some "oid" reference . But if the field contains
NULL , then it is throwing following error .
 
    "FastPath call returned ERROR:  inv_open: large object 0 not found"
 
    I am able to solve the problem using the following way .
   
    ResultSet rs ;
    //If the value of reference is 0 , then there is no Blob value in the row for the column "columnX".
    if(rs.getInt("columnX") != 0){
        Blob someBlob = rs.getBlob("columnX");
    }
 
    Is there any better way than this ?
    Thanks in advance.
 
Regards,
Ravi
 
 
 
 
       
   

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Denis Bucher
Дата:
Сообщение: Re: Bug found in the driver
Следующее
От: Liam Stewart
Дата:
Сообщение: Re: Re: JDBC 2.0 conformance, documentation and todo list