Solved

running my query from SharePoint returning wrong data

Posted on 2011-03-05
17
919 Views
Last Modified: 2013-11-25
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
Comment
Question by:RamzyNEbeid
  • 11
  • 6
17 Comments
 
LVL 6

Expert Comment

by:psv1973
ID: 35055033
Can you post the actual query/code? It's very difficult to give a reason for a problem wihtout the details ;-)
0
 

Author Comment

by:RamzyNEbeid
ID: 35056740
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
 
LVL 6

Assisted Solution

by:psv1973
psv1973 earned 500 total points
ID: 35056761
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
 
LVL 6

Expert Comment

by:psv1973
ID: 35056766
To further exaplintheMe part of your query would chnage when you run under a different user.
0
 

Author Comment

by:RamzyNEbeid
ID: 35068189
no i am running VS and Sharepoint from the Same Machine
i am the same user.
0
 
LVL 6

Expert Comment

by:psv1973
ID: 35068208
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
 

Author Comment

by:RamzyNEbeid
ID: 35068237
i am not running any code at all.
i didnt do anything.

thanks
TFS-Query-from-Sharepoint.jpg
0
 

Author Comment

by:RamzyNEbeid
ID: 35068244
the sharepoint i am using is the one installed with the TFS on the same Server.
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 6

Expert Comment

by:psv1973
ID: 35068267
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
 

Author Comment

by:RamzyNEbeid
ID: 35068269
0
 
LVL 6

Expert Comment

by:psv1973
ID: 35068300
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
 

Author Comment

by:RamzyNEbeid
ID: 35068956
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
 

Author Comment

by:RamzyNEbeid
ID: 35068969
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
 

Author Comment

by:RamzyNEbeid
ID: 35068981
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
 

Author Comment

by:RamzyNEbeid
ID: 35093930
please i need your reply
0
 

Accepted Solution

by:
RamzyNEbeid earned 0 total points
ID: 35138430
i fix the problem it was related to Sharepoint Time zone
0
 

Author Closing Comment

by:RamzyNEbeid
ID: 35174519
it was related to Sharepoint Time zone
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Microsoft SharePoint Foundation 2010 and Microsoft SharePoint Server 2010 do not offer the option to configure the location of the SharePoint diagnostic trace log files during installation.  This can, however, be configured through Central Administr…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now