For those new to message boards please try to follow a few simple rules when posting your question.
Choose the correct forum for your message. Posting a VB.NET question in the C++ forum will end in tears.
Be specific! Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with.
Keep the subject line brief, but descriptive. eg "File Serialization problem"
Keep the question as brief as possible. If you have to include code, include the smallest snippet of code you can.
Be careful when including code that you haven't made a typo. Typing mistakes can become the focal point instead of the actual question you asked.
Do not remove or empty a message if others have replied. Keep the thread intact and available for others to search and read. If your problem was answered then edit your message and add "[Solved]" to the subject line of the original post, and cast an approval vote to the one or several answers that really helped you.
If you are posting source code with your question, place it inside <pre></pre> tags. We advise you also check the "Encode "<" (and other HTML) characters when pasting" checkbox before pasting anything inside the PRE block, and make sure "Use HTML in this post" check box is checked.
Be courteous and DON'T SHOUT. Everyone here helps because they enjoy helping others, not because it's their job.
Please do not post links to your question into an unrelated forum such as the lounge. It will be deleted. Likewise, do not post the same question in more than one forum.
Do not be abusive, offensive, inappropriate or harass anyone on the boards. Doing so will get you kicked off and banned. Play nice.
If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.
No advertising or soliciting.
We reserve the right to move your posts to a more appropriate forum or to delete anything deemed inappropriate or illegal.
Could you help with XML select. Below is my xml however it won't select correct value.
DECLARE @input AS XML
SET @input =N'<?xml version="1.0" encoding="utf-16"?><NewDataSet><GroupID>111111</GroupID><GroupID>111111</GroupID><GroupID>999999</GroupID><GroupID>777777</GroupID></NewDataSet>'SELECT
Ppl.GroupID.value('(@GroupID)', 'VARCHAR(6)') AS'GroupID'FROM
@input.nodes('/NewDataSet/GroupID') as Ppl(GroupID)
as (select p.ID_Pelanggan
,casewhen p.Status_Pelanggan=2 then'Aktip'else'Non Aktip'end'Status'from PELANGGAN p),
as (select g.ID_Pelanggan
from GANTI_Log g)
from pel p leftouterjoin ganti g
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.
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
is it possible that more than one user can access the same record in this
Probably. Does not mean that it will be a problem.
There's a lot of stuff written on locking in SQL, with topics like lost updates[^] and dirty reads (no, not those magazines). You can add various hints[^] to the query. MSDN has dedicated a section[^] to consistency and concurrency.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
I have created an application that use a sql server database.
But the problem is that a user can open sql server management studio and can do anything that I don't like , for example :
1) Can modify values inside tables.
2) can delete records
3) Can see and can get my database structure.....
How can I protect my database , so that users can modify this database only inside my application , and can do anything outside my application ? I don't know does exist a way to protect my database with a password or.... ??? for example when I was using Access for database , i have protected Access files with a password , and after only my application can open this database .
Is possible to include a protection in the sql server database file ( so even the file is imported to another computer to remain protected ?
I have a specific situation :
My application is designated to manage several "office".
In my application folder , i have a empty backup file ( offline) of my database called "Model". And inside my application a user can create "A new office " and when he do this the application restore a copy of "Model" inside sql server with a specific name (for example "Office1". Another time the user can create another "Office" using again a copy of "Model"
So inside Sql server may be different databases ( all of them with the same structure ) like "Model"
So in this situation how can i Protect my databases and the "Model" .
Because i think i should apply a Protection" inside the offline backup file "Model" ( if it's possible , all the databases that have created from "Model" will have the protection ) or ??????
if you have read my case , what can I do with "Model" file that is offline ? Someone can get and restore to another PC.
I read somewhere about encrypting the database.
Is this true and how can be done.Can this be a help in my situation ?