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 !!!