473,387 Members | 3,781 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,387 software developers and data experts.

Problem ASP.NET to SQL Server

Already posted to sql server group but maybe some help here....

If I run my application, I get a 'database does not exist'. If I then go
onto the machine with the database on (different machine) and log in to
query analyser, I can then go back to the web browser, it connects fine.

Three machines involved...
My PC
web server
db server

Order of events is...
go onto my PC, try and connect to web server via HTTP... fails with unknown
DB
do a remote connection to db server, log in
go back to my PC, try and connect to web server via HTTP... works fine.

It seems strange, like logging into the DB starts it polling itself as alive
or something.
The SQL Connection string is
server=1.1.1.1;database=dname;uid=****;password=** ******* with the names
changed to protect the guilty.


Nov 18 '05 #1
6 1099
Try adding this parameter to the connectionstring as well

data source="1.1.1.1\SQLINSTANCENAME"

You gotta specify what Sql instace you want to connect to since it's
possible to have several!

/Lars
"Tim Almond" <aa@aa.cc.vv> skrev i meddelandet
news:Og**************@tk2msftngp13.phx.gbl...
Already posted to sql server group but maybe some help here....

If I run my application, I get a 'database does not exist'. If I then go
onto the machine with the database on (different machine) and log in to
query analyser, I can then go back to the web browser, it connects fine.

Three machines involved...
My PC
web server
db server

Order of events is...
go onto my PC, try and connect to web server via HTTP... fails with unknown DB
do a remote connection to db server, log in
go back to my PC, try and connect to web server via HTTP... works fine.

It seems strange, like logging into the DB starts it polling itself as alive or something.
The SQL Connection string is
server=1.1.1.1;database=dname;uid=****;password=** ******* with the names
changed to protect the guilty.

Nov 18 '05 #2
Thanks, Lars.

Something that hasn't been explained to me - what is the difference between
using INITIAL CATALOG and DATABASE?


Nov 18 '05 #3
How do I find out the SQLINSTANCENAME?

Also, is it worth me trying a try...catch block on the code or not? Would it
maybe give me any more information than I'm currently getting?
Nov 18 '05 #4
I've never really seen a differance here, use whatever of them, I think
Initial Catalogue is more common though.

/Lars
"Tim Almond" <aa@aa.cc.vv> skrev i meddelandet
news:%2****************@TK2MSFTNGP11.phx.gbl...
Thanks, Lars.

Something that hasn't been explained to me - what is the difference between using INITIAL CATALOG and DATABASE?

Nov 18 '05 #5
You mean debugging, no I don't think debugging will help you here.

The instanse name should be har dto find, what SQL server are you using, the
Enterprice or just the MSDE version? If you are using the Enterprice Manager
to view database you should see the instancename in the navigation tree to
the left.

You might also find the InstaceName in the Controlpanel/Services and check
for the SQL service.. it'll say the name there,

/Lars
"Tim Almond" <aa@aa.cc.vv> skrev i meddelandet
news:Om**************@TK2MSFTNGP10.phx.gbl...
How do I find out the SQLINSTANCENAME?

Also, is it worth me trying a try...catch block on the code or not? Would it maybe give me any more information than I'm currently getting?

Nov 18 '05 #6
AFAIK Server/Database is the ODBC style while Data Source/Initial Catalog is
rather the OLEDB provider style. My personal preference is to use the
later...

Patrice

"Tim Almond" <aa@aa.cc.vv> a écrit dans le message de
news:%2****************@TK2MSFTNGP11.phx.gbl...
Thanks, Lars.

Something that hasn't been explained to me - what is the difference between using INITIAL CATALOG and DATABASE?

Nov 18 '05 #7

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

Similar topics

5
by: fripper | last post by:
I posted this problem a couple of days ago but felt I might have better luck re-stating the problem. Apparently I messed up IIS (v. 5) somehow because I am suddenly unable to load web forms! A...
0
by: AlessanBar | last post by:
Hello Friends !! I have a strange problem, and I need to know what would be the source of this. I have a laptop computer with the following configuration: Pentium III Brand : Toshiba Speed :...
8
by: Sarah | last post by:
I need to access some data on a server. I can access it directly using UNC (i.e. \\ComputerName\ShareName\Path\FileName) or using a mapped network drive resource (S:\Path\FileName). Here is my...
5
by: fripper | last post by:
I posted this problem a couple of days ago but felt I might have better luck re-stating the problem. Apparently I messed up IIS (v. 5) somehow because I am suddenly unable to load web forms! A...
1
by: sherifbk | last post by:
Problem description ============== - I have 4 clients and 1 server (SQL server) - 3 clients are Monitoring console 1 client is operation console - Monitoring console collects some data from...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.