Solved

running my query from SharePoint returning wrong data

Posted on 2011-03-05
17
930 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Office 365 Training for IT Pros

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

 
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
 
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
A recent project that involved parsing Tableau Desktop and Server log files to extract reusable user queries for use in other systems. I chose to use PowerShell to gather the data, and SharePoint to present it...
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…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

752 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