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
 General SQL Server Forums
 New to SQL Server Programming
 Excel Query to SQL Server Server Help...

Author  Topic 

ImtiazV
Starting Member

2 Posts

Posted - 2007-08-03 : 12:00:15
I'm not sure this is the right forum for this thread, but hopefully the Admins can move it if it isnt.

Here is my situation.

I had a web server with a web page that referenced an Excel spreadsheet.
(a href="c:\webservername\xyz.xls" target=main)

there is a query to retreive data in the ss from a Access Database.

I had to move the website from one server to another, which included moving the data from an Access Database to a SQL 2000 Database, which sits on a SQL Server.

There is a DSN created on the web server for the connection.
From the web server, I can open the Excel Sheet and it queries the database fine.

My issue is that now when someone hits the webpage from their computer, they get the spreadsheet, but since they dont have a DSN on thier machine, the get an error stating "[Microsoft][ODBC Driver Manager] Datasource name not found and no default driver specified."

Is there a way to specify to use the DSN on the web server so I wouldnt have to create a DSN on every machine that would need to access it?

TIA
IV

cvraghu
Posting Yak Master

187 Posts

Posted - 2007-08-03 : 14:21:14
I'm not sure why excel is NOT loaded with data first and downloaded to client. Did you checked the new server for all drivers and dsns.

But if that's how it behaves, i think you've to redesign -

1. Build the excel with data first and provide a link in web page.

2. Show the data in a grid and provide an option to export it to excel. You can google on how to render datagrids as excel in a web app.
Go to Top of Page

ImtiazV
Starting Member

2 Posts

Posted - 2007-08-03 : 17:15:23
Thanks for the reply.

I agree with you statement with Excel should be populated with the data from the query then rendered onto the page. I'm wondering why the query is being run on the client side instead of the server side.

The one thing that is different in the architecture is that prior to the migration to the new web server and database server, the data was being stored in an Access Database on the web server.

IV
Go to Top of Page
   

- Advertisement -