Beginner |
|
Joined: Fri Jan 02, 2004 7:07 pm Posts: 35
|
Sorry, this is not really Hibernate Related but I am having problems you guys can probably help me with.
I am building an application that parses, validates and inserts large amounts of data from .csv files using JDBC. Every once in a while the data comes with characters that need to be escaped. For example the single quote. My Sybase database does not like me when I try to insert the data into a varchar() column. The problem is that I can't find a single line of documentation on how to deal with this problem. All the JDBC examples I have seen does not seem to do anything specific to support this. It all just magically work. And I have looked at examples with characters that should need escaping...
When asking coworkers about this the suggestion I get is using different datatypes (binarystream?) or that it may be a driver configuration issue. I.e you can make the driver deal with this automatically in some way. Reading the documentation on the Sybase driver (JConnect) I can't seem to find any information to that effect.
Do I really need to parse ALL the strings that I want to insert and manually escape the characters that need to be escaped? That feels kind of stupid to me... Or is there a utility method in j2se that you can use for this?
Grateful for any input on this.
/Jonas
|
|