Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 OPENROWSET

Author  Topic 

hellilyntax
Starting Member

19 Posts

Posted - 2006-09-06 : 04:34:06
can openrowset be apply to this condition?
my xls files are stored on webserver and my SQL Server is on another location.

can i use virtual directory instead of physical directory?

this is my code..
insert into AR (ar_cust_no, ar_po_no, ar_inv_no, ar_type, ar_inv_date, ar_due_date, ar_inv_amt, ar_bal, ar_outstanding, ar_color)
select * from OPENROWSET('Microsoft.Jet.OLEDB.4.0',
'Excel 8.0; Database=C:\folder\subfolder\flatfile\AR060822.xls; hdr=no',
'select f1, f2, f3, f4,F5 ,F6, F7, F8, f9, F10 from [AR060822$]')

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2006-09-06 : 04:43:17
I don't think so. It depends upon the provider and since the OLE-DB provider does not recognize virtual directory, it is not allowed in OPENROWSET as well.

Harsh Athalye
India.
"Nothing is Impossible"
Go to Top of Page

hellilyntax
Starting Member

19 Posts

Posted - 2006-09-06 : 05:12:26
tq machaa..
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-09-06 : 08:55:17
quote:
Originally posted by hellilyntax

tq machaa..


Did you try with \\ServerName\FilePathName?

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

hellilyntax
Starting Member

19 Posts

Posted - 2006-09-06 : 09:37:29
hi Madhivanan,
my web server and sql server are hosted at different companies...means different location...
Go to Top of Page
   

- Advertisement -