PC Review Forums Newsgroups Microsoft DotNet Microsoft ADO .NET Re: Code works with OLEDB but Not with SQL2000

Reply

Re: Code works with OLEDB but Not with SQL2000

 
Thread Tools Rate Thread
Old 03-01-2007, 02:34 PM   #1
Paul Clement
Guest
 
Posts: n/a
Default Re: Code works with OLEDB but Not with SQL2000


On Tue, 2 Jan 2007 13:21:02 -0800, Gordon <Gordon@discussions.microsoft.com> wrote:

¤ Hi ;
¤
¤ I am trying to create several Excel sheets using SQL 2000 views like so:
¤
¤ Select * INTO [Excel 8.0;Database="C:\spreadSheets\aNew.xls"] FROM [aView].
¤
¤ When I try and execute this in my app I get the following - Specified owner
¤ name 'Excel 8.0;Database=c:\spreadSheets\aNew.xls' either does not exist or
¤ you do not have permission to use it.
¤
¤ If I use the above Select statement with an OLEDB connection it works.
¤
¤ I am using Imports System.Data.SqlClient, instantiating a new SQlConnection
¤ object, opening the connection, etc..

The Excel ISAM driver is supported through Jet OLEDB and not the native SQL client.


Paul
~~~~
Microsoft MVP (Visual Basic)
  Reply With Quote
Old 03-01-2007, 05:48 PM   #2
Paul Clement
Guest
 
Posts: n/a
Default Re: Code works with OLEDB but Not with SQL2000

On Wed, 3 Jan 2007 08:04:00 -0800, Gordon <Gordon@discussions.microsoft.com> wrote:

¤ Thanks,
¤
¤ I had the feeling that it something to do with the native SQL type.

A couple of workarounds would be to either use DTS or create a linked server (to Excel) in your SQL
Server database.

Otherwise, if you're use straight SQL you would have to use the Jet OLEDB provider.


Paul
~~~~
Microsoft MVP (Visual Basic)
  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off