.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Interview Question >> SharePoint >> Post New Question Subscribe to Interview Questions

How can you force SPQuery to return results from all the folders of
the list?

Posted By :Sagar Pardeshi     Posted Date :December 10, 2013    Points :40   Category :SharePoint 
If you want to get results from all the folders in the list.. then you need to specify the scope of the query
by the use of ViewAttributes.

e.g. query.ViewAttributes = "Scope=\"Recursive\"";

You can also find related Interview Question to How can you force SPQuery to return results from all the folders of the list?  below: 

Q. What is query.ViewAttributes OR How can you force SPQuery to return results from all the folders of
the list?

  
If you use SPQuery on any SPlist .. it will bring back results from the current folder only.
If you want to get results from all the folders in the list.. then you need to specify the scope of the query
by the use of ViewAttributes..
e.g. query.ViewAttributes = "Scope=\"Recursive\""; (More...)

How do you return SharePoint List items using SharePoint web services?

  
In order to retrieve list items from a SharePoint list through Web Services, you should use the lists.asmx web service by establishing a web reference in Visual Studio. The lists.asmx exposes the GetListItems method, which will allow the return of the full content of the list in an XML node. It will take parameters like the GUID of the name of the list you are querying against, the GUID of the view you are going to query, etc.
Side Question: I got asked how I built queries with the lists.asmx web service. In order to build queries with this service, one of the parameters that the GetListItems method exposes is the option to build a CAML query. There are other ways to do this as well, but that was how I answered it. (More...)

How do you return SharePoint List items using SharePoint web services?

  
Ans.
In order to retrieve list items from a SharePoint list through Web Services, you should use the lists.asmx web service by establishing a web reference in Visual Studio. The lists.asmx exposes the GetListItems method, which will allow the return of the full content of the list in an XML node. It will take parameters like the GUID of the name of the list you are querying against, the GUID of the view you are going to query, etc. (More...)

What is return type of Executenonquery() ?

  
int will be returned when you call ExecuteNonQuery() in ADO.NET (More...)

List out the areas in which data structures are applied extensively?

  
1.Compiler Design,
2.Operating System,
3.Database Management System,
4.Statistical analysis package,
5.Numerical Analysis,
6.Graphics,
7.Artificial Intelligence,
8.Simulation (More...)

If you are using C language to implement the heterogeneous linked list, what pointer type will you use?

  
The heterogeneous linked list contains different data types in its nodes and we need a link, pointer to connect them. It is not possible to use ordinary pointers for this. So we go for void pointer. Void pointer is capable of storing pointer to any type as it is a generic pointer type. (More...)

List the Coffman's conditions that lead to a deadlock.

  
1. Mutual Exclusion: Only one process may use a critical resource at a time.

2. Hold & Wait: A process may be allocated some resources while waiting for others.

3. No Pre-emption: No resource can be forcible removed from a process holding it.

4. Circular Wait: A closed chain of processes exist such that each process holds at least one resource needed by another process in the chain. (More...)

Can we force garbage collector to run?

  
System.GC.Collect() forces garbage collector to run. This is not recommended but can be used if situations arise. (More...)

List the types of Authentication supported by ASP.NET.

  
Windows (default)
Forms
Passport
None (Security disabled) (More...)

List the various stages of Page-Load lifecycle.

  
o Init()
o Load()
o PreRender()
o Unload() (More...)

List the event handlers that can be included in Global.asax?

  
o Application start and end event handlers
o Session start and end event handlers
o Per-request event handlers
o Non-deterministic event handlers (More...)

How to find data with generics list in VB.NET (Write code).

  
In the code example below, the function "FindData" will return list("sublist") of the objects having matchingKey same as viewstate value.
Dim sublist As List(Of MyClass)
sublist = allClient.FindAll(AddressOf FindData) 'sublist will contain objects matching specified matching condition

Function FindData(ByVal b As MyClass) _
As Boolean
If (b.matchingKey = CInt(ViewState("matchingKey "))) Then 'matching condition
Return True
Else
Return False
End If
End Function (More...)

How to deal with return value of stored procedure when you are using DataReader ?

  
To deal with such scenario, you can find "ParameterDirection.ReturnValue" in .net
You can use this parameter direction to read the return value of the stored procedure.

Following example can make it more clearer.
In case, you have following or similar type of return statement somewhere in your stored procedure.
Return -999
To read this value, following code works,

Dim result As Integer = 0
Dim retValParam As New SqlClient.SqlParameter("@RETURN_VALUE", SqlDbType.Int)
retValParam.Direction = ParameterDirection.ReturnValue
dbCommand.Parameters.Add(retValParam)
database.ExecuteNonQuery(dbCommand)
result = retValParam.Value ' here the result must contain the returned value. In this case, it will be -999 (More...)

Quick Links For Interview Questions Categories:
ASP.Net Windows Application   .NET Framework   C#   VB.Net   ADO.Net  
Sql Server   SharePoint   Silverlight   OOPs   JQuery   JavaScript/VBScript
Biztalk Patten/Practices .IIS WCF WPF WWF
Networking Aptitude Others   All      

Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.

 
Now you can find lots of .NET, C#, Vb.Net, SQL Server,Windows, ASP.Net related Questions and their Answers here at www.dotnetspark.com. Our aim is to help you pass your certification Exams (MCP, MCSD, MCAD etc.,) with flying scores and get good name in your company.

So, Start looking our Interview Question section daily and improve your .NET Skills. You can also help others by posting Interview Questions and their Answers in this section.


Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend