D
dm1608
I'm looping thru a reader object for SQL Server. Two of the files I'm
returning are the "UNC" name of a server and a "File Path". Data looks
something like:
UNC = \\10.246.16.18\MYSHARE
File Path = "\MyDir\MySub\myfile.txt"
I'm trying to append these two fields to a string and I'm only getting the
UNC. Looking at a watch window, it looks like perhaps the backslashes are
messing me up.
I'm seeing something like:
UNC = \\\\10.246.16.18\\MYSHARE
File Path = \\MyDir\\MySub\\myfile.txt
I'm trying to assign the values such as:
string myoutput = "File " +
Convert.ToString(reader.GetValue(reader.GetOrdinal("lastuseddrive"))) + "\\"
+ Convert.ToString(reader.GetValue(reader.GetOrdinal("filepath"))) ;
Of course, myoutput only contains the "lastuseddrive" value. I can see the
"filepath" value in the watch window.
I've tried prefixing the @ sign in front of my quotes and didn't see any
difference?
Any help would be appreciated.
returning are the "UNC" name of a server and a "File Path". Data looks
something like:
UNC = \\10.246.16.18\MYSHARE
File Path = "\MyDir\MySub\myfile.txt"
I'm trying to append these two fields to a string and I'm only getting the
UNC. Looking at a watch window, it looks like perhaps the backslashes are
messing me up.
I'm seeing something like:
UNC = \\\\10.246.16.18\\MYSHARE
File Path = \\MyDir\\MySub\\myfile.txt
I'm trying to assign the values such as:
string myoutput = "File " +
Convert.ToString(reader.GetValue(reader.GetOrdinal("lastuseddrive"))) + "\\"
+ Convert.ToString(reader.GetValue(reader.GetOrdinal("filepath"))) ;
Of course, myoutput only contains the "lastuseddrive" value. I can see the
"filepath" value in the watch window.
I've tried prefixing the @ sign in front of my quotes and didn't see any
difference?
Any help would be appreciated.