Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
basketballer
Starting Member
4 Posts |
Posted - 2008-07-29 : 14:00:54
|
Hi all, I got a problem connecting C# to an SQL Server database.I tried millions of solutions from online and then lost hope so here i am now here.I don't know where to start:at first i couldn't open a connection.I don't know if problem now is solved, but now after configuring many things i'm getting this error:==================================SqlError Cannot open database "WMS_Database" requested by the login. The login failed.SqlError Login failed for user 'JE-LAPTOP\Hassan S. Alsheikh'.A first chance exception of type 'System.Data.SqlClient.SqlException' occurred in System.Data.dll==================================I build this database from MS C# 2008 Express edition, and i've created a Dataset for it from there as well. But opening the connection and accessing the database is through code using ADO.NET. Am i doing something wrong?Please, i've been searching and reading for a while now, and i need to move further in this software i'm programming.Thank you in advance, experts =)"Be realistic.. see the truth the way it is, not the way you want it to be.." |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2008-07-29 : 14:15:20
|
Log into SQL Server via Management Studio, check what access WMS_Database has. Check its default database. Let us know what you find.Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/Subscribe to my blog |
|
|
basketballer
Starting Member
4 Posts |
Posted - 2008-07-29 : 14:52:36
|
Well first, thanks for your quick response but you see i don't have Management Studio. Apparently the package I've downloaded didn't have it.All what i got is Configuration Manager + Error and Usage reporting + Surface Area configuration. :S If it is "some how" the problem, what can i do to download the right package and then integrate my C# software with it....Thank you again.."Be realistic.. see the truth the way it is, not the way you want it to be.." |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2008-07-29 : 14:53:53
|
Management Studio is one of the tools that we use to administer SQL Server. It will not integrate with your application. In order to fix your error, we need to administer inside SQL Server. Could you install the SQL Server client tools so that you have the proper tools to troubleshoot this issue? What edition of SQL Server do you have?Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/Subscribe to my blog |
|
|
basketballer
Starting Member
4 Posts |
Posted - 2008-07-29 : 15:15:09
|
Its the 2005.Alright I'll work on it and get back to you soon..Thank you Tara"Be realistic.. see the truth the way it is, not the way you want it to be.." |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2008-07-29 : 15:28:30
|
Not the version number, but what edition do you have? I was confused when you wrote this in your original post: "MS C# 2008 Express edition". So is that SQL Server 2005 Express Edition? Or do you have a better edition?Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/Subscribe to my blog |
|
|
basketballer
Starting Member
4 Posts |
Posted - 2008-07-30 : 17:36:00
|
Yea its the Express Edition.MS C# 2008 Express Edition AND SQL Server 2005 Express Edition.Sorry i'm late, but i had to re-build the database bcoz i kind of lost it due to a stupid mistake!!But the good news is that it WORKED =DIt connected! Thank you very very much."Be realistic.. see the truth the way it is, not the way you want it to be.." |
|
|
|
|
|
|
|