Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2009
    Rep Power

    Default ODBC versus SQLSERVER data retrieval issues, known ???

    I'm writing some JAVA code in a Windows XP/VISTA environment.

    I have text and audio WAV data in small SQL Server 2005 - 2008 databases [the following problem exists in both databases, i made 2 different dbs to see if it went away in v2008 but it didn't].

    The audio data was inserted into the db using :
    * FROM OPENROWSET(BULK N'C:\_fullpath_to_audio\audio_2.WAV', SINGLE_BLOB) AS Audio_Data [if there's a better / more efficient way, please let me know, this was the 1st way that worked]

    Using the same database and the same Java code, i get different results when i all i change is the connection, i.e., ODBC versus sqlserver.

    SQLSERVER retrieves the data just fine and i can play it in either my JAVA program or by Media Player as a WAV file.

    However, when i use an ODBC connection, the code "says" it returns the audio data just fine, and the JAVA code creates a local WAV file [which is the same size as the originally INSERTed WAV data] but :
    1] Inside the JAVA code, when i try to access the data, the FILE access routines keep coming back as null and saying that the file doesn't exist ?, and,
    2] If i use Explorer and try to "Play" the file in Windows Media Player, it says the file is the incorrect format ?

    And i swear, the only lines that change in the program are the connectionURL string and the Class.forName driver spec ?

    Is this a known problem ?
    Anyone have any ideas why this is happening and how to correct it ?

    Thanks in advance !!!

  2. #2
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Rep Power


    Why do you even want to use the Bridge? Just use the JDBC Driver, as you should be. The Bridge isn't really meant for anything but quick proof-of-concept type stuff. It does not support either concurrent connections, nor concurrent statements.

Similar Threads

  1. retrieval of tags
    By mahalakshmi in forum New To Java
    Replies: 1
    Last Post: 02-23-2009, 01:58 PM
  2. ArrayList versus Array
    By junpogi in forum New To Java
    Replies: 13
    Last Post: 11-08-2008, 03:04 AM
  3. Tomcat with SQLSERVER 2005
    By bbq in forum JDBC
    Replies: 1
    Last Post: 07-05-2007, 05:40 AM
  4. SQLServer 2000 EXCEPTION
    By Heather in forum JDBC
    Replies: 3
    Last Post: 06-29-2007, 04:10 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts