Click here to Skip to main content
15,868,141 members
Home / Discussions / Database
   

Database

 
QuestionHow to select rows from table using Name field in sql Pin
netsheiksf29-Sep-14 21:22
netsheiksf29-Sep-14 21:22 
AnswerRe: How to select rows from table using Name field in sql Pin
Jörgen Andersson29-Sep-14 21:36
professionalJörgen Andersson29-Sep-14 21:36 
Questionhow to select last row on second CTE Pin
mamatsiantar28-Sep-14 18:06
mamatsiantar28-Sep-14 18:06 
AnswerRe: how to select last row on second CTE Pin
Bernhard Hiller28-Sep-14 22:30
Bernhard Hiller28-Sep-14 22:30 
GeneralRe: how to select last row on second CTE Pin
Jörgen Andersson28-Sep-14 23:42
professionalJörgen Andersson28-Sep-14 23:42 
GeneralRe: how to select last row on second CTE Pin
Eddy Vluggen29-Sep-14 5:26
professionalEddy Vluggen29-Sep-14 5:26 
GeneralRe: how to select last row on second CTE Pin
Jörgen Andersson29-Sep-14 5:50
professionalJörgen Andersson29-Sep-14 5:50 
QuestionMS Server - Lock a record Pin
hansoctantan26-Sep-14 3:48
professionalhansoctantan26-Sep-14 3:48 
Hello Experts,

I have a table ID, Lock and other fields. I have a VB.NET program that gets the TOP 1 record that is not lock and lock that record to be keyed/entry. Multiple users will use this program, is it possible that more than one user can access the same record in this process? Its possible users will request a record at the same time.

Thanks a lot.

Revision
Table
ID | Lock |
------------
1 | False |
2 | False |
3 | False |

Lets say that 2 computer are using same program connecting to the same server database
Client:1 - Request Time: 10:30:00 will get the ID 1, ID 1 will lock(update to true)
Client:2 - Request Time: 10:30:05 will get the ID 2, ID 2 will lock(update to true) - cause ID 1 is lock

This is my question. same request
Client:1 & 2 - Request Time: 10:30:00
- Query is (SELECT TOP 1 * FROM Table WHERE Lock = False)
- Put ID to a variable
- In the above run time, Is the 2 client will get the ID 1 or the this query will stack on SQL Server will finish one query first before executing another query?
- Be who you are and say what you feel because those who mind don't matter and those who matter don't mind.
- Most of the problem in your life are due to two reasons: you act without thinking, or think without acting


modified 29-Sep-14 9:34am.

QuestionRe: MS Server - Lock a record Pin
ZurdoDev26-Sep-14 4:22
professionalZurdoDev26-Sep-14 4:22 
AnswerRe: MS Server - Lock a record Pin
PIEBALDconsult26-Sep-14 4:24
mvePIEBALDconsult26-Sep-14 4:24 
AnswerRe: MS Server - Lock a record Pin
Eddy Vluggen26-Sep-14 6:15
professionalEddy Vluggen26-Sep-14 6:15 
AnswerRe: MS Server - Lock a record Pin
jschell26-Sep-14 10:44
jschell26-Sep-14 10:44 
AnswerRe: MS Server - Lock a record Pin
Wendelius30-Sep-14 8:28
mentorWendelius30-Sep-14 8:28 
QuestionProtect my sql server database Pin
dilkonika23-Sep-14 15:44
dilkonika23-Sep-14 15:44 
AnswerRe: Protect my sql server database Pin
Mycroft Holmes23-Sep-14 16:57
professionalMycroft Holmes23-Sep-14 16:57 
GeneralRe: Protect my sql server database Pin
Richard Deeming24-Sep-14 1:27
mveRichard Deeming24-Sep-14 1:27 
AnswerRe: Protect my sql server database Pin
Eddy Vluggen23-Sep-14 21:10
professionalEddy Vluggen23-Sep-14 21:10 
GeneralRe: Protect my sql server database Pin
dilkonika24-Sep-14 3:13
dilkonika24-Sep-14 3:13 
GeneralRe: Protect my sql server database Pin
Eddy Vluggen24-Sep-14 6:21
professionalEddy Vluggen24-Sep-14 6:21 
GeneralRe: Protect my sql server database Pin
dilkonika24-Sep-14 13:30
dilkonika24-Sep-14 13:30 
GeneralRe: Protect my sql server database Pin
Eddy Vluggen25-Sep-14 1:53
professionalEddy Vluggen25-Sep-14 1:53 
AnswerRe: Protect my sql server database Pin
Corporal Agarn24-Sep-14 4:33
professionalCorporal Agarn24-Sep-14 4:33 
GeneralRe: Protect my sql server database Pin
dilkonika24-Sep-14 6:18
dilkonika24-Sep-14 6:18 
AnswerRe: Protect my sql server database Pin
data modeling guy29-Sep-14 6:58
data modeling guy29-Sep-14 6:58 
AnswerRe: Protect my sql server database Pin
Wendelius30-Sep-14 8:59
mentorWendelius30-Sep-14 8:59 

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.