OPENROWSET using mdb files-sql server 2008

Posted by Ganeshsvelu under Sql Server on 4/8/2010 | Views : 6384 | Status : [Member] | Replies : 2
I want to select the mdb file datas using OPENROWSET in sql server 2008.How to i do this one?Please give with good example...

I tried this one :

select * from OPENROWSET('Microsoft.ACE.OLEDB.12.0', 'C:\\Documents and Settings\\smu\\Desktop\\Website\\FileUpload\\FIALED_PAPER_LIST_JAN2010_01042010.mdb')

But it doesn't working.




Responses

Posted by: Vuyiswamb on: 4/8/2010 [Member] [MVP] [Administrator] NotApplicable

Up
0
Down
What is the Error you are getting ?

Thank you for posting at Dotnetfunda
[Administrator]

Ganeshsvelu, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Pandians on: 4/9/2010 [Member] [MVP] Silver

Up
0
Down
Hi

Greetings

Please follow the steps as given below

1. Execute the following statement in your SQL Server 2008 :
SP_CONFIGURE 'Ad Hoc Distributed Queries'

If It results any Err (or) run_value = 0 then , Do the following steps... Otherwise skip the steps
SP_CONFIGURE 'show advanced option',1

RECONFIGURE
GO
SP_CONFIGURE 'Ad Hoc Distributed Queries',1
RECONFIGURE


2. Try the scripts now
SELECT Column1, Column2

FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0',
'C:\Documents and Settings\ smu\Desktop\Website\FileUpload\FIALED_PAPER_LIST_JAN2010_01042010.mdb';
'admin';'',TABLE_NAME)

Note:
TABLE_NAME should be the name of the Table which is available in the mdb (FIALED_PAPER_LIST_JAN2010_01042010.mdb)


I hope this will help you. Pls come back if you have any issue...

Cheers

Cheers
www.SQLServerbuddy.blogspot.com
iLink Multitech Solutions

Ganeshsvelu, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response