|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Access connection stringI'm developing an ASP.NET application in C#. I am storing my database
connection string in the web.config file. If I set the string to connect to a SQL Server DB everything works fine, but I need to be able to connect to an MS Access DB. This is is from my webconfig: <appSettings> <add key="ConnectString" value="FIL=MS Access;DSN=CWAcal;" /> </appSettings> When I try to run the app with this connection string I get an exception error at the point where I am executing the transaction: " Keyword not supported: 'fil' " I have fairly extensive experience working with VB and SQL Server. This however is one of my first C# apps as well as I have limited experience working with Access, so I assume there is something that I just don't get yet. Can someone please give me a clue as to what I am doing wrong? Hi Mike,
See this useful site http://www.connectionstrings.com/ -- Show quoteMiha Markic [MVP C#] - RightHand .NET consulting & development SLODUG - Slovene Developer Users Group www.rthand.com "Mike" <M***@discussions.microsoft.com> wrote in message news:5DA2E1A2-09D8-4699-B0C8-6B7D7900EE7E@microsoft.com... > I'm developing an ASP.NET application in C#. I am storing my database > connection string in the web.config file. If I set the string to connect > to a > SQL Server DB everything works fine, but I need to be able to connect to > an > MS Access DB. This is is from my webconfig: > > <appSettings> > <add key="ConnectString" value="FIL=MS Access;DSN=CWAcal;" /> > </appSettings> > > When I try to run the app with this connection string I get an exception > error at the point where I am executing the transaction: > " Keyword not supported: 'fil' " > > I have fairly extensive experience working with VB and SQL Server. This > however is one of my first C# apps as well as I have limited experience > working with Access, so I assume there is something that I just don't get > yet. Can someone please give me a clue as to what I am doing wrong? I assume you're using the OleDb provider, so you'll need an OleDb
connection string, not an ODBC DSN connection string. --Mary On Sat, 11 Dec 2004 12:43:02 -0800, "Mike" <M***@discussions.microsoft.com> wrote: Show quote >I'm developing an ASP.NET application in C#. I am storing my database >connection string in the web.config file. If I set the string to connect to a >SQL Server DB everything works fine, but I need to be able to connect to an >MS Access DB. This is is from my webconfig: > ><appSettings> > <add key="ConnectString" value="FIL=MS Access;DSN=CWAcal;" /> ></appSettings> > >When I try to run the app with this connection string I get an exception >error at the point where I am executing the transaction: > " Keyword not supported: 'fil' " > >I have fairly extensive experience working with VB and SQL Server. This >however is one of my first C# apps as well as I have limited experience >working with Access, so I assume there is something that I just don't get >yet. Can someone please give me a clue as to what I am doing wrong? |
|||||||||||||||||||||||