Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Microsoft Access > Re: TransferSpr...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 10 of 12 Topic 30197 of 31596
Post > Topic >>

Re: TransferSpreadsheet to .ADP dbo table

by lyle fairfield <lyle.fairfield@[EMAIL PROTECTED] > May 8, 2008 at 06:58 PM

I connect SQL-Server and Excel this way:

1. I use the excel file as a linked server by running this Stored
Procedure (the parameter is the full path to the file):

CREATE Procedure [dbo].[LinkToOPEExcelFile]
	@[EMAIL PROTECTED]
 nvarchar(255)
AS
IF  EXISTS (SELECT srv.name FROM sys.servers srv WHERE srv.server_id !
= 0 AND srv.name = N'OPE_XLS')
	EXEC master.dbo.sp_dropserver @[EMAIL PROTECTED]
'OPE_XLS',
@[EMAIL PROTECTED]
'droplogins'

EXEC master.dbo.sp_addlinkedserver
	@[EMAIL PROTECTED]
 = N'OPE_XLS',
	@[EMAIL PROTECTED]
'Excel',
	@[EMAIL PROTECTED]
'Microsoft.Jet.OLEDB.4.0',
	@[EMAIL PROTECTED]
'Excel 8.0'

2. I create VIEW(s) accessing the table(s) resident in the XLS file
(one view):

CREATE VIEW [dbo].[North]
AS
SELECT     *
FROM         OPE_XLS...North$ AS North$_1

Now I can use the VIEW as the recordsource for forms or re****ts. An
advantage is that my data is now the data in the Excel file,
reflecting any change immediately.

Of course, I can make my own table with

"SELECT * INTO NorthSchools FROM North"

if I want the data to be static (not reflecting changes in the Execl
file).

TransferSpreadsheet is a powerful command. I would use it but I am not
sure that Access has kept it up=to-date as far as permissions go with
repect to folders and SQL_Server. An SQL-Server only solution seems
simpler and more likely to have no problems to me.


D.St...@[EMAIL PROTECTED]
 wrote:
> I'm getting a problem with im****ting an Excel spreadsheet into a table
> in a SQL Server 2000 back-end. I'm doing this in VBA in an onClick
> event proc in an Access 2003 project.
>
> The target table's owner is 'dbo', but the database connection is via
> user 'fred'. password 'bloggs' (say) using SQL Server authentication.
> User 'fred' is a member of db_owner role.
>
> What happens is that TransferSpreadsheet ignores the 'dbo' table and
> creates a new version, owned by 'fred'. This has undesirable side-
> effects downstream (the app crashes).
>
> The TransferSpreadsheet (and spreadsheet file itself) seem to be fine,
> as the data is im****ted OK when the existing target table is actually
> owned by 'fred'.
>
> Is there something (permission/grant?) that needs to be set to enable
> 'fred' to im****t into the 'dbo' table, or is there a problem with
> TransferSpreadsheet?
>
> Any help gratefully received!
>
> Dave
 




 12 Posts in Topic:
TransferSpreadsheet to .ADP dbo table
D.Stone@[EMAIL PROTECTED]  2008-05-08 07:59:17 
Re: TransferSpreadsheet to .ADP dbo table
D.Stone@[EMAIL PROTECTED]  2008-05-08 08:58:24 
Re: TransferSpreadsheet to .ADP dbo table
Rich P <rpng123@[EMAIL  2008-05-08 17:15:44 
Re: TransferSpreadsheet to .ADP dbo table
lyle fairfield <lyle.f  2008-05-08 15:30:31 
Re: TransferSpreadsheet to .ADP dbo table
Rich P <rpng123@[EMAIL  2008-05-08 18:37:43 
Re: TransferSpreadsheet to .ADP dbo table
lyle fairfield <lyle.f  2008-05-08 21:19:22 
Re: TransferSpreadsheet to .ADP dbo table
lyle fairfield <lyle.f  2008-05-08 21:31:31 
Re: TransferSpreadsheet to .ADP dbo table
rkc <rkc@[EMAIL PROTEC  2008-05-09 12:40:36 
Re: TransferSpreadsheet to .ADP dbo table
lyle fairfield <lyle.f  2008-05-09 18:56:10 
Re: TransferSpreadsheet to .ADP dbo table
lyle fairfield <lyle.f  2008-05-08 18:58:33 
Re: TransferSpreadsheet to .ADP dbo table
D.Stone@[EMAIL PROTECTED]  2008-05-09 02:32:59 
Re: TransferSpreadsheet to .ADP dbo table
Rich P <rpng123@[EMAIL  2008-05-09 10:46:42 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Dec 5 11:43:30 CST 2008.