ADO works ADO.NET does

G

Guest

I have a strange issue and wondered if anyone could shed some light on the
situation.

I have two applications (sitting on web server A), one is a VB website using
ADO and one is a VB.NET using ADO.NET. They both connect to the same SQL
Server, with the same user id and password. The VB application can connect
and execute stored procedure X, but when the ADO.NET application tries it
receives a SQL Server does not exist error message. These two application do
exactly the thing, just call one stored procedure. I have gone through
various DSN settings, but none work. Even if I bring down the applications to
my server, the same results happen.

Any Ideas?
 
P

Patrice

Try SQL profiler to check the user name is the one you expect... You could
also retrive the DB name, the user name instead of calling the stroed proc
to make sure you are in the expected context...

Patrice
 
G

Guest

As an update, I have also found that if I use a Trusted Connection (and
impersonate on the web) the connection works ok.

But this doesn't explain why the ADO application can connect using the SA
account and the ADO.NET can't

When using the SA account, impersonation is setting to false, so could it be
something to do with the ASP.NET worker process.

I can't understand why this would stop me from seeing the server (when using
ADO.NET and SA) as apposed to ADO.NET and trusted connection.

Help
 
P

Patrice

Is the original error not "seeing" the server or connecting but not finding
a stored proc ? At first, my understanding was that you were connected but
that the stored proc was not found ???

Make sure also you don't have a catch that hide an earlier errror...

If you can connect and don't found the proc, did you tried my earlier
suggestion to check the exact context ( such as SELECT SUSER_SNAME(), SELECT
USER_NAME()
SELECT DB_NAME()) in which you are connected ?

Patrice

--
 
G

Guest

Thank you for the reply. The problem was I could not connect (see the
server). However, the issue has now been resolved. The TCP/IP port on the SQL
server was unable to bind itself after a reboot. This was stopping the
ASP.NET connecting.

Thanks
 
P

Patrice

Great ! Good day...

Patrice

--

resolutionsnet said:
Thank you for the reply. The problem was I could not connect (see the
server). However, the issue has now been resolved. The TCP/IP port on the SQL
server was unable to bind itself after a reboot. This was stopping the
ASP.NET connecting.

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top