Re: Bug in JDBC SQL extensions parser of the Beta SQLServer driver
- From: "Angel Saenz-Badillos[MS]" <angelsa@xxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 25 Aug 2005 11:59:29 -0700
I agree that the the parser should not be sensitive to white space. I have
entered a bug to track this issue, thank you!
--
Angel Saenz-Badillos [MS] DataWorks
This posting is provided "AS IS", with no warranties, and confers no
rights.Please do not send email directly to this alias.
This alias is for newsgroup purposes only.
I am now blogging: http://weblogs.asp.net/angelsb/
"Joe Weinstein" <joeNOSPAM@xxxxxxx> wrote in message
news:%23xndgbZqFHA.2604@xxxxxxxxxxxxxxxxxxxxxxx
> Hi all.
>
> I just tried this code with the new beta driver and it fails
> at the execute() call!
>
> c = d.connect("jdbc:sqlserver://joe:1433", props );
>
> DatabaseMetaData dd = c.getMetaData();
> System.out.println("Driver version is " +
> dd.getDriverVersion() );
> System.out.println("Database Major version is " +
> dd.getDatabaseMajorVersion() );
> System.out.println("Database Minor version is " +
> dd.getDatabaseMinorVersion() );
>
> Statement s = c.createStatement();
> try { s.executeUpdate("drop procedure joeproc"); } catch
> (Exception ignore){}
> try { s.executeUpdate("drop table joetable"); } catch (Exception
> ignore){}
>
> s.executeUpdate("create table joetable (bar varchar(30) not
> null)");
> s.executeUpdate("create procedure joeproc as "
> + " begin "
> + " insert into joetable values('1') "
> + " insert into joetable values(NULL) "
> + " insert into joetable values('2') "
> + " end ");
>
> PreparedStatement ps = c.prepareStatement("{ call joeproc() }");
> boolean getResultSet = ps.execute();
>
> I get:
>
> Driver version is 1.0.107.104
> Database Major version is 8
> Database Minor version is 0
> com.microsoft.sqlserver.jdbc.SQLServerException: Line 1: Incorrect syntax
> near '{'.
> at
> com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(Unknown
> Source)
> at com.microsoft.sqlserver.jdbc.IOBuffer.processPackets(Unknown
> Source)
> at
> com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(Unknown
> Source)
> at
> com.microsoft.sqlserver.jdbc.SQLServerStatement.sendExecute(Unknown
> Source)
> at
> com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecute(Unknown Source)
> at
> com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.execute(Unknown
> Source)
>
> The problem is in the driver's JDBC SQL extension parser. If I remove the
> whitespace
> in the SQL to be c.prepareStatement("{call joeproc()}"), it works. This
> parser should
> not be sensitive to white space...
>
> Joe Weinstein at BEA Systems
>
.
- References:
- Stored Procedure error is not catched
- From: Rizwan
- Bug in JDBC SQL extensions parser of the Beta SQLServer driver
- From: Joe Weinstein
- Stored Procedure error is not catched
- Prev by Date: Re: Stored Procedure error is not catched
- Next by Date: Re: Stored Procedure error is not catched
- Previous by thread: Bug in JDBC SQL extensions parser of the Beta SQLServer driver
- Next by thread: Re: Stored Procedure error is not catched
- Index(es):
Relevant Pages
|
Loading