Sqlconnection does it work with MS Access database

  • Thread starter Thread starter Familjen Kalrsson
  • Start date Start date
F

Familjen Kalrsson

Hi
I wounder if I can use Sqlconnection or other Sql members to work with a MS
Access database. I have tried to connect to Access's database Northwind, but
when I set the data source to C:\Program\Microsoft Office\Office\Samples
(Northwind's path), I get an invalid connection. And I have seen in other
people's source code that they sometimes doesn't give the data source or
doesn't give the database's path to the data source, I don't understand how
I can connect to a database without giving the database's path.

Fia
 
Familjen Kalrsson said:
Hi
I wounder if I can use Sqlconnection or other Sql members to work
with a MS Access database.

Not at all. As the name says, it is an *SQL*connection which connects to an
*SQL*Server. Use an OleDBConnection and use the Jet OleDB Provider with it.
And I have seen in other people's source code
that they sometimes doesn't give the data source or doesn't give the
database's path to the data source, I don't understand how I can
connect to a database without giving the database's path.

Example?


see also:
http://www.connectionstrings.com


Armin
 
Cor, do you have any links to examples of where this class is implemented.
The M'soft documentation is very minimal.
 
Back
Top