Re: updateRow() Fails
From: Pete Loveall (psl_at_ametx.com.NO_SPAM)
Date: 08/08/04
- Previous message: KC Wong: "Re: Japanese words"
- In reply to: Pete Loveall: "updateRow() Fails"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 8 Aug 2004 07:04:57 -0500
This driver does not implement prepared statements in a compliant manner.
Instead of using parameterized operations where there is no conversion of
strings, the driver converts all parameters to string values for use in text
SELECT, INSERT, and UPDATE statements. Very ugly and non-compliant. This
prevents proper storage and retrieval of strings with apostrophes, using
updateBytes() for varchar fields, etc.
The jTDS driver works properly with PreparedStatement constructs and I will
stick with that.
Pete Loveall
"Pete Loveall" <psl@ametx.com.NO_SPAM> wrote in message
news:uemDhpJeEHA.4068@TK2MSFTNGP11.phx.gbl...
> I am using the JDBC SP3 driver. My tables use varchar columns (no Unicode
> due to way data is received). I have set
> SendStringParametersAsUnicode=false. Everything works well except...
>
> Updating a varchar column with byte values sometimes fails. The code does
a
> SELECT, then an updateRow() if the data is found. Below is the two
batches
> sent by JDBC to the SQL Server (happens with both SelectMethod=Cursor and
> SelectMethod=Direct, I used the SelectMethod=Direct batches since they are
> simpler to read).
>
> One thing I find very wierd: why does the UPDATE have all the extra stuff
> added to the WHERE clause? Seems like a waste and probably what is
killing
> the update.
- Previous message: KC Wong: "Re: Japanese words"
- In reply to: Pete Loveall: "updateRow() Fails"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|