ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Hide SQL Query (https://www.excelbanter.com/excel-programming/320549-re-hide-sql-query.html)

Wayne Wengert

Hide SQL Query
 
Sorry... from the user. The users know just enough to be dangerous
(<smile).

I built the query from within the spreadsheet. Right now, if you click on a
cell in the data range you get a popup that, among other things, has the
option "Edit". That is not good in our environment.

Wayne

"Fredrik Wahlgren" wrote in message
...

"Wayne Wengert" wrote in message
...
Is there a way to hide (or at least prevent editing) of the Query used

to
get data from an SQL Server?

Wayne


Hide from who? The Excel user? The Profiler? Where do you keep your query?

/Fredrik





gocush[_29_]

Hide SQL Query
 
If you lock the Extracted Data range and Protect the Wsht, then the Edit
Query in not available on right clicking a cell in the data range.
The downside is that you will need to Unprotect/Refresh data/Reprotect the
sheet.

"Wayne Wengert" wrote:

Sorry... from the user. The users know just enough to be dangerous
(<smile).

I built the query from within the spreadsheet. Right now, if you click on a
cell in the data range you get a popup that, among other things, has the
option "Edit". That is not good in our environment.

Wayne

"Fredrik Wahlgren" wrote in message
...

"Wayne Wengert" wrote in message
...
Is there a way to hide (or at least prevent editing) of the Query used

to
get data from an SQL Server?

Wayne


Hide from who? The Excel user? The Profiler? Where do you keep your query?

/Fredrik






onedaywhen[_2_]

Hide SQL Query
 
Wayne Wengert wrote:
... from the user. The users know just enough to be dangerous
(<smile).


If you don't want them to change the SQL e.g. retain the same column
order, the same WHERE clause etc then put the query into a stored
procedure and call the proc from MS Query. They could of course still
completely change the call e.g. to another stored proc or write their
own SELECT query.

Jamie.

--


Wayne Wengert

Hide SQL Query
 
Thanks for the suggestions. The SP is probably the best route.

Wayne

"onedaywhen" wrote in message
ups.com...
Wayne Wengert wrote:
... from the user. The users know just enough to be dangerous
(<smile).


If you don't want them to change the SQL e.g. retain the same column
order, the same WHERE clause etc then put the query into a stored
procedure and call the proc from MS Query. They could of course still
completely change the call e.g. to another stored proc or write their
own SELECT query.

Jamie.

--





All times are GMT +1. The time now is 08:57 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com