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
RamzyNEbeidAsked:
Who is Participating?
 
RamzyNEbeidConnect With a Mentor Author Commented:
i fix the problem it was related to Sharepoint Time zone
0
 
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
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 
psv1973Connect With a Mentor Commented:
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
 
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:
it was related to Sharepoint Time zone
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.