Article View: borland.public.jbuilder.database
Article #210Re: ProcedureDataSet and resultSetToDataSet doesn't work
From: John Moore (TeamB)
Date: Mon, 26 Jun 2006 18:12
Date: Mon, 26 Jun 2006 18:12
104 lines
4610 bytes
4610 bytes
Christa Schneider wrote:
> Here the exeption:
> java.lang.NullPointerException
> at
> org.postgresql.jdbc2.AbstractJdbc2ResultSetMetaData.getColumnCount(AbstractJdbc2ResultSetMetaData.java:34)
> at com.borland.dx.sql.dataset.RuntimeMetaData.a(Unknown Source)
> at com.borland.dx.sql.dataset.JdbcProvider.a(Unknown Source)
> at com.borland.dx.sql.dataset.Database.resultSetToDataSet(Unknown Source)
> at tools.StoredTest.jbInit(StoredTest.java:73)
> at tools.StoredTest.<init>(StoredTest.java:20)
> at tools.StoredTest.main(StoredTest.java:29)
>
Ok.. the problem is that your resultset has no metadata attached.. (it's
null) Notice "ResultSetMetaData.getColumnCount(...)"
I have never used this syntax.. (row.getObject(..)) so I'm not familiar
with what it returns. I would research this first.. It could be a jdbc
implementation issue.. (contact Postgresql folks.. maybe..??)
John...
> This is the code:
> ResultSet rs1 = (ResultSet) row.getObject("ref");
> StorageDataSet pd=new StorageDataSet();
> db.resultSetToDataSet(pd,rs1);
> while (pd.next()) {
> System.out.println(pd.getString(3));
> }
> /*
> //this works
> while(rs1.next()) {
> System.out.println(rs1.getString(3));
> }
> */
> Thanks
> Christa
>
> "John Moore (TeamB)" <jbm@microps.com> schrieb im Newsbeitrag
> news:449d80af$1@newsgroups.borland.com...
>> It should...
>>
>> What errors are you getting.. (stacktrace.. please...)
>>
>> John...
>>
>>
>>
>>
>> Christa Schneider wrote:
>>> Thank you for the answer, but it is only a type mistake.
>>>
>>> THIS DOESN' T WORK, why?
>>> StorageDataSet pd=new StorageDataSet();
>>> db.resultSetToDataSet(pd,rs1); //or pd = db.resultSetToDataSet(rs1);
>>>
>>> Thanks
>>> Christa Schneider
>>>
>>> "John Moore (TeamB)" <jbm@microps.com> schrieb im Newsbeitrag
>>> news:449c3030$1@newsgroups.borland.com...
>>>> Christa Schneider wrote:
>>>>
>>>>> StorageDataSet pd=new StorageDataSet();
>>>>> db.resultSetToDataSet(ds,rs1); //or pd = db.resultSetToDataSet(rs1);
>>>> Try...
>>>>
>>>> StorageDataSet pd=new StorageDataSet();
>>>> db.resultSetToDataSet(pd,rs1);
>>>>
>>>>
>>>> --
>>>> =============================================
>>>> TeamB are volunteer helpers. Please DO NOT REPLY VIA EMAIL!
>>>> Post all questions and replies to this newsgroup ONLY
>>>> For papers on DataExpress, Applets, JSP, and Web Development go to:
>>>> http://www.microps.com/mps/paperFAQ.html
>>>> ====================================================
>>>>
>>>
>>>
>>
>> --
>> =============================================
>> TeamB are volunteer helpers. Please DO NOT REPLY VIA EMAIL!
>> Post all questions and replies to this newsgroup ONLY
>> For papers on DataExpress, Applets, JSP, and Web Development go to:
>> http://www.microps.com/mps/paperFAQ.html
>> ====================================================
>>
>
>
>
--
=============================================
TeamB are volunteer helpers. Please DO NOT REPLY VIA EMAIL!
Post all questions and replies to this newsgroup ONLY
For papers on DataExpress, Applets, JSP, and Web Development go to:
http://www.microps.com/mps/paperFAQ.html
====================================================
Technical Details
Message-ID:
<44a023aa$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!198.186.190.80.MISMATCH!transit4.readnews.com!news-out.readnews.com!transit3.readnews.com!news-out.readnews.com!news-out.readnews.com!news-xxxfer.readnews.com!news-out.usenet.com!sp6iad.superfeed.net!in2.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<449bca0b$1@newsgroups.borland.com> <449c3030$1@newsgroups.borland.com> <449c3946$1@newsgroups.borland.com> <449d80af$1@newsgroups.borland.com> <449db611@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 1073da,de14a88c3d1af0e4 X-Google-Attributes: gid1073da,public X-Google-Language: ENGLISH,ASCII-7-bit Subject: Re: ProcedureDataSet and resultSetToDataSet doesn't work From: "John Moore (TeamB)" <jbm@microps.com> Date: Mon, 26 Jun 2006 11:12:59 -0700 Message-ID: <44a023aa$1@newsgroups.borland.com> References: <449bca0b$1@newsgroups.borland.com> <449c3030$1@newsgroups.borland.com> <449c3946$1@newsgroups.borland.com> <449d80af$1@newsgroups.borland.com> <449db611@newsgroups.borland.com> Lines: 104 NNTP-Posting-Host: 207.137.13.178 Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!198.186.190.80.MISMATCH!transit4.readnews.com!news-out.readnews.com!transit3.readnews.com!news-out.readnews.com!news-out.readnews.com!news-xxxfer.readnews.com!news-out.usenet.com!sp6iad.superfeed.net!in2.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail Newsgroups: borland.public.jbuilder.database X-Trace: newsgroups.borland.com 1151345578 207.137.13.178 (26 Jun 2006 11:12:58 -0700) User-Agent: Thunderbird 1.5.0.4 (Macintosh/20060516) MIME-Version: 1.0 In-Reply-To: <449db611@newsgroups.borland.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit