string split ??

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to pass a string to a query such as server\filelocation, but its
breaking on the '\', how can I execute my query BUT have the '\' in the
string being passed to the SQL? I need the full string to return me the file
information.
 
Well \ is an escape character and needs to be escaped itself. If you are
building a string, whereever you have \ you should really put \\ not sure
if that's what you are running into..

Karl
 
You can either escaped '\' with \\ or
use @ symbol where you are creating query
e.g.

string query = @"server\filelocation";
etc.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top