Solved

running my query from SharePoint returning wrong data

Posted on 2011-03-05
17
923 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

I used to be SharePoint evangelist in our company, so my Outlook always full of questions about how to do this, or where I can find that. One day I found such an email with the following question: "how to attach 3-State workflow (one of the workflow…
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.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
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…

803 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