Click here to Skip to main content
15,908,013 members
Home / Discussions / Database
   

Database

 
GeneralRe: Connecting to an SQL Database. Pin
Eddy Vluggen19-Jun-13 8:54
professionalEddy Vluggen19-Jun-13 8:54 
GeneralRe: Connecting to an SQL Database. Pin
Bram van Kampen21-Jun-13 13:46
Bram van Kampen21-Jun-13 13:46 
GeneralRe: Connecting to an SQL Database. Pin
Eddy Vluggen22-Jun-13 21:47
professionalEddy Vluggen22-Jun-13 21:47 
GeneralRe: Connecting to an SQL Database. Pin
Bram van Kampen23-Jun-13 14:09
Bram van Kampen23-Jun-13 14:09 
GeneralRe: Connecting to an SQL Database. Pin
Eddy Vluggen23-Jun-13 22:33
professionalEddy Vluggen23-Jun-13 22:33 
GeneralRe: Connecting to an SQL Database. Pin
Bram van Kampen24-Jun-13 12:56
Bram van Kampen24-Jun-13 12:56 
GeneralRe: Connecting to an SQL Database. Pin
Eddy Vluggen25-Jun-13 9:52
professionalEddy Vluggen25-Jun-13 9:52 
GeneralRe: Connecting to an SQL Database. Pin
Bram van Kampen18-Jun-13 15:42
Bram van Kampen18-Jun-13 15:42 
Hi,

Back to the vexed old question, 'How to connect'
Eddy Vluggen wrote:
Which credentials did the Management Studio use to connect to the database?
Roll eyes | :rolleyes:

Well, I was running VS 2012 R2 and DB Management Studio in my Windows User Account(As per Standard Windows 7 Installation). No further questions were asked by the system. It appears that I can there create new db tables, and even populate them, but, cannot read or otherwise use them. Was this security system per chance written by 'Franz Kafka'?



Eddy Vluggen wrote:
Yes, but that's local to your machine - the database-server has it's own
security. There's two modes; first there's Windows Authentication, which takes
the user that's currently logged into Windows to authenticate (and is DBO when
creating a table). One doesn't need a password in that case, since you already
provided a username/password when logging into Windows. That's the preferred
way. Alternative, there's "mixed mode", where SQL accepts a username/password
combination (with "sa" usually being the name of the admin account).


In this case, the Databaseserver IS the local machine.

I have since reset the database to 'Mixed Mode', and changed the password vor the 'sa' account to '12345'. I havechanged the connection string to:
C#
SqlConnection myConnection = new SqlConnection("server=b-pc\\Softguard;"+
                                       "database=SgTextiles; " +
                                       "User ID=sa;Password=12345;" +
                                       "Trusted_Connection=true;" +
                                       "connection timeout=5");


It now fails with:
Quote:
System.Data.SqlClient.SqlException (0x80131904): Cannot open database "SgTextiles" requested by the login. The login failed.
Login failed for user 'b-PC\Bram'.
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean


My first priority now is to connect to the DB (by whatever means, including compromising security,) to get a proof of concept together

Smile | :)
Bram van Kampen

GeneralRe: Connecting to an SQL Database. Pin
Eddy Vluggen18-Jun-13 22:29
professionalEddy Vluggen18-Jun-13 22:29 
GeneralRe: Connecting to an SQL Database. Pin
Bram van Kampen20-Jun-13 15:10
Bram van Kampen20-Jun-13 15:10 
GeneralRe: Connecting to an SQL Database. Pin
Eddy Vluggen21-Jun-13 9:39
professionalEddy Vluggen21-Jun-13 9:39 
QuestionDictionary Database Requried for Android.... Pin
mAzeem229-Jun-13 8:19
mAzeem229-Jun-13 8:19 
AnswerRe: Dictionary Database Requried for Android.... Pin
Eddy Vluggen10-Jun-13 3:36
professionalEddy Vluggen10-Jun-13 3:36 
QuestionSQL Server table sizes. Pin
Septimus Hedgehog8-Jun-13 0:24
Septimus Hedgehog8-Jun-13 0:24 
AnswerRe: SQL Server table sizes. Pin
i.j.russell8-Jun-13 23:01
i.j.russell8-Jun-13 23:01 
GeneralRe: SQL Server table sizes. Pin
Septimus Hedgehog9-Jun-13 5:43
Septimus Hedgehog9-Jun-13 5:43 
Questiongetting common data Pin
Arun kumar Gautam7-Jun-13 10:58
Arun kumar Gautam7-Jun-13 10:58 
AnswerRe: getting common data Pin
Eddy Vluggen9-Jun-13 2:29
professionalEddy Vluggen9-Jun-13 2:29 
AnswerRe: getting common data Pin
prakash.chakrala4-Jul-13 23:19
prakash.chakrala4-Jul-13 23:19 
QuestionNeed Help in SQL Server "Stored Procedure" Pin
dr_iton6-Jun-13 5:59
dr_iton6-Jun-13 5:59 
AnswerRe: Need Help in SQL Server "Stored Procedure" Pin
Corporal Agarn6-Jun-13 7:06
professionalCorporal Agarn6-Jun-13 7:06 
GeneralRe: Need Help in SQL Server "Stored Procedure" Pin
dr_iton6-Jun-13 10:42
dr_iton6-Jun-13 10:42 
QuestionRe: Need Help in SQL Server "Stored Procedure" Pin
gvprabu12-Jun-13 4:27
gvprabu12-Jun-13 4:27 
QuestionHow to Insert Error_Message() into table and return user defined Message Pin
Robymon5-Jun-13 21:33
Robymon5-Jun-13 21:33 
AnswerRe: How to Insert Error_Message() into table and return user defined Message Pin
Corporal Agarn6-Jun-13 7:09
professionalCorporal Agarn6-Jun-13 7:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.