473,386 Members | 1,647 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,386 software developers and data experts.

Copying XLS (local) directly to SQL (remote) Table without Link srver and BCP

I have a XLS file on local machine and would like to copy all the columns to a new SQL table on the 'remote' (not local sql server) using SQL scripts.

I tried following :
select * into TEMP_PLAN_CODE FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0',
'Excel 10.0;Database=D:\Placodes.xls;HDR=YES',
'SELECT * FROM [Sheet1$]')

but it's giving me an error :
Msg 7415, Level 16, State 1, Line 1
Ad hoc access to OLE DB provider 'Microsoft.Jet.OLEDB.4.0' has been denied. You must access this provider through a linked server.

I can't create linked server as well and can't run BCP (no authority)

What are my available choices for copying XLS (on local) to SQL (not local) tales using SQL scripts and not using any .NET code.

Thanks in advance
Mar 31 '08 #1
1 2207
ck9663
2,878 Expert 2GB
I have a XLS file on local machine and would like to copy all the columns to a new SQL table on the 'remote' (not local sql server) using SQL scripts.

I tried following :
select * into TEMP_PLAN_CODE FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0',
'Excel 10.0;Database=D:\Placodes.xls;HDR=YES',
'SELECT * FROM [Sheet1$]')

but it's giving me an error :
Msg 7415, Level 16, State 1, Line 1
Ad hoc access to OLE DB provider 'Microsoft.Jet.OLEDB.4.0' has been denied. You must access this provider through a linked server.

I can't create linked server as well and can't run BCP (no authority)

What are my available choices for copying XLS (on local) to SQL (not local) tales using SQL scripts and not using any .NET code.

Thanks in advance
You can create a client-side apps that will read the excel file and connect to your SQL-Server and INSERT your excel columns into that table. I have tried with EXCEL before but that was a much earlier version. Since Microsoft products have built-in OLE's in them, you can use Excel's VBA to connect to your sql server and populate your table.

Actually whatever tool (maybe C#) that can read excel files and can connect and run t-sql to a sql-server can do this task.

-- CK
Mar 31 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Robert Tarantino | last post by:
Hello, I am trying to find a way to create a scheduled task or service that will copy my local profile folders under "Documents and settings" to a network drive. This would allow me to restore...
4
by: oceanhai | last post by:
We currently have a PPTP connection set up for our developers to access our development SQL server through a VPN tunnel. When they need to copy tables up to the dev SQL from their local machine...
5
by: Ian Davies | last post by:
Hello I am trying to use php to automate the copying of a file from my remotely hosted directory to my computer. I have put together the following but it will only do the copying from one...
6
by: Access Newbie | last post by:
I'm using Access 2000 and I'm trying to create a pass-through query to append all the data from a local table to a remote table. I'm using the SQL query editor in MS Access to create the query (I...
1
by: Matt Walker | last post by:
I decided to flesh out my php skills by building a web application which could scan through local files on my intranet (specifically mapped drives on my server) and generate a list of Movies or...
4
by: Jim Devenish | last post by:
I wish to copy a table on a SQL Server backend to a table on an Access (.mdb) front end in the simplest way. I have the following to get the recordset but am seeking something easier. Dim...
0
by: mlfblom | last post by:
Hi, I am running visual studio 2005 on a Vista Ultimate client. I have created a remote site on a Windows 2003 R2 server. This site has about 100 aspx, many App_Code files and several references...
4
by: quincy451 | last post by:
I am running MS SQL 2000 server. The table involved is only about 10,000 records. But this is the behavior I am seeing. The local machine is querying the table looking for a particular record....
2
by: troy_lee | last post by:
What is the best way of copying all the records from a linked table into a replica table that is local on my computer? This is for development work at home where I can not access the main table. Is...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...

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.