Hi there. I do apologise if this is the wrong place to post this.
I usually use SQL Server 2000/2005 EE. But for this particular project or really just as a testing environment I require to use MSDE 2000
I had installed it, making my own setup.ini file and giving it the instance name, password and the securitymode set to SQL
Thing is, I am unable to log in using osql. I always get this error:
[DBNETLIB]SQL Server does not exist or access denied.
[DBNETLIB]ConnectionOpen (Connect()).
But no idea why since the password (which is password) has been entered correctly. This is basically what I input for osql:
osql -U sa -P password -S localhost\Test
is this correct Am I missing something
Many thanks for your help!

unable to log in [MSDE2000]
Daniel Reis
ok well i managed to do this and worked fine but i am still unable to connect via VS.NET 2005.
I used on the command prompt this line and was able to create a database:
osql -Usa -Ppassword -S(local)\Test -e
that worked
The C# connectionstring is as follows:
string theConnectionString = "Server=(local);Database=Test;User ID=sa;Password=password;Trusted_Connection=False";but my connection string in VS.NET 2005 (C#) throws an exception when connecting:
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
Esemi
-jens.
Bob Clemens
how many instances of sql server do you have installed, and which one are you trying to connect to In your osql.exe example, you're connecting to a named instance, but in your connection string, I'm under the impression that "Server=(local)" is referencing the default instance.
The exception looks like a SQL 2005 error message, but I thought you're trying to connect to SQL 2000.
aydin1
if you have more than one instance on the server running you propably assigned another port to the named instance than the standard one 1433, so you have to specify that in your connection / your OSQL statement
-S Servername\InstanceName,PortNumber
HTH, Jens Suessmeyer.
---
http://www.sqlserver2005.de
---
Rom90125
Hi,
don’t know if you are still monitoring the thread here, but I saw you post a bit lately :-) If you are sure that you are on the *really*right database, see if the Procedure has another than the "dbo" owner. If so, specify the owner before the procedure name as "dbo.SomeProcedure".
The owner information can be viewed under:
SELECT * FROM
INFORMATION_SCHEMA.Routines
WHERE Routine_name = 'SomeRoutineName'
HTH, Jens Suessmeyer.
---
http://www.sqlserver2005.de
---
savior1980
Thanks
I'll give that a shot but I am sure I did specify dbo.whatever and always create procedures with dbo.whatever
crimson33
hi Thanks for your responses
I only have 1 instance of SQL Server and that is an MSDE 2000 edition
I seem to have solved the problem! Connectionstring:
string
theConnectionString = "Data Source=(local)\\Test;Initial Catalog=Test;User Id=sa;Password=password;";seems to work
I am not used to the way MSDE 2000 works but getting there! The one problem I do have, most likely by design, is that when I am trying to execute a specific stored procedure (which exists on the database) I always get a "Could not found stored procedure storedProcedureName"
using osql I always have to use the "use" command to use the specific database, but I have specified what database to use in the connectionstring - does this not work correctly
How can I execute a stored procedure, like I normally do using SQL Server 2000/2005
I usually do this:
SqlCommand theSQLCommand = new SQLCommand();
theSQLCommand.Connection = theConnectionObject;
theSQLCommand.CommandType = CommandType.StoredProcedure;
theSQLCommand.CommandText = "SomeStoredProcedure";
theConnectionObject.Open();
theSQLCommand.ExecuteNonQuery(); //Error - could not find stored procedure
theConnectionObject.Close();