db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sandeep S. Chhikara" <schhik...@inventes.com>
Subject java escape character save retrieve problem
Date Tue, 22 Jun 2004 20:53:34 GMT
Good Afternoon Everyone, 

I am using torque 3.1 and experiencing a strange problem with escape character in dir path.
torque 3.1
MSSQlServer 2000
OS: windows 2000 server

In database table, i have a column to store filePath.
I read a file path from file which is "SINGLE \" C:\dev\test\myfile.doc
and since java adds a escape"\" character so in debugging i see this path as " DOUBLE \\"
but while saving in DB torque saves this correctly,as expected "SINGLE \" C:\\dev\\test\\myfile.doc.

When i try to retrieve this data using torque criteria the filePath set as  "SINGLE \" C:\dev\test\myfile.doc
and as discussed earlier java adds escape character torque criteria has filePath value " DOUBLE
\\" C:\\dev\\test\\myfile.doc.

Now i never get the saved row back, since db value  "SINGLE \" C:\dev\test\myfile.doc will
never match with 
  DOUBLE \\" C:\\dev\\test\\myfile.doc and hence no row is returned back.

The above mentioned example works fine with path as C:/dev/test/myfile.doc ie saving and retrieval

Please suggest how can i fix this problem, and make torque save and retrieve same value.

Sandeep Chhikara
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message