Check for a directory using report services / c# / vb.net or T-SQL (Need help)

Who is online?  0 guests and 0 members
Home  »  Forums   »  microsoft business intelligence   »  reporting services   » Check for a directory using report services / c# / vb.net or T-SQL (Need help)

Check for a directory using report services / c# / vb.net or T-SQL (Need help)

Topic RSS Feed

Posts under the topic: Check for a directory using report services / c# / vb.net or T-SQL (Need help)

Posted: 10/5/2010

Padawan 150  points  Padawan
  • Joined on: 10/5/2010
  • Posts: 45

Hi, I am new in Report Services I am working on a project and I am stocked for couple of days and can’t find solution.  I just need to be able to check if a directory (based on user and it’s LDAP group) exist or not.  I have used T-SQL, used VB.NET code inside report properties and also used C# class library and none worked.

All will return 0 or false.  I will be happy to provide code for each one of these if needed. 

Any help greatly appreciated

 

Thank you

IA


Posted: 10/6/2010

Jedi Master 5644  points  Jedi Master
  • Joined on: 1/21/2010
  • Posts: 250
Answered  Answered

IA,

I figured a blog would be more suitable for answering this forum. So, I wrote one. :)  

http://www.bidn.com/blogs/briankmcdonald/bidn-blog/1143/determine-if-directory-exists-using-xp_cmdshell

Without knowing exactly how you are going to use this and your SQL Server configuration and setup, I personally would use this example inside of a stored procedure. Then call this stored procedure from your application or report.

I hope this helps,

Brian


Posted: 10/6/2010

Jedi Master 5644  points  Jedi Master
  • Joined on: 1/21/2010
  • Posts: 250
Answered  Answered

IA, Did this help you?


Posted: 10/6/2010

Padawan 150  points  Padawan
  • Joined on: 10/5/2010
  • Posts: 45
Answered  Answered

Hello Brian,

Thank you very much for your post and reply.  I found the problem and here what it was: the server’s computer object in Active Directory did not have permissions to the folder.  Once that object was given Read permissions, the SQL query was successful.

So my code queries and yours both works fine now.  I am writing a report (BIDS, SSRS) and based on a link I have to determine

1- who is the person lunching the report    (Done)

2- check to see if they are part of any of the specific (about 100) active directory group (Done)

3- determine if certain directory based on a oracle database table field exist in specific directory   (Now DoneLaughing)

4- create the report based on all above (In progress)

Again, thank you very much. 

IA.


Page 1 of 1 (4 items)