473,386 Members | 1,830 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

problems when I use local SQL-server

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??

Mar 15 '07 #1
3 1209
VJ
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

<kk***@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??

Mar 15 '07 #2
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.

Mar 16 '07 #3
MSDN2 appears (at a cursory glance) to validate your argument
(assuming there are no quotes in hte value)
http://msdn2.microsoft.com/en-us/lib...ng(VS.80).aspx
<q>To include preceding or trailing spaces in the string value, the
value must be enclosed in either single quotation marks or double
quotation marks.</q>

You could log it as a bug, but given there is a simple workaround it
doesn't strike me as very critical - just frustrating for you.

Marc
Mar 16 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Geoff Soper | last post by:
I'm having problem with images becoming corrupted after loading them into a MySQL database and extracting them again. I'm pretty sure it's todo with escaping slashes but I'm at a loss as to how to...
2
by: Skip Montanaro | last post by:
I'm trying to build the released version of Python 2.3 on Solaris 8 for the first time. It has problems when building _ssl.so. The command generated is gcc -shared...
3
by: Jan Bols | last post by:
I've been trying to install Oracle 8.1.7 on a fresh Mandrake 9.1 O.S for days, but I'm still not able to get it running. I've tried several install instructions that I found on the internet but no...
9
by: Neil | last post by:
I have been coding with ASP for some time now. I am using an ACCESS database. I am in the UK and wish to use DD/MM/YYYY format for dates. I have had no end of problems and possible solutions to...
4
by: JM | last post by:
Hi, I am an old programmer who is only just getting back into it after about 10 years, and for the life of me I can not work out what I am doing wrong. Firstly, I've recently downloaded and...
1
by: jmalone | last post by:
I have a python script that I need to freeze on AIX 5.1 (customer has AIX and does not want to install Python). The python script is pretty simple (the only things it imports are sys and socket)....
2
by: KR | last post by:
Hi, We are running a test upgrade form sql 2000 standard edition to sql 2005 developer edition. Followed through all the steps and specified the account(SA priveleges and currently used by the...
3
by: rn5a | last post by:
In my local computer, date has been set in this format - dd/MM/yyyy. When I insert records in a MS-Access DB table using ASP.NET, then the records get inserted in the Access DB table exactly in the...
3
by: Michael Lang | last post by:
Hi there, I have a web application that works fine on my local dev machine. However I'm having less success on my hosting environment. When I detach the database for this site, copy it to my...
1
by: minimatrix | last post by:
Hi guys just wandering if I could get a little help! , I have wrote a Perl script to sort out some data in my database, I am saving into an sql file but having a few problems executing the sql...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.