Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 949
  • Last Modified:

running my query from SharePoint returning wrong data

Dear all
I did create a new Query inside iteration 1 in my VS2010.
I added this query into SharePoint.
I found that the data returned when running this query inside the VS is correct, but when running the same query from SharePoint is not correct in the Created Date Field
Please advice as it is very important.
thanks
0
RamzyNEbeid
Asked:
RamzyNEbeid
  • 11
  • 6
2 Solutions
 
psv1973Commented:
Can you post the actual query/code? It's very difficult to give a reason for a problem wihtout the details ;-)
0
 
RamzyNEbeidAuthor Commented:
I created a new query from Visual Studio under Team Quires

And then add this query to SharePoint web part .

I want you to know that when I run the query inside VS 2010 the results are right, and when I run it from SharePoint I got wrong data in the Created Date field.

My current version of TFS is: 10.0.30319.317 (RTM KB2135068)

please find attached image

Thanks,

TFS-Query.jpg
0
 
psv1973Commented:
My first guess would be that within SharePointyou're running as a different user. Which user is running your VS2010 and whcih user is running your SharePoint?
0
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 
psv1973Commented:
To further exaplintheMe part of your query would chnage when you run under a different user.
0
 
RamzyNEbeidAuthor Commented:
no i am running VS and Sharepoint from the Same Machine
i am the same user.
0
 
psv1973Commented:
What are the results that you are getting within SharePoint? No results at all? Can you get a screenshot of that as well?

When you step through the code by running into debug mode does the query return anything?

Can you post the code that you're running in SharePoint?
0
 
RamzyNEbeidAuthor Commented:
i am not running any code at all.
i didnt do anything.

thanks
TFS-Query-from-Sharepoint.jpg
0
 
RamzyNEbeidAuthor Commented:
the sharepoint i am using is the one installed with the TFS on the same Server.
0
 
psv1973Commented:
Where did you get that project dash board from? I don;t think that that is standard out of the box SharePoint 2007? It looks like that recent tasks web part isn't showing the recent tasks. While it's porbably limited to show only 4 items or something like that.
0
 
RamzyNEbeidAuthor Commented:
0
 
psv1973Commented:
Ah Ok, i think I now undertsand the problem.

one query returns all tasks the other query only returns the top level tasks. I just noticed that there are 4 top level tasks. The linked items (LinkType=Child) aren't given on your dashboard.
0
 
RamzyNEbeidAuthor Commented:
If you take a look at “TFS Query Final” and “TFS-Query-from-Sharepoint” you will see that “TFS Query Final” from VS2010 returns “Created By” Field “03/04/2011 and 03/05/2011”
Mean while if take a look as “TFS-Query-from-Sharepoint” you will find that the “Created By” Field “03/03/2011 and 03/04/2011”
Which is very strange.
Please advice
0
 
RamzyNEbeidAuthor Commented:
please remove this comment 03/07/11 06:08 AM, ID: 35056740 from your calculations

only use the last ones i sent to you
0
 
RamzyNEbeidAuthor Commented:
use this one:
03/08/11 03:00 AM, ID: 35068269 - TFS Query Final
03/08/11 02:54 AM, ID: 35068237 - TFS-Query-from-Sharepoint
0
 
RamzyNEbeidAuthor Commented:
please i need your reply
0
 
RamzyNEbeidAuthor Commented:
i fix the problem it was related to Sharepoint Time zone
0
 
RamzyNEbeidAuthor Commented:
it was related to Sharepoint Time zone
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 11
  • 6
Tackle projects and never again get stuck behind a technical roadblock.
Join Now