Click here to Skip to main content
15,887,952 members
Home / Discussions / Database
   

Database

 
AnswerRe: need recommandation for database for vs.net 2010 c# web service project Pin
Richard Deeming12-Jun-13 7:11
mveRichard Deeming12-Jun-13 7:11 
AnswerRe: need recommandation for database for vs.net 2010 c# web service project Pin
jschell12-Jun-13 8:59
jschell12-Jun-13 8:59 
QuestionConnecting to an SQL Database. Pin
Bram van Kampen11-Jun-13 13:41
Bram van Kampen11-Jun-13 13:41 
AnswerRe: Connecting to an SQL Database. Pin
Eddy Vluggen11-Jun-13 22:28
professionalEddy Vluggen11-Jun-13 22:28 
GeneralRe: Connecting to an SQL Database. Pin
Bram van Kampen12-Jun-13 12:59
Bram van Kampen12-Jun-13 12:59 
GeneralRe: Connecting to an SQL Database. Pin
Tim Carmichael13-Jun-13 2:03
Tim Carmichael13-Jun-13 2:03 
GeneralRe: Connecting to an SQL Database. Pin
jschell13-Jun-13 8:57
jschell13-Jun-13 8:57 
GeneralRe: Connecting to an SQL Database. Pin
Eddy Vluggen13-Jun-13 9:44
professionalEddy Vluggen13-Jun-13 9:44 
Already two good answers in my absence, and I'd like to expand on them.

Bram van Kampen wrote:
The Tables were constructed and populated with the SQL management studio, and, also saved.
Which credentials did the Management Studio use to connect to the database? Roll eyes | :rolleyes:

Bram van Kampen wrote:
They are shown in the studio as "dbo.Users", resp "dbo.Names". Is this the correct way of addressing these tables in a queery string, or should I leave out the 'dbo' part.
The dbo is the schema-name of the "database owner". In the ideal case, one would create a new schema and assign the appropriate rights to that.

Whether you (want to) use the prefix in the SQL statements depends on how portable (or strict) you want your queries to work. Without specifying the schema, it's easier to reuse the query under a different schema. OTOH, I often even prefix the databasename and the server to identify a table;
SQL
SELECT <columnlist> 
  FROM server.databasename.schemaname.tablename
 WHERE 1=1

This way I'm pretty sure that I'm selecting exactly what has been specified, regardless of which is the "current" database, or even the current machine, and copy/paste errors show up as a parser-error before the command is executed. Omit the server/schema, and you can guess what happens when you do a "DELETE FROM Users" when you've selected the wrong server by accident.

Bram van Kampen wrote:
I have both Amin and User Access to this machine.
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).

First, you'll need to know how the server is configured. That's the same as when using the Management Studio, and as quoted above, you've already used it to login when creating the tables.
Bastard Programmer from Hell Suspicious | :suss:
If you can't read my code, try converting it here[^]

GeneralRe: Connecting to an SQL Database. Pin
Bram van Kampen14-Jun-13 0:42
Bram van Kampen14-Jun-13 0:42 
GeneralRe: Connecting to an SQL Database. Pin
Eddy Vluggen14-Jun-13 8:56
professionalEddy Vluggen14-Jun-13 8:56 
GeneralRe: Connecting to an SQL Database. Pin
Bram van Kampen14-Jun-13 13:59
Bram van Kampen14-Jun-13 13:59 
GeneralRe: Connecting to an SQL Database. Pin
Eddy Vluggen15-Jun-13 2:35
professionalEddy Vluggen15-Jun-13 2:35 
GeneralRe: Connecting to an SQL Database. Pin
Bram van Kampen17-Jun-13 14:13
Bram van Kampen17-Jun-13 14:13 
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 
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 

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.