[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: JDBCR4 question
If you don't need the results set, don't ask for it...
// Prepare SQL statement string to return drawings
prepstm = JDBC_prepStmt(conn:'SELECT count(*) as nbrRows ' +
'FROM dbo.docPub ' +
'WHERE dbo.docPub.Name = ? ') ;
technically, you'll still have a results set, but it will only be one
row with one column.
Charles
On Fri, Feb 11, 2011 at 11:56 AM, Gerald Magnuson
<gmagnuson@xxxxxxxxxxxxx> wrote:
>
> Excuse me, probably the wrong place...
>
> I just created a program using JDBCR4 connecting to a MSSQL server.
>
> What I have works, but I would like to improve it...
>
> I just need to know I have a record, I don't need to return a result
> set...
>
> What Can I do instead of jdbc_nextRow?
>
>
> My Code:
>
> // Prepare SQL statement string to return drawings
>
> prepstm = JDBC_prepStmt(conn:'SELECT dbo.docPub.DocId, ' +
>
> 'dbo.docPub.CurrentRevId, ' +
>
> 'dbo.docPub.Name, ' +
>
> 'dbo.docPub.Path ' +
>
> 'FROM dbo.docPub ' +
>
> 'WHERE dbo.docPub.Name = ? ') ;
>
>
> if (prepstm = *NULL);
>
> jdbc_close(conn);
>
> return;
>
> endif;
>
>
> JDBC_SetString(prepstm:1:IDRAW) ;
>
>
> rs = jdbc_ExecPrepQry(prepstm);
>
>
> $Count = 0 ;
>
> dow (jdbc_nextRow(rs));
>
> $Count += 1 ;
>
> Leave ;
>
> enddo;
>
>
> Gerald Magnuson
>
> Supervisor, System i Adminstration & Development
>
> IBM Certified Specialist, i5 Administration
>
> The Knapheide Manufacturing Company
>
> Quincy, Illinois
>
> (217) 592-5291
>
> -----------------------------------------------------------------------
> This is the FTPAPI mailing list. To unsubscribe, please go to:
> http://www.scottklement.com/mailman/listinfo/ftpapi
> -----------------------------------------------------------------------
>
>
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------