Access connection string

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
Back
Top