473,403 Members | 2,270 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

Error creating linked server to Excel

Hi,
Please help, I'm getting desperate. Any ideas warmly welcomed!
I'm trying to read from a basic excel file (1000 or so rows from
column A) but am having problems. The code I am using is:

Declare @Return Int
SET NOCOUNT ON

Exec @Return= [master]..[sp_addlinkedServer] 'READ_XLS', 'EXCEL',
'Microsoft.Jet.OleDB.4.0' , 'e:\jsbackup\RACodes.xls',
NULL, 'EXCEL 8.0'
print 'set up Return : ' + convert(varchar(10),@Return)
--NB E: is the drive as seen oon the server

EXEC sp_addlinkedsrvlogin
@rmtsrvname = 'READ_XLS',
@useself = 'true'
print 'login Return : ' + convert(varchar(10),@Return)
When I try to read from the (one) excel sheet in the file, via
Select * from [READ_XLS]...RACodes$
or to list what tables/sheets are available, via
exec sp_tables_ex 'READ_XLS'

I get the following error:

OLE DB provider 'Microsoft.Jet.OLEDB.4.0' reported an error.
Authentication failed.
[OLE/DB provider returned message: Cannot start your application. The
workgroup information file is missing or opened exclusively by another
user.]
OLE DB error trace [OLE/DB Provider 'Microsoft.Jet.OLEDB.4.0'
IDBInitialize::Initialize returned 0x80040e4d: Authentication
failed.].

What am I missing?

*Many* thanks in advance.
Andy
Jul 20 '05 #1
1 4133
A few things to check:

Do you have the .xls file already open?
Is e:\jsbackup\RACodes.xls a server path?
I recall that you have to set named ranges for it to appear as tables
in Excel.

I don't know whether it helps but I have written an addin for Excel
that can push the data out from Excel (you are trying to pull it in
from the database). If you can reconsider your design and push it from
Excel you can perhaps use it.

SQL*XL is an addin for Excel that let you manage your database from
Excel. It is an end-user tool but it also lets you record all actions
as a macro (VBA) and therefore you can code/script applications with
it.

Have a look at SQL*XL at www.oraxcel.com

Best regards, Gerrit-Jan Linker
Linker IT Consulting Limited
www.oraxcel.com
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: James Bird | last post by:
Hello In order to perform a hetrogeneous join (I think that's what they're called) between MySQL and another database, I've created an Access database containing linked tables from each...
3
by: David | last post by:
We recently translated the backend db from Access(97) to SQL Server. We are still using Access frontends. I have an update query in the Access front end that uses a lookup table to populate...
5
by: Guy Incognito | last post by:
Hello, I've written an asp.net application that creates Excel documents. It works by creating an excel document in XML format. But I wonder if I'm reinventing the wheel. I know that there are...
1
by: Lyn Duong | last post by:
Hi, I have tried creating a linked server in microsoft sql 2000 to a db2 for vm database. I use a db2 v8 admin client, configure it via client configuration setup and then in Microsoft SQL...
0
by: Chris Powell | last post by:
I am using Excel/Access 2000 and have two large Excel files (25,000 rows each) that I wish to create linked tables in Access rather than importing into Access. The two source Excel files change...
17
by: Ange T | last post by:
Hi there, I'm having pain with the VB behind an Access form. The form is used to create reports in Excel based on the details entered in the form. This has always worked without error on my...
0
by: gshawn3 | last post by:
Hi, I am having a hard time creating a Trigger to update an Oracle database. I am using a SQL Server 2005 Express database on a Win XP Pro SP2 desktop, linked to an Oracle 10g database on a...
3
by: =?Utf-8?B?bWFuaWthMDI=?= | last post by:
Hi, I have a GridView control in page called eventslisting which is inheriting from a MasterPage. The normal code to export to GridView does not work and gives me an error - "Control of type...
1
by: SPJ | last post by:
Sorry, forgot to mention Subject in my earlier post, hence reposting. ------------ I am writing a script which need's to convert an excel file to csv (text) format. For that I am using the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.