473,597 Members | 2,301 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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=Advan tage OLE DB Provider; Data Source=\\server \path\dir; ServerType=ADS_ REMOTE_SERVER;
TableType=ADS_C DX;FilterOption s=RESPECT_WHEN_ COUNTING;"

Thanks, Bob
Nov 19 '05 #1
2 1428
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******** ******@TK2MSFTN GP10.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=Advan tage OLE DB Provider; Data Source=\\server \path\dir;
ServerType=ADS_ REMOTE_SERVER;
TableType=ADS_C DX;FilterOption s=RESPECT_WHEN_ COUNTING;"

Thanks, Bob

Nov 19 '05 #2

Thanks.. If I have \\server\share it would be \\\\server\\sha re ?
"Kevin Spencer" <ke***@DIESPAMM ERSDIEtakempis. com> wrote in message
news:ud******** ******@TK2MSFTN GP14.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******** ******@TK2MSFTN GP10.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=Advan tage OLE DB Provider; Data Source=\\server \path\dir;
ServerType=ADS_ REMOTE_SERVER;
TableType=ADS_C DX;FilterOption s=RESPECT_WHEN_ COUNTING;"

Thanks, Bob


Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
2225
by: shank | last post by:
I'm trying to setup an Access DSNLess connection on my local computer. The following string works fine within the Dreamweaver interface. But when I upload to my server (locally) I get this error. Can anyone lend some insight? thanks Object required: 'oConn' /Connections/conn.asp, line 2 <%
0
1963
by: lmckaha | last post by:
Hi, Mysql version: 3.23.49 Solaris version: 2.7 gcc compiler version: 2.95.2 Python : 2.2.2 I'm evaluating the C and C++ API to decide which one to bye but I have many troubles.
10
1836
by: Curt Emich | last post by:
I'm trying to create a dataset. I start by creating a connection. Then I create and configure a data adapter. Finally, I select "generate dataset" after right-clicking on the data adapter. It creates a dataset and puts it under the form, just like the connection and the adapter. When I try to compile the code GENERTED BY THE IDE, it bombs. Here's the code: protected System.Data.OleDb.OleDbCommand oleDbSelectCommand1;
10
4769
by: Bart Goeman | last post by:
Hi, I have a question about how to put redundant information in data structures, initialized at compile time. This is often necessary for performance reasons and can't be done at run time (data structures are read only) Ideally one should be able to put the redundant information there automatically so no mistakes are possible, but in a lot of case I see no way how to do it.
2
1242
by: Oleg Konovalov | last post by:
Hi, I have a C# ASP.NET project in VS.NET and it used to build, debug and run fine. I had to disable IIS5.1 to run Java based code on JBoss for a month. Now I re-inabled IIS and tried to run my C# project in debugger: 1) I can't build the project, getting a few compilation errors like: - No overload for method 'Open' takes '13' arguments; - Property, indexer, or event 'value' is not supported by the language....
2
5051
by: Mathew Vording | last post by:
Hi. I have an application that after using it for a while, continually forcing it to hit the database it will fail on connection open with the OLEDB "Unspecified Error" message. System.Data.OleDb.OleDbConnection.ProcessResults(Int32 hr) +20 System.Data.OleDb.OleDbConnection.InitializeProvider() +57
5
9637
by: petro | last post by:
Hello all, My asp.net web application works on my machine but I get the following error on our test web server, There is only one oracle home on the test server. Does anyone know how to resolve this error? Oracle error occurred, but error message could not be retrieved from Oracle. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the...
4
1169
by: mark | last post by:
(windows app not web) I have a procedure to populate a given datagrid (Datagrid1) with a dataset from an indexed data connection. It works: Globals: Dim FileName1 As String Dim DS As System.Data.DataSet Dim OleDbConnection1(20) As System.Data.OleDb.OleDbConnection Dim OleDbDataAdapter1(20) As System.Data.OleDb.OleDbDataAdapter Dim CurrentIndex As Integer = 0
27
5587
by: CodeMonk3y | last post by:
gotta question on sizeof keyword does the sizeof keyword calcuates the size at compile time or run time ?? -- Posted on news://freenews.netfront.net - Complaints to news@netfront.net --
0
7893
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8381
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8040
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6698
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5847
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5436
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3889
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3932
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2408
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.