Showing posts with label reference. Show all posts
Showing posts with label reference. Show all posts

Tuesday, March 27, 2012

Datasource error after deployment

reports run fine in studio. When I deploy the reports that reference a 2k
box, I get an error saying I'm unablt to connect to the data source unless we
promt for name and password and pass them as windows credentials. How do I
use the user's windows credentials?Once I granted access to nt authority\anonymous logon, my problems
disappeared. Is this an IIS setting?
"Jeff Ericson" wrote:
> reports run fine in studio. When I deploy the reports that reference a 2k
> box, I get an error saying I'm unablt to connect to the data source unless we
> promt for name and password and pass them as windows credentials. How do I
> use the user's windows credentials?

Friday, February 17, 2012

Database Variable

Hi,

I have a sql script that references a database explicitly, but the name of that database changes. Rather then have to find anywhere I reference that database and change it, i would like to just set it in one spot.

For example.

SELECT * FROM [V1_Database].[a_table]

I then decide to upgrade from V1 to V2.

Instead of having to find the above code in all of my stored procs and manually change it, I would like to do the following.

SET dbName = 'V2_Database' (Database wide variable)

SELECT * FROM [dbName].[a_table]

But I don't want to have to make all of the places that reference a specific database into string executions. ( strSQL = 'SELECT * FROM [' + dbName + ']' )

I hope i havent made this too confusing, but any help is appreciated.

Thanks,

Brian

You could put the connectionstring in web.config file and use it across your application. That way you would only need to change at one place.