Re: updateRow() Fails

From: Pete Loveall (psl_at_ametx.com.NO_SPAM)
Date: 08/08/04

  • Next message: geossl: "Configure JDBC Connection Pool size"
    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.


  • Next message: geossl: "Configure JDBC Connection Pool size"

    Relevant Pages

    • PCMCIA product id strings -> hashes generation at compilation time? [Was: Re: [patch 14/38] pcmci
      ... Most pcmcia devices are matched to drivers using "product ID strings" ... embedded in the devices' Card Information Structures, ... Only the hashes are stored in "modules.alias", ... While having to determine the crc32 hashes is a hassle to device driver ...
      (Linux-Kernel)
    • RE: Question on drivers installation during FBA and fbreseal
      ... C:\WINDOWS\inf\oem3.inf, using [STRINGS] instead. ... Effective driver date: 03/04/2003. ... #-166 Device install function: DIF_SELECTBESTCOMPATDRV. ... Does the first bootup after fbreseal reinstall the ...
      (microsoft.public.windowsxp.embedded)
    • Re: how to display messages during boot time
      ... the disk checker that occasionally kicks in as XP boots uses ... this fucntion to print strings to the screen. ... display strings if the video driver hasn't taken over yet, ...
      (microsoft.public.development.device.drivers)
    • Re: NT 4.0 printer drivers
      ... with the HP-provided driver for the same printer. ... Compare the strings for the model you want to use in each INF-file ... you'll get the error "Windows cannot locate a suitable ...
      (microsoft.public.windows.server.migration)
    • Re: magic_quotes
      ... How can you detect real string length if you have some crap slashes in it? ... convert all strings to strings, strip any possible crap which may be magically ... mysql_real_escape_string since the database isn't the same every time (ok ... you have perfect tool in prepared statements. ...
      (comp.lang.php)

    Loading