I have an .cs file I need to compile with csc.exe for codebehind
access (no VS.NET). Trouble is that my oledb connection needs to use
a unc type path.. when I use the unc path in conn I get
escape sequence errors from csc.exe.. so I tried a static
mapped drive with reversed \ / from a google I found. The
.cs compiles but the conn doesn't work.. so if I can find
a method to get unc style conn to compile, I think I would be
golden. It's a known working oledb conn used all over the place
in standard asp and aspx files.. any clues into getting the
escape sequences corrected would be appreciated.. here
is what the conn would looks like of the .cs
"Provider=Advantage OLE DB Provider; Data Source=\\server\path\dir; ServerTy
pe=ADS_REMOTE_SERVER;
TableType=ADS_CDX;FilterOptions=RESPECT_
WHEN_COUNTING;"
Thanks, BobIn a C# string, backslashes are escape characters. To escape a backslash,
escape it with a backslash.
HTH,
Kevin Spencer
Microsoft MVP
.Net Developer
Neither a follower nor a lender be.
"Bob [BVP]" <bb4@.pmount.com> wrote in message
news:uzkZyQy$EHA.1296@.TK2MSFTNGP10.phx.gbl...
> I have an .cs file I need to compile with csc.exe for codebehind
> access (no VS.NET). Trouble is that my oledb connection needs to use
> a unc type path.. when I use the unc path in conn I get
> escape sequence errors from csc.exe.. so I tried a static
> mapped drive with reversed \ / from a google I found. The
> .cs compiles but the conn doesn't work.. so if I can find
> a method to get unc style conn to compile, I think I would be
> golden. It's a known working oledb conn used all over the place
> in standard asp and aspx files.. any clues into getting the
> escape sequences corrected would be appreciated.. here
> is what the conn would looks like of the .cs
> "Provider=Advantage OLE DB Provider; Data Source=\\server\path\dir;
> ServerType=ADS_REMOTE_SERVER;
> TableType=ADS_CDX;FilterOptions=RESPECT_
WHEN_COUNTING;"
> Thanks, Bob
>
Thanks.. If I have \\server\share it would be \\\\server\\share ?
"Kevin Spencer" <kevin@.DIESPAMMERSDIEtakempis.com> wrote in message
news:udIvrMz$EHA.2196@.TK2MSFTNGP14.phx.gbl...
> In a C# string, backslashes are escape characters. To escape a backslash,
> escape it with a backslash.
> --
> HTH,
> Kevin Spencer
> Microsoft MVP
> .Net Developer
> Neither a follower nor a lender be.
> "Bob [BVP]" <bb4@.pmount.com> wrote in message
> news:uzkZyQy$EHA.1296@.TK2MSFTNGP10.phx.gbl...
>
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment