Prev: JIT Debugging
Next: Kill Process in Application Setup?
From: Scott M. on 11 Jan 2010 21:11 Did you get rid of the first + sign? It's used to concatenate strings, but there is no need to use it prior to the start of the string. -Scott "Rich P" <rpng123(a)aol.com> wrote in message news:eAjKuhxkKHA.5608(a)TK2MSFTNGP05.phx.gbl... > Here is the oledb connection string which works fine in VB.Net > > connOle.ConnectionString = _ > & "Provider=Microsoft.Jet.OLEDB.4.0;" _ > & "Data Source=C:\;Extended " _ > & "Properties=""text;"HDR=Yes;FMT=TabDelimited""" > > I am having problems with the doublde quotes inside the string > .."Properties = ""...""" part. Here is what I tried that is not > working: > > connOle.ConnectionString = > + "Provider=Microsoft.Jet.OLEDB.4.0;" > + "Data Source=C:\\;" > + > "Extended Properties="""text;HDR=Yes;FMT=TabDelimited""""; > > Here is the string unparsed: > > connOle.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data > Source=C:\\;Extended Properties="""text;HDR=Yes;FMT=TabDelimited""""; > > C# is not liking the inner double quotes. How do I handle this? > > Thanks > > Rich > > *** Sent via Developersdex http://www.developersdex.com ***
From: Adam Davis on 28 Jan 2010 19:26
Try this connOle.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; " + "Data Source=C:\" + "; Extended Properties="+"text;"+"HDR=Yes;FMT=TabDelimited"; *** Sent via Developersdex http://www.developersdex.com *** |