Subject | Re: Patch |
---|---|
Author | rrokytskyy |
Post date | 2002-07-11T18:20:04Z |
Thanks a lot! I will review it and commit to CVS.
Best regards,
Roman Rokytskyy
Best regards,
Roman Rokytskyy
--- In Firebird-Java@y..., Leonardo Vieira Cervo <dixtal9@t...> wrote:
> Hi,
>
> I'm submitting this small patch which is needed to use the JBuilder
Data
> Express classes with the jdbc driver.
>
> Leonardo.
>
> --- ./client-java/src/org/firebirdsql/jdbc/FBPreparedStatement.java
Thu Jul 11 15:09:13 2002
> +++ /home/leocer/client-
java/src/org/firebirdsql/jdbc/FBPreparedStatement.java Wed Jul 10
09:03:14 2002
> @@ -72,7 +72,7 @@
> // was initialized, executeQuery, executeUpdate and execute
methods
> // will throw an exception if this array contains at least one
false value.
> protected boolean[] isParamSet;
> -
> +
> FBPreparedStatement(FBConnection c, String sql) throws
SQLException {
> super(c);
> try {
> @@ -161,7 +161,7 @@
> public void setNull(int parameterIndex, int sqlType) throws
SQLException {
> if (parameterIndex > fixedStmt.getInSqlda().sqlvar.length)
> throw new SQLException("invalid column index");
> -
> +
> fixedStmt.getInSqlda().sqlvar[parameterIndex - 1].sqlind
= -1;
> fixedStmt.getInSqlda().sqlvar[parameterIndex - 1].sqldata
= null;
> parameterWasSet(parameterIndex);
> @@ -173,7 +173,7 @@
> getField(parameterIndex).setBinaryStream(inputStream,
length);
> parameterWasSet(parameterIndex);
> }
> -
> +
> public void setBytes(int parameterIndex, byte[] x) throws
SQLException {
> getField(parameterIndex).setBytes(x);
> parameterWasSet(parameterIndex);
> @@ -256,7 +256,7 @@
> protected FBField getField(int columnIndex) throws
SQLException {
> if (columnIndex > fixedStmt.getInSqlda().sqlvar.length)
> throw new SQLException("invalid column index");
> -
> +
> FBField thisField = FBField.createField(getXsqlvar
(columnIndex));
>
> if (thisField instanceof FBBlobField)
> @@ -443,7 +443,7 @@
> if (!canExecute)
> throw new SQLException("Not all parameters were set. "
+
> "Cannot execute query.");
> -
> +
> XSQLVAR[] inVars = fixedStmt.getInSqlda().sqlvar;
>
> for(int i = 0; i < inVars.length; i++)
> @@ -758,7 +758,7 @@
> * Execute statement internally. This method checks if all
parameters
> * were set.
> */
> -/*
> +/*
> protected boolean internalExecute(String sql) throws
GDSException, SQLException {
> boolean canExecute = true;
> for (int i = 0; i < isParamSet.length; i++){