|
Home > Archive > Microsoft SQL Server Desktop Engine > July 2005 > Hello World not working - SQL Server does not exist
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Hello World not working - SQL Server does not exist
|
|
| baylor 2005-05-04, 8:24 pm |
| After 8 hours of failure, i am feeling like the world's stupidest person
In the last two weeks, i've bought a new PC, installed VS.NET 2003,
installed MSDE, installed pubs & northwind, installed MS Web Data
Administrator, installed code from ASP.NET Unleashed and tried to write hello
world programs
After much pain, MSDE installed. After several hours of more pain, i finally
found a version of northwind that osql didn't complain was corrupt. After a
bit more, i realized MSDE had turned off SQL authentication and, with the
help of regedt32, turned it back on. Web Data Admin and VS installed with no
problem or pain
osql can now log in both with uid=sa/pwd=blank and with an account i created
that has a password. Web Data Admin can now log in with both integrated and
SQL authentication. In Web Data Admin i can query the pubs DB and get data
What i can't do is get any ASP.NET code to connect to the DB. i've used code
i've written, code i've downloaded, code from books and code from CDs from
books. Here's a sample of what doesn't work:
string cs = " Server=localhost;uid
=dev;pwd=password;da
tabase=pubs;";
SqlConnection conPubs = new SqlConnection(cs);
conPubs.Open(); //--- ERROR Here!!!
error: SQL Server does not exist or access denied
The account name and password are valid. DB is on localhost. Database name
is pubs. Account has sa privileges. i can connect (and query data) via Web
Data Admin using this account and SQL Login
i've tried several other variations on the connect string and i've tried
using the sa account
i have never gotten *any* DB code to work, although the 3rd party tools all
work (finally)
Any ideas? i'm guessing i'm doing something simple wrong
-baylor
| |
| Fred Nelson 2005-05-04, 8:24 pm |
| Hi Baylor:
Don't feel stupid - the installation of MSDE is difficult. I spent a week
in the same situation two years ago!
The first thing I would check is to see if you can make a connection with
the enterprise manager. If you don't have it then hopefully Microsoft still
has the 120 day demo version so you can try it.
I needed to change my configuration to "mixed mode" and that solved all of
my problems. I had performed all the registry tricks with no luck either.
If that doesn't work then I would de-install and re-install checking that
the "mixed mode" was selected on the command line.
Hope this helps!
Fred
"baylor" <baylor@discussions.microsoft.com> wrote in message
news:B6FE74C6-5F78-414A-B6DB- AAAC9B6BCF92@microso
ft.com...
> After 8 hours of failure, i am feeling like the world's stupidest person
>
> In the last two weeks, i've bought a new PC, installed VS.NET 2003,
> installed MSDE, installed pubs & northwind, installed MS Web Data
> Administrator, installed code from ASP.NET Unleashed and tried to write
hello
> world programs
>
> After much pain, MSDE installed. After several hours of more pain, i
finally
> found a version of northwind that osql didn't complain was corrupt. After
a
> bit more, i realized MSDE had turned off SQL authentication and, with the
> help of regedt32, turned it back on. Web Data Admin and VS installed with
no
> problem or pain
>
> osql can now log in both with uid=sa/pwd=blank and with an account i
created
> that has a password. Web Data Admin can now log in with both integrated
and
> SQL authentication. In Web Data Admin i can query the pubs DB and get data
>
> What i can't do is get any ASP.NET code to connect to the DB. i've used
code
> i've written, code i've downloaded, code from books and code from CDs from
> books. Here's a sample of what doesn't work:
>
> string cs = " Server=localhost;uid
=dev;pwd=password;da
tabase=pubs;";
> SqlConnection conPubs = new SqlConnection(cs);
> conPubs.Open(); //--- ERROR Here!!!
>
> error: SQL Server does not exist or access denied
>
> The account name and password are valid. DB is on localhost. Database name
> is pubs. Account has sa privileges. i can connect (and query data) via Web
> Data Admin using this account and SQL Login
>
> i've tried several other variations on the connect string and i've tried
> using the sa account
>
> i have never gotten *any* DB code to work, although the 3rd party tools
all
> work (finally)
>
> Any ideas? i'm guessing i'm doing something simple wrong
>
> -baylor
| |
| Norman Yuan 2005-05-04, 8:24 pm |
| In your connection strng:
string cs = " Server=localhost;uid
.."
should be
string cs = "Server=(local);uid..."
"localhost" is meant for Web server on local computer, while for SQL
Server/MSDE, it is "(local)".
Also, make sure you have login in MSDE called "dev" and access to the
database "Pubs" is granted.
"baylor" <baylor@discussions.microsoft.com> wrote in message
news:B6FE74C6-5F78-414A-B6DB- AAAC9B6BCF92@microso
ft.com...
> After 8 hours of failure, i am feeling like the world's stupidest person
>
> In the last two weeks, i've bought a new PC, installed VS.NET 2003,
> installed MSDE, installed pubs & northwind, installed MS Web Data
> Administrator, installed code from ASP.NET Unleashed and tried to write
hello
> world programs
>
> After much pain, MSDE installed. After several hours of more pain, i
finally
> found a version of northwind that osql didn't complain was corrupt. After
a
> bit more, i realized MSDE had turned off SQL authentication and, with the
> help of regedt32, turned it back on. Web Data Admin and VS installed with
no
> problem or pain
>
> osql can now log in both with uid=sa/pwd=blank and with an account i
created
> that has a password. Web Data Admin can now log in with both integrated
and
> SQL authentication. In Web Data Admin i can query the pubs DB and get data
>
> What i can't do is get any ASP.NET code to connect to the DB. i've used
code
> i've written, code i've downloaded, code from books and code from CDs from
> books. Here's a sample of what doesn't work:
>
> string cs = " Server=localhost;uid
=dev;pwd=password;da
tabase=pubs;";
> SqlConnection conPubs = new SqlConnection(cs);
> conPubs.Open(); //--- ERROR Here!!!
>
> error: SQL Server does not exist or access denied
>
> The account name and password are valid. DB is on localhost. Database name
> is pubs. Account has sa privileges. i can connect (and query data) via Web
> Data Admin using this account and SQL Login
>
> i've tried several other variations on the connect string and i've tried
> using the sa account
>
> i have never gotten *any* DB code to work, although the 3rd party tools
all
> work (finally)
>
> Any ideas? i'm guessing i'm doing something simple wrong
>
> -baylor
| |
| baylor 2005-05-04, 8:24 pm |
| > In your connection strng:
> string cs = " Server=localhost;uid
.."
> should be
> string cs = "Server=(local);uid..."
> "localhost" is meant for Web server on local computer, while for SQL
> Server/MSDE, it is "(local)".
That did it!
Odd though - the primary book i'm working through (ASP.NET Unleashed) always
lists it, both in the book and code on the CD, as localhost, never (local). i
switched three test programs from localhost to (local) and now all three of
them work
Thanks Norman!
-baylor
| |
| Jens Süßmeyer 2005-05-05, 3:23 am |
|
"baylor" <baylor@discussions.microsoft.com> schrieb im Newsbeitrag
news:330A8D35-E675-430B-9AD1- E5FC2B54D70A@microso
ft.com...
>
> That did it!
>
> Odd though - the primary book i'm working through (ASP.NET Unleashed)
> always
> lists it, both in the book and code on the CD, as localhost, never
> (local). i
> switched three test programs from localhost to (local) and now all three
> of
> them work
>
> Thanks Norman!
>
> -baylor
| |
| Jens Süßmeyer 2005-05-05, 3:23 am |
| In SQL Server 2005, they will not use different word for your local machine,
so be prepared if you someday will
Upgrade to SQL Server 2005, the name will be localhst for both.
Jens Suessmeyer,
"baylor" <baylor@discussions.microsoft.com> schrieb im Newsbeitrag
news:330A8D35-E675-430B-9AD1- E5FC2B54D70A@microso
ft.com...
>
> That did it!
>
> Odd though - the primary book i'm working through (ASP.NET Unleashed)
> always
> lists it, both in the book and code on the CD, as localhost, never
> (local). i
> switched three test programs from localhost to (local) and now all three
> of
> them work
>
> Thanks Norman!
>
> -baylor
| |
| Ramesh 2005-07-19, 9:23 am |
| Hello:
I am new to MSDE, I installed MSDE in my machine, I wrote db application
using visual basic .net . I can update the database. It works fine. Now I
created installed package without MSDE. I do not know how to add runtime MSDE
engine file in my installation. When I run the new install setup in different
machine, I received a message saying that MSDE or SQL is not installled. I
got these message, because my installation package does not have SQL-DMO. I
just know how to add these MSDE run time file in my package? Do you know any
web site that describe with detaiils.
Thanks.
Ramesh Dhurvas
"Fred Nelson" wrote:
> Hi Baylor:
>
> Don't feel stupid - the installation of MSDE is difficult. I spent a week
> in the same situation two years ago!
>
> The first thing I would check is to see if you can make a connection with
> the enterprise manager. If you don't have it then hopefully Microsoft still
> has the 120 day demo version so you can try it.
>
> I needed to change my configuration to "mixed mode" and that solved all of
> my problems. I had performed all the registry tricks with no luck either.
>
> If that doesn't work then I would de-install and re-install checking that
> the "mixed mode" was selected on the command line.
>
> Hope this helps!
>
> Fred
>
> "baylor" <baylor@discussions.microsoft.com> wrote in message
> news:B6FE74C6-5F78-414A-B6DB- AAAC9B6BCF92@microso
ft.com...
> hello
> finally
> a
> no
> created
> and
> code
> all
>
>
>
| |
| Andrea Montanari 2005-07-19, 11:23 am |
| hi Ramesh,
Ramesh wrote:
> Hello:
>
> I am new to MSDE, I installed MSDE in my machine, I wrote db
> application using visual basic .net . I can update the database. It
> works fine. Now I created installed package without MSDE. I do not
> know how to add runtime MSDE engine file in my installation. When I
> run the new install setup in different machine, I received a message
> saying that MSDE or SQL is not installled. I got these message,
> because my installation package does not have SQL-DMO. I just know
> how to add these MSDE run time file in my package? Do you know any
> web site that describe with detaiils.
you can use the Visual Studio built in installer package (I'm not
confortable with) as described in
http://www.gotdotnet.com/Community/...23-77904FE02CAF ,
you can use the Deployment Toolkit
http://www.microsoft.com/downloads/...displaylang=en,
or you can distribute the Microsoft provided package as is... personally I
prefer this solution, and just provided a little ui that wraps all
parameters collecting action, then I shell to the setup.exe boostrap
installer....
--
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtm http://italy.mvps.org
DbaMgr2k ver 0.14.0 - DbaMgr ver 0.59.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
--------- remove DMO to reply
|
|
|
|
|