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


Top 5 Contributors of the Month
Easy Web
Imran Ghani
Post New Web Links

Retrieve values of all instances of a node

Posted By:      Posted Date: December 04, 2010    Points: 0   Category :Sql Server
 

Suppose i have xml variable with value,
DECLARE @t xml
SET @t = '<root><ID>1</ID><ID>2</ID><ID>3</ID></root>'
I want to fetch values of node ID into a resultset like,
ID
-----
1
2
3

how can i achieve this?

Thanks in advance!!

 




View Complete Post


More Related Resource Links

How to store and retrieve multiple values in a single session variable .

  

I want to store employee name,designation and department in session variable and
retrieve in another page how to do this.


Node probability distibution - values don't sum to 1?

  
Hi, I am using sequence clustering algorithm and I have checked Node probability distribution (state transition) for one of the cluster. Probability values don't sum to 1. Why? I think they should. Do I miss something?

Cannot retrieve values of dynamically generated controls

  
Hi All, I am creating a user control which contains checkboxes and labels that needs to be created on fly. The dynamic generation of these controls depend on the values retreived from a SPlist. I have several panels that display items queried from the list on the basis of a selection criteria. On a button click event I need to capture all the selected values from the controls that were generated dynamically.  When I traverse each dynamic control that I added to the panel, I dont see their values. I tried using recursive retrieval of the control from the page as well but it just behaves crazy, it treats a radio button as a checkbox and returns a value that I am not looking for. I am not using the the page_load() or any other event, I use the button handler on my custom method. I was thinking for ViewState, ControlsState or SessionState. I assume ViewState may not work on this as the dynamically generated controls need to be in the page_load event. Please guide as this getting way more complicated than what I had ever thought of it to be.

how to retrieve latest values from sql table

  

hi all.. i want to retrieve latest 10 values from my table,i use sql server 2000.. how can i query my database? pls help 


Reading inner node values of xml

  

I have an xml file in the below format.

<?xml version="1.0" encoding="utf-8"?>
<UITemplate>
<HTML>tr</HTML>
<HTML>td</HTML>
<HTML>div</HTML>
<Control ID="Title" Editable="true" UserControlName="Title.ascx"  Visible="true" Enabled="true" ></Control>
<HTML>/div</HTML>
<HTML>hr</HTML>
<HTML>div</HTML>
<Control ID="Edit"  Editable="true" UserControlName="Edit.ascx"  Visible="true" Enabled="true"></Control>
<HTML>/div</HTML>
<HTML>/td</HTML>
<HTML>/tr</HTML>
</UITemplate>

I need to loop through each element and get the value.

Using XmlTextReader iam able to do that but  If the tag name is <Control> then i need to get values for ID,Editable,UserControlName,Visible etc.. after that again read node values only  if the node is <Content> it should read all the attribute values for  that <Content>.

Please help me out


Determine node type selected in TreeView and reading property values

  

I am hoping that someone can help me get past some problems I am having when using the WPF TreeView control.  I have a TreeView that at most can have 3 levels.  The levels are defined as Project, Discipline, Person which would look like the following:

+ Project

    + Discipline

        - Person

My TreeView is bound to a database using two HierarchicalDataTemplate's and then one DataTemplate (the binding is done in the XAML).

What I would like to get is the following information when selecting an item:

  1. Read the selected value (text of the selected node)
  2. Crawl XML files and map node values to properties

      

    How can I crawl XML files and map node values to properties?

     

    For example I have a node called "PostedDate" and want to query all xml files with a specific posted date. Is this possible in MOSS out-of-the box? Do I have to write an extension in c#?

     

    Any help would be very appreciated !! Thanks.

     

    Michael


Unable to retrieve Lookup fields or item URL values from Library(Wiki Page Library) item when using

  

Hi,

When I execute, "l["Category"].ToString();" and the field is a lookup field it returns, "Microsoft.SharePoint.Client.FieldLookupValue[]", on the other hand when I execute "l["Description"].ToString();" which is a normal string field I get the string(multiline) value back, any idea what could be going on here? I have tried, static/internal/displayname all with the same result(lol moment,

How to retrieve list of values from an XML / Varchar(MAX) column along with main column?

  

Hi

I have a table with columns like ContactID, MainEmailAddress, OtherEmails  (as of type varchar(Max)). 
{At this point of project , cannot convert column to type XML}

Column OtherEmails may be either null  or may contain data in structure shown below.  

<bpDataSet xmlns="http://tempuri.org/bpDataSet.xsd">
  <XMLOtherEmails>
    <RowID>-1</RowID>
    <EmailType>1</EmailType>
    <EmailAddress>abc@abc.com</EmailAddress>
  </XMLOtherEmails>
  <XMLOtherEmails>
    <RowID>-2</RowID>
    <EmailType>3</EmailType>
    <EmailAddress>xyz@xyz.com</EmailAddress>
  </XMLOtherEmails>
</bpDataSet>

I want to write a SQL Query to retrieve data in following manner

CotnactID  MainEmailAddress   Others
       1        main@main.com     abc@abc.com
       1     

How to retrieve multiple values from session?

  

Hello ladies and gentlemens,

I want to pass multiple values to another page from my gridview.

For sending i got this codes : (writing same page selected values)

 For Each item As GridDataItem In RadGrid1.SelectedItems
                ' loop through each selected row
                ' get each cell value using ColumnUniqueName
                Dim name As String = item("ProductID").Text
                Label1.Text += (item("ProductID").Text + " ")

                Session("CheckedItems") = Label1.Text
                Response.Redirect("Cart.aspx")



Here is my question

How can i catch from another page this values?


Error while adding 3rd node to a cluster --- Failed to retrieve data for this request.

  

Inside a virtual environment running Windows 2008r2 Ent SP1 and SQL 2008r2 RTM.

Inintial cluster build has gone smoothly for a 2 node cluster using iSCSI. Added up a third node to this cluster manually changed quorum model and MsDTC resource was bouncing all well on the three nodes. Sweat started when the third node failed to add into SQL Failover cluster with the given message "Failed to retrieve data for this request" right after clicking add a node.

Sites talk about adding CuP6 and to lower the security but to note all this worked for first & when adding second node, for the moment this was resolved for me after I restarted all the nodes; going from Node3 to 1. For a moment RemoteRegistry service failed to start on node2 and it wount work even on restarts so moved every thing to node1 now the RPC was up on Node2 and I can go further on adding node3 to SQL cluster but as I'm typing it failed again.

As I check the logs they point about failures to write to registry and at time Network Path not found, User credentials used are all same and pings are going well for the entrire set of IP's I have.

Any insights on this are highly appreciated?


yup

How to Pass Values Between Web Pages ASP.NET

  
You can pass information between pages in various ways, some of which depend on how the redirection occurs. The following options are available even if the source page is in a different ASP.NET Web application from the target page, or if the source page is not an ASP.NET Web page:

Use a query string.

Get HTTP POST information from the source page.

The following options are available only when the source and target pages are in the same ASP.NET Web application.

Use session state.

Create public properties in the source page and access the property values in the target page.

Get control information in the target page from controls in the source page.

How to Pass Values Between ASP.NET Web Pages

  
You can pass information between pages in various ways, some of which depend on how the redirection occurs. The following options are available even if the source page is in a different ASP.NET Web application from the target page, or if the source page is not an ASP.NET Web page:

Use a query string.

Get HTTP POST information from the source page.

The following options are available only when the source and target pages are in the same ASP.NET Web application.

Use session state.

Create public properties in the source page and access the property values in the target page.

Get control information in the target page from controls in the source page.

jquery autocomplete multiple values

  

i got some samples and i did autocomplete using jquery , its working well for single input values

but i need to pass multiples values after one by one in the textbox. Is it possible to pass multiple

values in the textbox for autocomplete in jquery in asp.net?

 


Multiple Instances of User Control

  

I have a user control that I place on a page severl times.  When I make a selection on a ddl in one one control the SelectedIndexChanged event fires for all the control on the page for that ddl.  So I get duplication of an insert that I do.  Is there a way to make sure these events are isolated so this doesn't happen.

Thanks,


JQGrid Loading deleted values

  

Hi,

This is quite strange. here is the issue:

Some Info:

1. I'm using a multi-select jqgrid.

2. I have my own delete button to delete multiple orders

The problem:

When i press the delete button on the pager of my jqgrid, the records are deleted from the database but JqGrid shows some records (4-5). On refreshing the grid, correct numbers of records are shown.


Here is the code:


function delorder() {
        var amg = $("#horder").getGridParam('selarrrow');
        var cont = amg.length;
        if (amg.length > 0) {

How to cast integer values as an array of enum values?

  

Hello all!

I'm working with VS2010 Beta2, ASP.NET and Dynamic Data. I'm using VB but will certainly be happy to receive a C# example if necessary. Laughing

I used a few of Steve's examples (Writing Attributes and Extension Methods for Dynamic Data and Dynamic Data - Hiding Columns in selected PageTemplates) to create a custom property attribute to be applied to a dynamic data column and want it to accept an array of enum values (each value will represent a dynamic data page template where this column should not be displayed).  My new attribute works fine when I hardcode it like this, meaning the HideColumnIn attribute is properly populated with the array of enum values:

<HideColumnIn(PageTemplate.List, PageTemplate.Edit)> _
Public Property My_DD_Column As Object

 

However, I want to store the values to be used for the HideColumnIn in the DB as integer values that correspond to the

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