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

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

How to read a xml attribute value in SQL Server

Posted By:      Posted Date: April 10, 2011    Points: 0   Category :


I have a table named 'stduent' which contains xml data as below.

ID         xml

1          <Result   Overall Status="PASSED"  Grade="A">.....


I want to write a query to get the 'Overall Status' attribute value for each row of the column. Can any one help me out ?






- naveen.reddy

View Complete Post

More Related Resource Links

I am not able to read xml file with XDocument if its Descendants has Attribute xmlns="http://abc.co


I am not able to read xml file with XDocument if its Descendants has  Attribute like:-

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
  <row ID="1" xmlns="http://www.opentravela.org/OTA/2003/05">
    <var country_name="Caribbean and Rest of the world" city_name="Kingston" flight_category="Economy Class" via="Atlanta" flight_departure="London Heathrow" airline_logo="Delta" adult_fare="Delta" child_fare="660" infant_fare="561" date1="132" date2="2010-08-15" />


I don't know what to do ?

Looking for some help..

"Content for this URL is excluded by the server because a no-index attribute." in crawl logs


Hi All,

I am getting following error message in Crawl Logs

" Content for this URL is excluded by the server because a no-index attribute. "

Any help in this regard will be greatly appreciated.



why runat="server" attribute is required for ajaxcontroltoolkit controls?

the doubts i have may looks silly,i started my carrier in dotnet recently,1)we are calling them as client side controls,then what is the need for runat server attribute?2)<asp:Button ID="Button1" runat="server" Text="Button" /> <asp:ConfirmButtonExtender ID="Button1_ConfirmButtonExtender" runat="server"              ConfirmText="Really?" Enabled="True" TargetControlID="Button1">  </asp:ConfirmButtonExtender>when i execute the above code,i observed that in status bar message as "connecting to localhost",if they are client side controls what  is the need of going to local server,why it is happening?Thanks in advance.

read string and lable value from sql server by class

hi,i want to create multi language cms project,i don't like use resourse component visual studio.please help me to create class for resourcestring and use for lable and string value.and cms user can add new language by xml and webform anybody help to me

Read a text file on another server from a web page

How do I read/write a text file on another server from a web page. I get the error "Access to the path '//Server2/mydatafiles/test.txt' is denied". I do not get the error if I am running the browser on the server where the files exist. I think I need to set permissions on the destination server in some way.   Can you help? Thanks  

how to read a custom dynamic data meta data attribute in a field template

All --Please help.I need to know how to read a custom dynamic data meta data attribute in a field template.I know how to do it in a page template because I have a handle to the meta table on the page.However, I do not know how to get a handle to the meta column at run time in a field template.Can you help?Please advise.Thank you.-- Mark Kamoski

Help!!! Validate data in server (business tier) using Attribute

I want to use somthing like Attribute to validate datapublic class MyClass { [Required] [StringLength(64,MinimumLength=3)] public string name; [Required] [StringLength(10, MinimumLength = 3)] public string code; } And in the code i want to check the myClass object is valid or not using something like:MyClass myClass = new MyClass("smith","aa") if(ValidAttribute(myClass)) { //do some thing here } So, anybody can show my the way to do something like i wrote.Many thank!!!

How to read Metadata of Files In Windows Server 2008 Machine x64?



I want to read metadata like (Author,Modified By, comments..etc) on OLE Files. Please tell me any reliable approach using C# on how to read metadata from File System which is running Windows Server 2008 machine x64 Environment .

Thanks in advance.

Devi Prasad M

attribute to theme server control according to arbitrary type


I have a server control that inherits from System.Web.UI.Button, say MyNamespace.SpecialButton.  I want the theme engine to treat all instances of SpecialButton as instances of System.Web.UI.Button.  Some time ago, I was able to achieve this in another project by decorating a server control with attributes in such a way that the control would be treated as another type by the theme engine.  Unfortunately for me, I've forgotten how to do that, and I'm unable now to find any reference to that method in searches.

Can anyone help with this?

ADO Recordset server-side forward-only, read-only cursor asynchronously cache all records?


We are using ADO, and currently create our recordsets using adUseClient and adOpenStatic since that way we can guarantee all the results will be loaded from the server and cached into the client memory without holding locks open on the server. 

However there are great performance benefits to adUseServer and adOpenForwardOnly! I have tried using adAsyncFetch and adAsyncExecute to load things in the background when necessary.

Unfortunately the trouble is that despite the value that I've set the CacheSize to, when the recordset is opened it does not load all of the records into memory. This is a concern since some operations on each record in the client application may take a while or even block waiting on user input. While this occurs, this holds locks on the tables in SQL Server until we read through all the records.

I have tried setting CacheSize to see if it would load everything all at once, but to no avail.

Since all the pieces seem to be here, I don't quite understand why the server-side cursor can't simply load everything into memory in the background the same way the (static) client-side cursor does.

I've tried some of the recordset's dynamic properties (like Maximum Open Records, which is readonly) to no avail either.

I know ADO is a bit dated now, but I would be overjoyed if anyone could guide me to a solution

Content for this URL is excluded by the server because a no-index attribute.



Can't seem to find where this attribute is set:


Content for this URL is excluded by the server because a no-index attribute.


This is the warning in the crawl log for an entire subsite.



Making the sql server Table read only Error


Hi all ,

Iam want to create the Table Read only User or Admin can not Modify its contents i tried the below but with this we cant update the record but we can Delete the table record .


use TestDB

    somedata    varchar(40) not null

INSERT mytable ( somedata ) VALUES( 'XYZ' )
INSERT mytable ( somedata ) VALUES( 'ABC' )
INSERT mytable ( somedata ) VALUES( 'WXY')
INSERT mytable ( somedata ) VALUES( 'Microsoft')

SELECT * from mytable
-- add a check constraint to make it read only

// Update mytable set somedata ='India' where somedata ='XYZ'

By updating the table record iam getting the error but when iam going to Delete the record 

Delete from mytable where somedata = 'XYZ'

//Easily deleted the record without any error


Give me the idea how i make the table read only ???

Best Regards 


Visual Studio automatically adds the ID attribute to controls that are runat="server"


When I copy/paste a control, Visual Studio automatically adds the ID attribute to controls that are runat="server".

Is there a way to disable this?

SMO: SQL Server 2008, SP2: Attribute Database.ActiveConnections is still wrong!


When retrieving databases with SMO from a server, Database.ActiveConnections is still 1, after Database.Refresh() the value  is reset to 0.

But one value is always > 0 ???

Code looks like follows (taken from SQL Server samples ManageDatabases ..)


                foreach (Database db in Server.Databases)


                    if (db.IsSystemObject == false && db.IsAccessible == true)



                            = DatabasesListView.Items.Add(db.Name);

                        if ((db.Status & DatabaseStatus.Normal)

                            == DatabaseStatus.Normal)



Read XML Attribute and Elements



I have XMl File With Structure is

  <TaskRecord TaskID='8100'  UserID='1' TaskName='Task' TaskDescription='TaskDesc' TaskDate='17-05-2011' TaskTime='11:27'>

Easy way to read data from an excel sheet using Sql Server

Using this code sample you can easily read the data from the Excel spread sheet into your database table. For code sample please click on the "View Complete Post"
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