On 15 Mar, 14:47, "VJ" <nonewsaddr...@yahoo.comwrote:
one possible reason could be that the user you are using to authenticate to
the local DB does not have access to the "other" DB.
VJ
<k...@hotmail.comwrote in message
news:11*********************@n59g2000hsh.googlegro ups.com...
Hi.
I have a problem when I try to run an application against a local SQL-
server, it works find when I run the application against a SQL-server
on a server.
The problem is this I have 2 databases and some times I have to access
(from the program) SP's that is located in "the other" DB (not the one
I'm connected against).
This is done by setting the name of the DB, owner and SP-name
(MyOtherDB.dbo.sp_name) in an SqlCommand object.
When I run localy I get an exception saying that it can not find
MyOtherDB in systemdatabase but when I run "select * from
sys.databases" I can see MyOtherDB.??
Can anyone tell me what the problem is??- Dölj citerad text -
- Visa citerad text -
Thanks VJ.
But it seem that the problem was a space caracter in the beginning of
the original connection string. This is not a problem when I first
connect to the DB but when I later try to run an SP in "the other DB"
an SQL-Helper class don't trim this space away. I did not think to
check the connection string bcs it connectet when I started the app.
But from what I know (and other people told me after I told them the
reason for this error) it is not a problem to have a space character
after the '=' sign and the name of the data base that I have as
Initial catalog.
So as the responsable DBA at my work told me "Thank's MS" for yet
another BUG.