.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

Using OPENXML in SQL Server 2008 - Unable to get the data

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


I am trying to generate a table structure from the below XML schema:

 <User ID="ABC">
  <Question ID="1">
  <Question ID="2">
  <Question ID="3">
  <Question ID="4">
  <Question ID="5">

I can able to get the values under the ekements User and questions, but i am not able to get the values under the Answers elements. If i change Answer element as Attribute specific then i can get it. but i want to use the above schema only.

Can anybody help me out.

View Complete Post

More Related Resource Links

Unable to change autogrowth properties of SQL Server 2008 data and log files


I have used the GUI and the CLI to attempt to change SQL Server 2008 log file autogrowth property all to NO avail. In other words, there are NO error messages of any kind, indeed the CLI reports that the command completed successfully. But re-examining the database properties shows that NO change was effected.

For the CLI command, I have used the following with dots filled in for my database and logfile:


Why doesn't this work? How to make it work?


Under The Table: Spatial Data Support In SQL Server 2008


New spatial data support in SQL Server 2008 opens the door to mapping and querying geometric and geographic data, allowing you to build exciting new applications.

Bob Beauchemin

MSDN Magazine February 2009

Hierarchy ID: Model Your Data Hierarchies With SQL Server 2008


Here we explain how the new hierarchyID data type in SQL Server 2008 helps solve some of the problems in modeling and querying hierarchical information.

Kent Tegels

MSDN Magazine September 2008

Unable to install SQL Server 2008 Express R2 after installing .NET 4.0

Hi experts, I intend to redistribute SQL Server 2008 Express R2 in my installer. I've extracted the setup files from SQLEXPR32_x86.exe and pass in the appropriate command line parameters during the setup. Recently, I noticed if I applied the following Windows Update: .NET 4.0 Client Profile, I will hit into the following error when I installed SQL express. .NET Runtime 4.0 Error Reporting EventType clr20r3, P1 setup100.exe, P2 10.50.1600.1, P3 4bb67524, P4 mscorlib, P5, P6 4ba1da6f, P7 44f0, P8 32, P9 system.security.security, P10 NIL. .NET Runtime Application: setup100.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: System.Security.SecurityException Stack: at Microsoft.SqlServer.Chainer.Setup.Setup.DebugBreak() at Microsoft.SqlServer.Chainer.Setup.Setup.Main() Running the setup.exe from a file server will give these errors but if I copied the entire setup files to a local folder and run setup.exe from there, it runs fine. May I know what am I missing? I definitely need to support to install SQL express running from a file server location. Thanks, MK  

Unable to create Web Folders in Windows Server 2008 R2

Hi, We are unable to create web folder from a Windows Server 2008 R2 system as we do in Windows XP. The web url cannot be identified. The web url is an oracle repository application built in 32-bit OS and now we need this to be added in Windows Server 2008 R2 machine. Kindly help.  

SQL server 2008 r2 Data sync question???

Sql 2008 r2 data sync, does it involve a db hosted by microsoft or does that involve us hosting the sync functionality locally?  I know we have db's local that need to be sync'd across a wan but does that happen in a db hosted in the ms cloud or does that have to do with a sync functionality that runs locally to keep my db's sync'd?   Thanks, SL

data migrations from sql server 2000 to 2008

Hi,   Can any one please help me by giving some good links / tutorials  for migrating data from sql server 2000 to 2008 using SSIS     Thanks In Advance    Padmaja 

SQL server 2008 - Unable to tune a query with DTA

We are on:Verison: SQL 2008 [10.0.2531] on windows server 2008. Both are enterprise editions.When I highlight the query and right-click, then select Analyze Query in Database Engine Tuning Advisor, then click "Start Analysis",  I get the following error in the "Message" column of "Progress" tab of DTA: Cannot initialize tuning. [.Net SqlClient Data Provider] If I click on this, it displays this message: "Cannot find either column 'msdb' or the user-defined function or aggregate 'msdb.dbo.fn_DTA_unquote_dbname', or the name is ambiguous. Transaction count after EXECUTE indicates a mismatching number of BEGIN and COMMIT statements. Previous count=0, current count=1. (Microsoft SQL Server Error: 4121)Please let me know if you guys have any ideas on this error. Thanks,Sam. 

Import Excel data into SQL Server express 2008

I have recently installed SQL express 08 and created a table to import excel data into.  Im running on a windows 7 64 bit OS i5 processor.  I've disabled the firewall (temporarily) and will set the necessary ports once this is working. I run the following query:  (which i found from multiple sources on the net) Select   * From OPENROWSET ( 'Microsoft.Jet.OLEDB.4.0', 'Excel 8.0;Database=C:\Users\Public\lenovoBkup\contacts\outlookFiles\noib2a.xls', 'Select * From [sheet1$]' )  and receive the following message: Msg 7308, Level 16, State 1, Line 1                                                                                  OLE DB provider 'Microsoft.Jet.OLEDB.4.0' cannot be used for distributed queries because the provider is configured to run in single-threaded apartment mode.  (how did they know i was single and living in an apartment? lol) so after research of the following message i restarted the system and relaunched man

How to save Windows credentials to a data source in SQL Server Reporting Services 2008 using Visual

I am trying to create a shared data source for SQL Server Reporting Services 2008 that uses a specific Windows user ID and password to connect to the database. Using the Report Manager web interface, if I create a shared data source and specify "Credentials stored securely in the report server", I can check the "Use as Windows credentials when connecting to the data source" checkbox. This tells SSRS that the user ID and password I specify are from a Windows user, not a SQL Server user. I want to create the shared data source using Visual Studio though. In Visual Studio I have an option to use stored credentials but there is no equivalent of the "Use as Windows credentials when connecting to the data source" checkbox. SSRS always assumes that user and password are for a SQL Server user, not a Windows user, and thus the connection fails. Does anyone know how to tell Visual Studio that the stored credentials are for a Windows user?

Unable to connect SQL Server 2008

Hi, I have recently installed a trial copy of SQL Server 2008 from MS web but I am not able to connect to the SQL Database Engine locally using Windows Authentication. Whenever, I tried I got the following error message: "A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 53)" Just to inform you, I have OS Win7.  And I want to establish local connections only on my laptop.

SSMS 2008 Activity Monitor Activity Monitor is unable to execute queries against server (SQL Server

I get the following error when running SQL Server SSMS 2008 (32-bit) on my (Windows 7 64-bit) workstation against our SQL Server 2005 (32-bit) development server running Windows Server 2003 (32-bit): TITLE: Microsoft SQL Server Management Studio ------------------------------ The Activity Monitor is unable to execute queries against server <my server\instance name>. Activity Monitor for this instance will be placed into a paused state. Use the context menu in the overview pane to resume the Activity Monitor. ------------------------------ ADDITIONAL INFORMATION: Unable to find SQL Server process ID 2256 on server VTX-DEV-01 (Microsoft.SqlServer.Management.ResourceMonitoring)   I can expand the panes and all display data except Overview and Data File I/O. This is true for all instances on that server. The SSMS 2005 Activity Monitor (also on my workstation) works fine when connected to that server. I checked for the registry setting to disable the performance counters on both my machine and the server, and it was not there. I started the Performance Counter DLL Host on my machine, but that made no difference. I can see all Processor counters on the server from my local Performance Monitor. I ran "lodctr /R" on both systems, but that didn't help. The only SQL counters I see on the server (from my workstation) are SQLServer:SSIS Pipeline and SQLServer:SSIS

Getting error while retrieving data from sql server 2008 to infopath 2007 in sharepoint 2007

Hi, I have created an InfoPath form in InfoPath 2007. In this form I am getting data from SQL Server. To do this I have created data source for SQL Server 2008’s Tables. I have created 4 connections for 4 tables. When I am previewing this form from InfoPath Designer 2007, it is working. But when I am publishing this, it is giving me an error ‘Can not update content type’. If I skip this error then my form published but when I open this form from Share Point 2007. It gives me an error:   There has been an error while processing the form. Click Continue to resume filling out the form. You may want to check your form data for errors. Click Start Over to load a new copy of the form.   An error occurred accessing a data source. An entry has been added to the Windows event log of the server. Log ID: 6932 G. Goyal

Unable to start T-SQL debugging SQL Server 2008

I'm getting exactly the same problem described here: http://social.msdn.microsoft.com/Forums/en-US/sqltools/thread/dcc851e7-35d7-492a-b15c-7dffe47110ed --------------------------- Microsoft SQL Server Management Studio --------------------------- Unable to start T-SQL Debugging. Could not attach to SQL Server process on 'myserver'. Click Help for more information. --------------------------- OK   Help   --------------------------- I've followed advice with regards to Windows Firewall, however it's disabled on both client and server.  I've tried using a SQL Server account but haven't had any more success.  I've also checked the windows event logs on both the client and the server and can't find anything.. Lastly (not sure if this is useful or not) I tried attaching to the Ssms.exe process from Visual Studio 2008 and I get the following output when I try debugging:  ... C:\WINDOWS\assembly\GAC_MSIL\Microsoft.VisualStudio.CommonIDE\\Microsoft.VisualStudio.CommonIDE.dll: Cannot find or open the PDB file. C:\Program Files\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\Microsoft.DataWarehouse.VsIntegration.dll: Cannot find or open the PDB file. 'Ssms.exe': Loaded 'C:\Program Files\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\SQLDE.dll' First-chance exception at 0x7c812a6b in Ssms.exe: 0

Transforing the Data from Oracle to SQL Server 2008

Hi all I have to create a SSIS package which can Transfer the Data from Oracle to SQL Server 2008. Every time when packages run it will suppose to create tables in SQL Server Database. I guess it is possible with export and Import, but the privies tables suppose be deleting before or after dumping.   Suggest me best method to do this.     Thanks in advance     SNIVAS

Error adding connection in Server Explorer: "Unable to add data connection. ExecuteScalar requires a

I'm using Visual Studio 2008, and my database is SQL Server 2000. I want to add a connection to the Server Explorer in VS. The Data source is Microsoft SQL Server (SqlClient). After entering in all my information and I click Test Connection, it is successful. But when I click OK, I get the error: Unable to add data connection. ExecuteScalar requires an open and available connection. The connection's current state is closed.What's going on here?

SSRS 2008 - report manager: System.Net.WebException: Unable to connect to the remote server

I have an instance of Reporting Services 2008 running on Windows 2003 server.  So, the webservice URL is running on port 801, and runs fine (I can browse reports from that directory, and upload / deploy new reports and overwrite existing reports. Report manager is set to use port 800 (IIS is also on that machine running port 80).  When I attempt to connect to report manager, I get the following error, with a link to "Home" in report manager (which brings me back to the existing error page):    Unable to connect to the remote server  In the logfiles for reporting services, the following error is there: " System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it.   Any ideas? Windows Firewall is NOT running on this machine.   Thanks, Chrisrjp
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