[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 326
  • Last Modified:

Connect a mdb file.

Hello, I used SQL Server one years ago. Now I almaost forget everything. I have a file C:\BAND\player.mdb. How can I connect it by SQL Server 2008 R2?
Suppose SQL Server Authentication is used.

Thanks.
0
zhshqzyc
Asked:
zhshqzyc
1 Solution
 
Éric MoreauSenior .Net ConsultantCommented:
a mdb file is an Access file not a SQL Server

but you can use OpenRowset as shown in http://msdn.microsoft.com/en-us/library/ms190312.aspx

SELECT *
   FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0',
      'C:\BAND\player.mdb';
      'admin';'',Customers);
GO
0
 
zhshqzycAuthor Commented:
I meant to connect it from SQL Server Management Studio.
0
 
Éric MoreauSenior .Net ConsultantCommented:
you can't, it is an Access database

the only way would be to upgrade it from Access to SQL
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
zhshqzycAuthor Commented:
Okay. If it is a mdf file, can I do it?
0
 
LowfatspreadCommented:
if its from sql 2005 yes , sql 2000 probably

sql 7 or earlier probably not...

do you know which version created it?

go into management studio right click databases and try attach database...
0
 
Srm74Commented:
Yes, then you can attach to it..

0
 
zhshqzycAuthor Commented:
I followed a book by APRESS, the author use an example by SQL Server 2005 connect a mdb file on management Studio.
However SQL Server 2005 is a legacy technology. You know, the popular is 2008.
Then the question was arised.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now