|
Thaks for the answer. It is working fine for the Program Files path. the strange thing is that it is not working for other folders that I am passing. Is only returning the folder path only, without any R or something else. And these folders have full permissions (Everyone has full permissions). Do you have an idea of what is going wrong?
Thanks
|
|
|
|
|
Sorry, my bad. The ATTRIB command returns the attributes of a file/folder. You don't want the attributes, but the effective permissions per user/windows account. These can be obtained in a similar fashion, using the CACLS command;
CACLS "C:\Program Files" Hope this helps
I are troll
|
|
|
|
|
Thanks very much. It realy works. Sry for bothering again but if I had to find only the permissions for the current user how could i modify that? only if possible? Thanks again
|
|
|
|
|
I'm afraid that's somewhat harder to do; the effective permissions aren't set for a user, but for different groups of people. That's one of the reasons why we don't check if we got permission to write to a folder, but simply write, relying on the exception-mechanism to warn when there's insufficient rights.
The only way of getting the permissions for the user, is checking whether he/she is a member of the groups that get listed. Your user may be a member of multiple groups, so that makes it somewhat more complex.
Your user can have read-access for a particular folder, based on the CREATOR OWNER group, but he/she might *also* have write permissions for *that same* folder if he/she's also a member of BUILTIN\Administrators.
That means three steps;
* Get the permissions for each group on a folder
* Check whether the user is part of that group
* Add all permissions, for each group that the user is a member of. That's the effective permission for the folder.
Good hunting
I are troll
|
|
|
|
|
Thanks again for your help. I will try to follow the steps that you have given me. thanks again thats already a great start.
|
|
|
|
|
Hi..
i am using sql server 2005 and i want to compare password field with the stiring i pass to stored procedure. like it should deny if 'Hemant' = 'hemant'
please suggest me
thanks
Hemant
By:
Hemant Thaker
|
|
|
|
|
A simple google for sql string compare casesensitive returned this[^].
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Hai All,
To take backup of a database I need to go to shell> prompt from mysql> how ca i move? I am using windowsXP OS?
Plese any body knows about this?
Ranjith
|
|
|
|
|
A Real Work at Home Opportunity as an Independent Advertising Executive. We offer home workers the opportunity to earn extra money from the comfort of their own home. Visit Us at http://www.clicknearn.net/idevaffiliate/idevaffiliate.php?id=2482_9
|
|
|
|
|
"Vote to remove"
I are troll
|
|
|
|
|
HI All, i wish begin to work about a feature new for me ,i'n my project i have a database( with SqlServer) and an application (developing in WPF) the purpose of this application is to manage/handle about Accountancy and others Departement,so i created a Passwords and Roles(for Users) to access in the application ,now i will create a system to knows how many Users are connected to the Application(via Database )and show that in a listBox(for example like a normal Chat Application i wish knows who is online and offline) but i don't know where i need begin to work out this feature ,i'm strange to this feature so if you have any suggestion,link and help i will appreciate so much your help.
Thanks so much.
P.S. if my question is not clear i will rewrite it...however sorry in anticipate
Best Regards Smile
|
|
|
|
|
That's a large and complex problem. I'd suggest breaking it apart into smaller problems, like;
* maintain a list of users in the database
* put a "marker" on those user-records who signed in, and removing it when they log out
* displaying a list of users who got the "I'm logged in" marker (who's online now-query)
* send a message to a user (what will you do if the user signs out before the message is delivered?)
* ..etc
Good luck
I are troll
|
|
|
|
|
I'd suggest you maintain a table of who log on/off your application and use this as the basis for your solution.
Every time someone logs on, add them to the table. Everytime the log off, remove them from the table.
You can then do a simple
select satement to get a list of all the logged on users and display that in a list box.
|
|
|
|
|
Thanks do much for you help,
now i try to put in action your advice hoping to work out this feature if i can't i will tell you about my error.
Have a happy work.
Nice Regards.
|
|
|
|
|
Hello,
I have two mysql database servers(primary and secondary).when primary is up all clients will connect to primary server,what ever the changes done in primary should refeclt in secondary and if primary in down all clients will connect to secondary server ,and these changes should reflect into primary if it become up.
In this situation which method I can use for syncronization fo database.
(I am using sqlyog tool but it's not working as per my requirement)
Please any body cal tell the solution for my problem.
ranjith.
|
|
|
|
|
Thanks in advance
How to install SQL server Named Instance , because during installations whenever i choose option of Named Instance and give name then it adds System name with this
like System\ServerInstance.
Can i install an instance with Name only without System Name like 'ServerInstance'
or can i rename existing instance
Best of regards,
Mirza Rahman
modified on Saturday, May 23, 2009 3:33 AM
|
|
|
|
|
An instance is ALWAYS identified by server\instance. The idea being to allow multiple instances on a single server. If you need a SERVER named something then rename the server and then install SQL server.
Why this is important to you is beyond me!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Thanks for the Post but Changing the Name of the Server will be quite expensive as other services have to re config
Actually I have to Audit a System in which the Developer has Hard coded the Server Name everywhere and in reporting etc , i know its wrong , to avoid changing the Name everywhere i want to rename instance to its Hard coded instance is there any way
Best Of Regards ,
Mirza Rahman
|
|
|
|
|
softdev_sup wrote: the Developer has Hard coded the Server Name
I presume you no longer have the developer .
I'm afraid you are in for a nasty bit of work, you can't change the server name , you can't format the instance to meet your needs.
I don't think aliases will meet your needs but you should investigate that, also look into linked servers.
If all else fails you will need to rewrite the code. DO NOT DO A SEARCH & REPLACE, this will only move the problem into the future for some other poor schmuck to deal with.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Thanks for the Post
i also used Alias , but is not there any other way to rename the Server Instance
No i have to audit the existing system , one of that flaws also includes this problem , he will fixed these bugs after wards , when we will submit our report to the client
any how thanks alot
Best of regards,
Mirza Rahman
|
|
|
|
|
Hi to All,
I know my subject doesn't say much...All i need to know...is there any method so that the primary key of a table maintains its value after deletion of records.
Eg: if the table has primary key from 1-10. Now if I delete the row 1....primary key starts from 2-10....next time I insert a new record, it shoul generate the primary key as 1.
I am using VB.NET2005 with Ms acceess2007
Thanks in advance
-----------------------------
I am a beginner
|
|
|
|
|
Why did you cross post - even if you apologised it is still rude.
See my response in the VB forum! - your still screwed
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
himangshuS wrote: next time I insert a new record, it shoul generate the primary key as 1.
Why should it?
A primary key's value should be meaningless, except for the purpose of maintaining a reference. If you really want a serial number without gaps, consider adding an int-column for this purpose.
I are troll
|
|
|
|
|
Hi,
How can I bypass an SQL Server 2005 TRIGGER with no potential concurrency issues? The trigger is executed ON UPDATE , where the table is updated by an ASP.Net web application... so there will be multiple users concurrently using this specific function.
So far I have found 3 possible solutions, but I don't know if there will be concurrency problems with these solutions.
1. Disable the trigger at the beginning of the update procedure, and enable it at the end <-- definitely has concurrency issues
2. Using CONTEXT_INFO() http://code.msdn.microsoft.com/SQLExamples/Wiki/View.aspx?title=AuditOrBypassTriggerExecution[^] <-- not sure about concurrency problems with this solution
3. Using a #tempTable http://www.mydatabasesupport.com/forums/sqlserver-programming/201598-ignoring-trigger.html[^] <-- see last post by Erland Sommarskog, not sure about concurrency problems with this solution
What do you think? Or are there other better solutions?
Thank you in advance.
Rafferty
|
|
|
|
|
I have to check on a couple of things and was thinking of creating about 200million dummy records. I had a for loop and an insert statement in mind. Is there a faster way of creating and inserting such a mass volume of data into a database?
|
|
|
|