Wrox Programmer Forums
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 22nd, 2004, 02:56 PM
Authorized User
 
Join Date: Jun 2003
Posts: 75
Thanks: 0
Thanked 0 Times in 0 Posts
Default OPENROWSET

I'm trying to access some MS Access data within SQL Query Analyzer using OPENROWSET. I don't want to use a User/Password but don't know how to go about it.

I tried:
    SELECT a.*
      FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0',
      '\\ServerName\ShareName\Nwind.mdb';'admin';'', Orders)
      AS a
but got an error message that I need permission to view the data.

Is there a way I can use "Persist Security Info=False" with OPENROWSET? I tried playing around with it but couldn't get it to work.

TIA.

Rita
 
Old June 23rd, 2004, 06:31 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

May be because you are trying to access from an mdb file on remote system. Can you check that from local system, if that works?

_________________________
-Vijay G
Strive for Perfection
 
Old June 23rd, 2004, 09:26 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Also you can take a look at this page, this should give you better idea.

http://support.microsoft.com/default...b;EN-US;306269

_________________________
-Vijay G
Strive for Perfection
 
Old June 23rd, 2004, 09:50 AM
Authorized User
 
Join Date: Jun 2003
Posts: 75
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Vijay,

Thanks so much for your help. Your first tip helped me resolve the issue. I had not mentioned that I was having problems when trying to read the Access file that I had copied on the C: drive.
I had copied it to the C: drive of my pc, not the c: drive of the server where I was connected to via SQL Query Analyzer.

Once I made a copy there, I got the results I was looking for.

Rita





Similar Threads
Thread Thread Starter Forum Replies Last Post
OPENROWSET problem abob SQL Server 2000 3 February 28th, 2006 12:33 PM
Openrowset DARSIN SQL Server 2000 0 September 22nd, 2005 08:04 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.