472,119 Members | 1,637 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,119 software developers and data experts.

Troubles in .cs compile with unc type oledb connections strings..


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_COUNT ING;"

Thanks, Bob
Nov 19 '05 #1
2 1384
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]" <bb*@pmount.com> wrote in message
news:uz**************@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_COUNT ING;"

Thanks, Bob

Nov 19 '05 #2

Thanks.. If I have \\server\share it would be \\\\server\\share ?
"Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> wrote in message
news:ud**************@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]" <bb*@pmount.com> wrote in message
news:uz**************@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_COUNT ING;"

Thanks, Bob


Nov 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by shank | last post: by
10 posts views Thread by Curt Emich | last post: by
10 posts views Thread by Bart Goeman | last post: by
2 posts views Thread by Oleg Konovalov | last post: by
2 posts views Thread by Mathew Vording | last post: by
4 posts views Thread by mark | last post: by
27 posts views Thread by CodeMonk3y | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.