473,472 Members | 2,211 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Connection falied to "pubs" database with MSDE 2000

Hi,
I've recently downloaded MSDE and have tried to create a small app to test
the connection. It fails at the Connections Open() method with an error
indicating an invalid server version. I'm running on a standalone PC with
Windows XP and the .NET 2003 Standard edition.

The connection string I used was :-
Dim objConnection As SqlConnection = New
SqlConnection("server=(local);database=C:\SQL Server 2000 Sample
Databases\pubs;user id=sa;password=")

The actual error was:-
ServerVersion <error: an exception of type:System.InvalidOperationException}
occurred> String

--
Thanks for any help
Jun 22 '06 #1
1 1749
The ConnectionString is clearly wrong: the "database" should be a database
name in the SQL Server/MSDE, not a file name. You do not deal with file on
SQL Server MSDE. it should be: "server=(local);database=pubs;user
id=sa;password=".

BWT, it is recommended to never use "sa" account with blank password, even
it is for test.

"RobOfTage" <Ro*******@discussions.microsoft.com> wrote in message
news:A9**********************************@microsof t.com...
Hi,
I've recently downloaded MSDE and have tried to create a small app to test
the connection. It fails at the Connections Open() method with an error
indicating an invalid server version. I'm running on a standalone PC with
Windows XP and the .NET 2003 Standard edition.

The connection string I used was :-
Dim objConnection As SqlConnection = New
SqlConnection("server=(local);database=C:\SQL Server 2000 Sample
Databases\pubs;user id=sa;password=")

The actual error was:-
ServerVersion <error: an exception of
type:System.InvalidOperationException}
occurred> String

--
Thanks for any help

Jun 22 '06 #2

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

Similar topics

1
by: EricP | last post by:
Hello, First, sorry for my bad English. Here is my problem: BoxA: XPpro + Apache + php (using php_mssql.php)+ ADOdb + MS SQL Server + My_Prog (using local MS SQL PUBS database) BoxB: NT4...
11
by: Taishi | last post by:
Andy, I am new to SQL. It was hard just to figure out how to install it. I know I am logged in as a Admin. in Windows. I have the little server box with the round circle on it in the bottom...
1
by: anon | last post by:
I'm trying to work through the tutorial that came with VS.net. It talks about using the "pubs" database. I downloaded MSDE 2000 and installed it but I'm not sure what to do next. Do I need to...
8
by: Jonas L | last post by:
I'm creating a application that should handle contacts, orders etc. I want to distribute only the exe file and let the application take care of creating and changing the database that is to be...
0
by: Igor | last post by:
An error "ODBC connection to failed" is raised when I am trying to get data from a table in Microsoft Access (97, or 2000) which is actually a linked table to another table in SQL Server 7 . The...
7
by: Keith Norris | last post by:
I cannot successfully create a connection object in a web form. In the page_load event I try the following code: Dim sConnection As String = "server=MIDATLANTICUS;" & _ database=Pubs;integrated...
4
by: William | last post by:
I am using SQL MSDE edition due to financial reasons (it's free). I have a question regarding connection strings. Almost every publication, online example or website uses some version of the...
3
by: Dave | last post by:
I am a user of the ConfigurationSettings.AppSettings("KeyName") in asp.net 1.1 so after reading about the new ConnectionStrings collection in "Intoducing Microsoft ASP.NET 2.0 by Dino Esposito on...
12
by: John | last post by:
I can't get my head around this! I have the following code: <% .... Code for connection to the database ... .... Code for retrieving recordset ... If Not rs.EOF Then ... Do something...
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
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,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.