views:

421

answers:

1

I have an MS Access database that has Full paths to files in a table. We are moving all the file to a different location. I need to update the database. I'm using C# to do this. When I search for the file path stored in access it searches for 'K:\PDFFiles\myPDF.pdf' instead of 'K:\PDFFiles\myPDF.pdf' and does not find a match. So, my question is how do I query the access database for the correct file name instead of the escaped file name?

Thanks

A: 

You can try:

@"K:\PDFFiles\myPDF.pdf"

or

"K:\\PDFFiles\\myPDF.pdf"

Does your select statement quote the path, something like this (note the single quotes around the parameter):

string sql = string.Format("select * from MyTable where MyPathField = '{0}'", "K:\\PDFFiles\\myPDF.pdf");
Jay Riggs
I have tried these what gets put in the parameter I send to the query is "K:\\PDFFiles\\myPDF.pdf" and it doesn't find a match.
Scott
hmm, maybe my edit helps...
Jay Riggs