Vb.net web page sql server access question 
Author Message
 Vb.net web page sql server access question

Hopefully this is not outside the topic of this discussion group...

I have a web page I've done with VB.Net.  It accesses an SQL Server
database.  Everything worked fine on my development machine where
SQL Server, IIS, VB.Net etc. were all on the same machine.

When I deployed the web page to the web server, and changed the
connection string to the live SQL Server, now I get:
"SQL Server does not exist or access denied"
when I try the Open method of the connection.

Now I've tried all this on my development machine, just with
the live connection string.  Same error.

Strangely, I can register the SQL Server in my enterprise manager
on my development machine, so connection is possible.

Can anyone point me to the solution?

Thanks,
    Selden McCabe



Tue, 01 Feb 2005 23:29:04 GMT  
 Vb.net web page sql server access question
Check your live connection string.  It sounds like it is not correct.  In
particular, check to insure that it has the correct instance name and server
names.  If you check that and it is correct, then check the user id and
password.  Are they correct - for the live database?

HTH

David


Quote:
> Hopefully this is not outside the topic of this discussion group...

> I have a web page I've done with VB.Net.  It accesses an SQL Server
> database.  Everything worked fine on my development machine where
> SQL Server, IIS, VB.Net etc. were all on the same machine.

> When I deployed the web page to the web server, and changed the
> connection string to the live SQL Server, now I get:
> "SQL Server does not exist or access denied"
> when I try the Open method of the connection.

> Now I've tried all this on my development machine, just with
> the live connection string.  Same error.

> Strangely, I can register the SQL Server in my enterprise manager
> on my development machine, so connection is possible.

> Can anyone point me to the solution?

> Thanks,
>     Selden McCabe



Wed, 02 Feb 2005 00:08:58 GMT  
 Vb.net web page sql server access question
Hi David,

The connection string I'm using for my local server is:
"Server=MySErver;Database=MyDatabase;uid=MyUser;pwd=MyPassword;"

And that works just fine.  When I change the MyServer to TheirServer, it
doesn't work.  These same parameters are working for connection to the
same database from a VB6 program on my dev machine.

Also here's another clue:  One of the developers at the client's location
(and therefor inside their firewall) installed IIS, .Net, etc. on his
machine,
and my web page works from his machine!

I'm thinking this is a permissions problem, since ASP.NET web pages
are running under a user ASPNET.  Could this be it? If so, what
do I do to fix it?

Thanks,
    Selden


Quote:
> Check your live connection string.  It sounds like it is not correct.  In
> particular, check to insure that it has the correct instance name and
server
> names.  If you check that and it is correct, then check the user id and
> password.  Are they correct - for the live database?

> HTH

> David



> > Hopefully this is not outside the topic of this discussion group...

> > I have a web page I've done with VB.Net.  It accesses an SQL Server
> > database.  Everything worked fine on my development machine where
> > SQL Server, IIS, VB.Net etc. were all on the same machine.

> > When I deployed the web page to the web server, and changed the
> > connection string to the live SQL Server, now I get:
> > "SQL Server does not exist or access denied"
> > when I try the Open method of the connection.

> > Now I've tried all this on my development machine, just with
> > the live connection string.  Same error.

> > Strangely, I can register the SQL Server in my enterprise manager
> > on my development machine, so connection is possible.

> > Can anyone point me to the solution?

> > Thanks,
> >     Selden McCabe



Wed, 02 Feb 2005 02:30:33 GMT  
 Vb.net web page sql server access question
After a TON of poking around and trying things, I discovered
that MDAC had not been installed on the web server!

Once I installed that, it worked fine.

Warning to other newbies on this: the error message was not
helpful: "SQL Server does not exist or access denied"

Installing MDAC (which is a free download from
www.microsoft.com, as well as other places) fixed
the problem!

---Selden



Wed, 02 Feb 2005 05:35:56 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. VB Desktop Application Accessing SQL Server on Web Server

2. VB Desktop Application Accessing SQL Server on Web Server

3. VB Desktop Application Accessing SQL Server on Web Server

4. VB Desktop Application Accessing SQL Server on Web Server

5. Using SQL Server Application Roles in a VB.NET web app

6. MS Access 2002 vs VB.net as a front-end to SQL Server data

7. Cannot start/install any ASP.NET page on my web server

8. ASP.net VB.Net Stored Procedures in SQL Server

9. .NET question - Web page design

10. SQL SERVER, VB.NET,ASP.NET Optimization Techniques

11. Access/VB with SQL Server question

12. read/etitw to access database on web server from html page

 

 
Powered by phpBB® Forum Software