Click to See Complete Forum and Search --> : Hiding the database


DIMSROB
February 10th, 2009, 02:12 AM
Hello all-



I'm not a .Net C# guy I just write reports. I've been writing Crystal reports against a SQL server (tables and views) for 10 years. We just started a new project and one thing they would like to do is HIDE the database from everyone (including me) They want to expose datasets at runtime the the reports will be able to pull the data from and make it seemless.



database -- > exposed database object --> reports



Basically a layer between the reports and the physical database itself. This will be in .Net and CR 2008. I've tinkered with a few different things, running the data out to XML and reading the XML fie with the report for example but everything I try I either get errors or very very poor performance



Is there an ideal way to access data from a SQL server without actually being able to see the SQL server?



Sorry if this is a stupid request, I've been doing the same thing the same way for so long that I'm struggling.



Thanks for any hep / links you can give me.





(my responce to them was to hide the native tables with security but to allow VIEWS to be exposed as read only objects as Crystal to me has always seemed to work better with direct connection to the data. However, they do not want the VIEWS exposed either. Just looking for a solution.



Thanks a lot.





rb

Alsvha
February 13th, 2009, 06:08 AM
I've never used Crystal Reports, so I don't know how they work, so I can only answer in general terms.


Something/someone must always be able to "see" the database in order to extract data from it.

You could - I guess - make a data access layer which handles the access to the database, and then simply deny all other users (then the one in the data access layer) access to the database.
Whether that would solve your problem(s) - I don't know off.
This layer would be able to return datasets, lists of objects etc.
The way to access this layer would then depend on how you can integrate it with Crystal Reports - whether it is possible at all I don't know, or whether Crystal Reports must access the database to work with the data.


Otherwise - as you say - use SQL Server security to set up a method in there for people to access the data. Deny reading/writing to tables for the Crystal Report user(s)/logins and give access to viewes/stored procedures etc to compensate.

But you can never fully hide the database if you wish to use information from it.

forgottenhart
February 17th, 2009, 11:06 AM
I am not sure what you mean by hiding the database.

However if you use stored procedures, which will run on the server side, to gather the data that you require and then dump that data to a dataset or datagrid view in the app then use that data in the app to generate the reports that should keep people from altering the actual database. Thus "hiding" the database.

Hope this helps