Showing posts with label necessary. Show all posts
Showing posts with label necessary. Show all posts

Thursday, March 29, 2012

Attach Error

Cannot access the specified path or file on the server. Verify that you have the necessary security privileges and that the path or file exists.

If you know that the service account can access a specific file, type in the full path for the file in the File Name control in the Locate dialog box.


I get this error when I try to attcah a Database file sitting in "My Documents" folder.

Any help will be appreciated

--Thanks

Have you verified that the file actually exists, and that there is no misspelling in the path, and all else that the message tells you to verify?

If all that is ok, maybe try to enclose the path in double quotes. (in case it's the spacing that gives you trouble.
"C:\My Documents\myfile.dat"

/Kenneth

Sunday, March 25, 2012

Attach Access Database to SQLServer

Attach Access Database to SQLServer?

It seems it is necessary if I want to put it on the internet through IIS.

I tried add data source through tools and tried most combinations, but nothing led in that direction.

I also did a search.

If not, the alternative is importing the data into sqlserver 2005. What worries me about this is incrementally importing new tables, views, etc., and new rows. Is this later possible?

dennist685

> It seems it is necessary if I want to put it on the internet through IIS.

No. My guess is that you might security issues. The account of which runs your statement (IIS account or ASP account, I guess) to have the rights to read your mdb file. Should be mentioned in numerous threads.

> If not, the alternative is importing the data into sqlserver 2005. What worries me about this is incrementally importing new tables, views, etc., and new rows. Is this later possible?

This would be my soulution. I would use SQL Server (maybe Express) to serve data.

You can access Access tables from within SQL Server queries. I would keep away from doing this for normal processing. For import of data, it is OK, I guess.

-- Sample to SELECT against object in access db:

EXEC sp_configure 'show advanced options', 1

GO

RECONFIGURE

GO

EXEC sp_configure 'Ad Hoc Distributed Queries', 1

GO

RECONFIGURE

GO

SELECT * FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0', 'x:\dir\mymdb.mdb';'admin';'',objectname)

GO

The sp_configure statments are neccessary because distributed queries are turned off by default for security reasons

Hope this helps

sql