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

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Query XML web service from SQL

Posted By:      Posted Date: August 28, 2010    Points: 0   Category :Sql Server
How can I run this (url)  xml query from SQL 2005 or 2008 and store result in xml variable? http://ws.geonames.org/countryCode?lat=40.417&lng=-3.703&type=xml    

View Complete Post

More Related Resource Links

SQL Reporting Service 2005 - share schedule report performace T-SQL query?

Hi, I have SQL 2005 reporting services Shared Schedules and each schedule has its own subscribed report. I would like to have T-SQL 2005 to find out performance loading on each schedule. i.e. MySchedule_1 has 10 reports in it and AVEGARE report eaxecutiontime is like 3mins 5sec      MySchedule_2 has 7 reports in it and AVEGARE report eaxecutiontime is like 4mins 9sec Pls can I have T-SQL 2005 on ReportServer database to find out load on each schedules (and more drill-down to each report level for execution time)?

How to query for id's of the fields with List Data Retrival Services Query() web service

Since i marked a post as answer in my previous topic, it seems that people dont visit the topic anymore as they see it as "answered" while it actually is only partially answered. So i guess i have to ask again in a different topic.    I need to get data from Sharepoint Server (3.0 i belive) for my Integration Services project. For that i use Sharepoint's webservices. I've read tutorials and downloaded sample programs to talk to WSS web services. I realise i have two ways to get items in a list: Use Query() or GetListItems(). Problem is, GetListItems() has a mandatory "Row limit" field and i might have to import ALOT of fields, so i thought Query() is better for me.  But, when using GetListItems(), the WSS returns the ID of the fields (for example, for a field of type user, something like "395;Ivanov Ivan Ivanovich" is returned) but when using Query() for the same list, WSS returns only the field value ("Ivanov Ivan Ivanovich") without the ID. I need it to return the ID as well. How can i set it up, on my side or server side, so i would receive the ID's, not only the values of the fields that are actually linking to something by ID when i use Query() web service?     

T-SQL 2005 query for Group BY and not GROUP in same query for SQL reporting service use purpose?

Hi, I have SQL 2005 table like bellow @OrderTable I want to display all row data and GROUP BY data as well for SQL Reporting Service Matrix purpose...   declare @OrderTable TABLE (OrderID varchar(10),OrderType varchar(20),OrderValue decimal(10,2),OrderDate DateTime) INSERT INTO @OrderTable VALUES('P06','O1',25.22,'2010-01-24') INSERT INTO @OrderTable VALUES('P06','O2',105.48,'2010-06-12') INSERT INTO @OrderTable VALUES('P07','O3',555.00,'2010-06-09') INSERT INTO @OrderTable VALUES('P08','O1',10.22,'2010-06-12') INSERT INTO @OrderTable VALUES('P06','O1',55.66,'2010-03-17') INSERT INTO @OrderTable VALUES('P06','O1',45.44,'2010-03-17') INSERT INTO @OrderTable VALUES('P07','O3',477.81,'2010-03-18') INSERT INTO @OrderTable VALUES('P07','O3',78.85,'2010-03-18') INSERT INTO @OrderTable VALUES('P06','O1',78.08,'2010-04-09') INSERT INTO @OrderTable VALUES('P07','O2',899.90,'2010-04-22') INSERT INTO @OrderTable VALUES('P08','O3',25.33,'2010-01-24') INSERT INTO @OrderTable VALUES('P08','O3',859.01,'2010-01-24') INSERT INTO @OrderTable VALUES('P08','O3',7433.89,'2010-01-24') INSERT INTO @OrderTable VALUES('P08','O1',1005.41,'2010-06-12') INSERT INTO @OrderTable VALUES('P06','O2',455.20,'2010-06-09') INSERT INTO @OrderTable VALUES('P07','O3',85.30,'2010-06-12') INSERT INTO @OrderTable VALUES

Analysis Service Oracle Number inconsistent Data Type for TABLE or Named Query

Dear Gurus, I'd VERY OLD PROBLEM. And I believe it addressed since 2006. When I design DataSource Views from Oracle Data Source. I found it return different oracle number data type for TABLE or NAMED QUERY   Provider Data Type Column Data Type Data Source View Data Type Oracle OLE DB Provider (OraOLEDB.Oracle.1) Table Number System.Int64   View Number System.Decimal   Named Querey Number System.Decimal Microsoft OLE DB Provider for Oracle (MSDAORA.1) Table Number System.Double   View Number System.Double   Named Query   1 System.Int64   Named Query   1.1234 System.Int64 Althought I know I can fix IT via MANUALLY EDIT DATASOURCE VIEW XML SOURCE. But I don't think this is a better solution. Is anybody have ideas ?  Wilson

syntax problem passing parameter into Indexing Service Query

Hi everyone, I have the following query which works fine: select OriginalFileName from Document_Entries where EntryType like 'File%' and substring(entry,charindex('file_',entry),LEN(entry)) in (  SELECT filename FROM OPENQUERY(MySearchCat, 'SELECT Directory, FileName FROM SCOPE() WHERE    CONTAINS('' "green" '') ') )  It finds all documents in the document system which contain the word "green" using the index catalog.  My problem is that i need to include this query in a larger stored procedure which accepts a parameter for key words amongst others. I can't work out the syntax to get the @keywords parameter into query. The closest I've come is the following which runs but comes back with "incorrect syntax near keyword 'green'".  The @keywords parameter will contain any key words the user enters.   declare @keywords nvarchar(500) set @keywords='green'   Declare @query nvarchar(max) set @query = ' select OriginalFileName from Document_Entries where EntryType like ''File%'' and substring(entry,charindex(''file_'',entry),LEN(entry)) in (  SELECT filename FROM OPENQUERY(MySearchCat, ''SELECT Directory, FileName FROM SCOPE() WHERE    CONTAINS(''' + @keywords + ''') '')     )  )' exec(@query)   Any ideas? thanks Gus

search service application:Query component error


I tried to create a new query component using powershell commands

PS C:****> $ssa = Get-SPEnterpriseSearchServiceApplication
PS C:****> $qtOld = $ssa | Get-SPEnterpriseSearchQueryTopology -Active
PS C:****> $ssInstance = Get-SPEnterpriseSearchServiceInstance -Local
PS C:****> $qtNew = $ssa | New-SPEnterpriseSearchQueryTopology -Partiti
ons 1
PS C:****> $idxPartition = (Get-SPEnterpriseSearchIndexPartition -Query
Topology $qtOld)
PS C:****> $queryComponent = New-SPEnterpriseSearchQuerycomponent -Quer
yTopology $qtNew -IndexPartition $idxPartition -SearchServiceInstance $ssInstanc


and I am getting the following error:

New-SPEnterpriseSearchQueryComponent : Query component can be created only for
partition from the same topology.
At line:1 char:55
+ $queryComponent = New-SPEnterpriseSearchQuerycomponent <<<<  -QueryTopology $
qtNew -IndexPartition $idxPartition -SearchServiceInstance $ssInstance
    + CategoryInfo          : InvalidData: (Microsoft.Offic...hQueryComponent:

Search service application - Query component


In my search service application the 'query component' is stuck on the 'initialzing' status.So I googled to fix that error and found an article.


below the heading search fix.But I have some doubts regarding that.


In that post it has mentioned about the 'SetupEnterpriseSearch.ps1' and the configuration file 'searchconfig.xml'.

As mentioned in the first step of that article : How can i load the SetupEnterpriseSearch.ps1 to the powershell and what all things I need to change inside that file.Can anyone please explain that in detail.

In the second step : Execute “Start-EnterpriseSearch “<path> \searchconfig.xml”" what is the path that need to be specified and what all things have to be changed inside that config file.

Please help .Thanks in advance.


Query Web Service (FAST FQL) does not deliver the node RefinementResult (or QueryEx vs. Query)?


Hi *,

Looking for some clarification on this topic:

We are using the Query Web Service (search.asmx) from a web part and the web part send FQL formatted queries to the service. (e.g. <QueryText language="en-US" type="FQL">...). I f we execute the query with the method "QueryEx" (this returns a data set) we are able to find a node "<RefinementResults>" in the query result. This node is missing if we are executing the same FQL with the method "Query" (this returns xml) instead of "QueryEx". Is it possible to get this refinement result information also in the result by using the xml based answer? The xml returned by "Query" is much more appreciated as this contains more relevant details for our usage in the application.

Thanks in advance!

List query in ASP.NET app using REST service


I cannot get this to work.  Getting an exception that provides no information.  I want to use an external ASP.NET app to query a single list in SP2010 using C# and the REST service listdata.svc, and bind the data to a gridview control.  Here's the code I have that does not work:

MySiteDataContext context = new MySiteDataContext(new Uri("http://mydevserver:1000/_vti_bin/listdata.svc"));
context.Credentials = new NetworkCredential("xxxx", "xxxx", "xxxx");

//the list name is actually Source
List<SourceItem> allSourceItems = context.Source.ToList();
var sourceItems = from c in allSourceItems
              select new {c.Id, c.Title };
GridView1.DataSource = sourceItems;

I already know the service works.  I can see the data in my browser when I go directly to the service

search query and site settings service



when trying to start search query and site settings service facing the following error some or all identity references couldnot be translated.

thanks in advance.

Thanks & Regards, Sruthi

Passing credentials to run query web service with integrated security

Dear, I want to publish a web service that I perform a query to a db, the problem is that access to the database with integra

OR logic bugs in search service SQL-like query?


Not 100% sure this has nothing to do with environment, but it seems there is a bug in the implementation of OR logic in Where clause of search service, that it does not try to find all the matching records but returns as long as some of the criteria are satisfied. For example, a query like the following:

Select Title, Path, JobTitle, WorkEmail, Stream, Department, Section, WorkPhone, MobilePhone, PictureUrl, Responsibilities, Skills, Languages FROM scope()
WHERE "SCOPE" = 'People' and (
     FirstName like '%glen%' or LastName like '%glen%' or Department like '%glen%' or Section like '%glen%'
 or skills like '%css%'
returns records matching skills having css but not the first 4, ie firstname, lastname, etc. However, moving the bracket from the end to after Section, ie.

WHERE "SCOPE" = 'People' and (FirstName like '%glen%' or LastName like '%glen%' or Department like '%glen%' or Section like '%glen%')
 or skills like '%css%'

returns expected results in this case. However adding more criteria in the OR clause breaks it again.

As OR should be orderless, I think that must be flawed somewhere. Some people might question LIKE with null values, but my experiments showed this was not the case. My guess is that SharePoint search is not accurate in de

Windows Service Applications Tutorials

You can easily create services by creating an application that is installed as a service. For example, suppose you want to monitor performance counter data and react to threshold values. You could write a Windows Service application that listens to the performance counter data, deploy the application, and begin collecting and analyzing data.

MS SQL Server: Search All Tables, Columns & Rows For Data or Keyword Query

If you need to search your entire database for specific data, this query will come in handy.

So when a client needs a custom report or some sort of custom development using Great Plains, most of the time I will have to track down the data in the system by running this query and find the table(s) it is in.

WCF Tip: Using Properties in Service Contracts

you'll notice all of the Service Contracts are implemented with interfaces containing only methods. For the longest time I thought that's all that was supported, until I thought about it a little more. In C# land, properties are simply wrappers around a get method and set method, so why wouldn't we be able to use properties in a service contract? Well the answer is we can.

Realizing a Service-Oriented Architecture with .NET

This article is meant to be a practical discussion guide to building a .NET application in a service-oriented architecture. We will consider real-world goals, real-world obstacles, and experience-based solutions. I quickly concede the approaches discussed here are not exhaustive or infallible. This paper is focused on application development, not application integration. We will specifically consider architectural issues and component design issues.

The Potential of Web Services

How to Encrypt Query String Parameters in ASP.NET

Encrypt Query String Parameters in ASP.NET.u can send secure data one page another page u can also use query string to encrypt
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

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