This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes JDBC and the fly likes Inserting a BLOB into MSSQL Server 2000 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Inserting a BLOB into MSSQL Server 2000" Watch "Inserting a BLOB into MSSQL Server 2000" New topic

Inserting a BLOB into MSSQL Server 2000

Zak Nixon
Ranch Hand

Joined: Sep 27, 2003
Posts: 126
I am using the following code to "try" to insert a BLOB into MS SQL SERVER 2000.

My Prepared statement is: insert into table values(?)


and my resume file( a MSWORD doc) is a byte array created by the following code:

I am trying to get the SQL Server to perform Full Text Searching. Is the
way I am placing the .doc file in the database correct, allowing SQL to correctly parse the files for indexing? My FTS does not return any results for any searches that I know would return a successful return value.

Any hints?

Zak Nixon
Jakob Jenkov

Joined: Jun 22, 2004
Posts: 8
I'm not sure about this, but I think MSSQL Server has two different data types for large fields. One is BLOB (or something like that) which is binary data. Another one is Text or something like that. I'm not sure you can use free text search in the binary data types. Check it out. Try doing a search for MS SQL Server Data Types and check it out. If you are using the binary large object data type, change to the text data type. I think I have had this problem before, that was caused by something like this.

Jakob Jenkov<br />Softare Architect<br /><a href="" target="_blank" rel="nofollow"></a>
I agree. Here's the link:
subject: Inserting a BLOB into MSSQL Server 2000