Fastest way to move XML document into and back out of CLR function

Fastest way to move XML document into and back out of CLR function

In SQL Server 2005 and Visual Studio 2005, what is the fastest way to pass 
an xml data type variable into a C# CLR function and retrieve it back out of 
the C# CLR function when the C# CLR function is done modifying it?

I tried this but get deployment error becuase SQLServer2005/CLR dotn support 
System.Xml.XmlDocument:

public partial class UserDefinedFunctions
{
    [Microsoft.SqlServer.Server.SqlFunction]
    public static int InsertSomeNode(System.Xml.XmlDocument pDoc)
    {
        //
        return 1;
    }
};

thorws error:
Error 1 Column, parameter, or variable #1: Cannot find data type 
XmlDocument. InsertSomeNode


0
11/1/2007 1:41:44 AM
dotnet.xml 7266 articles. 0 followers. Follow

1 Replies
852 Views

Similar Articles

[PageSpeed] 12

DR wrote:
> Fastest way to move XML document into and back out of CLR function
> 
> In SQL Server 2005 and Visual Studio 2005, what is the fastest way to pass 
> an xml data type variable into a C# CLR function and retrieve it back out of 
> the C# CLR function when the C# CLR function is done modifying it?
> 
> I tried this but get deployment error becuase SQLServer2005/CLR dotn support 
> System.Xml.XmlDocument:
> 
> public partial class UserDefinedFunctions
> {
>     [Microsoft.SqlServer.Server.SqlFunction]
>     public static int InsertSomeNode(System.Xml.XmlDocument pDoc)
>     {
>         //
>         return 1;
>     }
> };
> 
> thorws error:
> Error 1 Column, parameter, or variable #1: Cannot find data type 
> XmlDocument. InsertSomeNode


That's weird, Sql Server 2005 does support System.Xml 
(http://support.microsoft.com/kb/922672). Post full deployment log.


-- 
Oleg Tkachenko [XML MVP, MCPD]
http://www.tkachenko.com/blog | http://www.XmlLab.Net
0
some2113 (163)
11/1/2007 8:55:42 AM
Reply:

Similar Artilces:

how to terminate a thread in afriendly way?
I have an application that uses many threads to do various things. Occasionally, one of the threads hangs when it is communicating with another computer that stops responding. Is there a way that I can terminate the hanging thread in such a way that it can clean up for itself before actually terminating? I've looked at exceptions, but I can't see how one thread (that is monitoring things)can throw an exception for another thread (that is hung). Brian Westcott wrote: > I have an application that uses many threads to do various things. > Occasionally, one of the threads ...

Automate Access Reports/Microsoft Office Document Image Writer
How can I automate printing Access Reports on the Microsoft Office Document Image Writer? ...

Fastest way to do this?
I have 10000 logins and their respective passwords. Logins are in col A and passwords are in B. Logins contain serial no. like LGN00001 to LGN10000 What I want is to have the first 200 logins/ pwds on the first page like 1 to 50 in col A,b then 51 to 100 in C,D then 101 to 150 in E,F and 151 to 200 on G and H, The same thing is repeated for the rest of logins. 201 to 250 on A,B etc. any cool macro would help. thx Here's a very straight-forward macro Sub ReFormat() Dim iSource As Long Dim iTarget As Long iSource = 1 iTarget = 1 Do Cells(iSource, "A")...

easy way to add all contacts from a DL out of Global address book to personal contact
hi, is there an easy way to add all contacts that are assigned to a distribution list within the global address book to my personal contacts? I could only add them contact per contact, but didn't find a way to e.g. add all 70 contacts from a DL automatically to my address book . any ideas? I don't want to add the DL, just the contacts of the DL.... thanks, stefan ...

saving excel document as pdf
Is it possible to save an excel sheet in pdf format while keeping drop down menus workable on the pdf file? I mean suppose you have a drop down menu in an excel sheet where you can choose numbers. Is it possible to save this file as a pdf file while allowing the drop down menus still work in the pdf file? Or am I asking too much? Hi No, it can't be done, AFAIK -- Regards Roger Govier "minimus" <minimus@live.co.uk> wrote in message news:h0arb5$glm$1@news.eternal-september.org... > Is it possible to save an excel sheet in pdf format while keeping drop > ...

proper way to close a socket?
I have a problem with CAsynsocket. I can connect to a remote socket. When I want to close the connection, I just delete the socket object (which closes the connection) and have no problems. But if I've started to connect to a remote socket that doesn't exist (or doesn't accept), and I delete the local socket object while waiting for the connection, I sometimes get an assert in CAsyncSocket::DoCallBack(). See below. Actually, it's not in the middle of an Accept call because I test with an address and port that I know doesn't exist. Any idea how I should be ...

Arranging desktop icons
I always arrange my desktop icons on my work computer a certain way, but recently they have been rearranging themselves and lining up. I put all of my files on the desktop until I'm finished with them or leave them there if they're ones I use frequently, so I have quite a few. This seems to happen when I'm on my personal laptop and use a Verizon broadband device to connect to my work server if I'm out of town OR if I log in from my laptop at home using my normal internet connection. I never had this problem UNTIL I got a new laptop. I'm running Windows XP ...

Is there a way to elliminate the "Save Before Quitting" Message?
I'm running many excel sheets on my website and everytime, it change excel forms, I don't want it to ask if the user is sure if they want t exit the form without saving. Thanks in advance ----------------------------------------------- ~~ Message posted from http://www.ExcelTip.com ~~View and post usenet messages directly from http://www.ExcelForum.com anyone ----------------------------------------------- ~~ Message posted from http://www.ExcelTip.com ~~View and post usenet messages directly from http://www.ExcelForum.com Do you want to save the save file or not save the file...

Converting worksheets to workbooks. Is there an easy way?
Workbook contains 150 worksheets. Is there an easy way to convert all worksheets to workbooks? (Break them out) Hi jim Try http://www.rondebruin.nl/copy6.htm -- Regards Ron de Bruin http://www.rondebruin.nl "Jim" <Jim@discussions.microsoft.com> wrote in message news:88031DF5-B9C8-4298-B72F-A083E356FDBD@microsoft.com... > Workbook contains 150 worksheets. Is there an easy way to convert all > worksheets to workbooks? (Break them out) ...

is there a way to do this... ?
A B 1 3 $1.12 2 8 $0.14 3 15 $1.71 4 etc etc 400 6 $3.83 I want to have one cell at the bottom be = A1*B1 + A2*B2 + A3*B3 etc ....... A400*B400 I know that I could add a column C to store the multiplication on each row, and then SUM column C, but is there a way to do this without adding a column C? one way: =SUMPRODUCT(A1:A400,B1:B400) In article <Q3DMd.7247$e11.724@twister.socal.rr.com>, "AFN" <newsDELETETHECAPSgroupaccount@DELETETHISyahoo.com> wrote: > A B > 1...

Moving pub. file from one computer to another
I am working on a four page newsletter on my home PC. I want to send it to my work laptop. I usually do this by email. This file is too large to send it by email according to AOL. I tried burning it on to a CD, but my PC tells me that I don't have enough space on my hard drive. Can someone help me figure out what to do? Would I be able to save it on a flash drive? Thanks for your help! ThreehundredE wrote: > I am working on a four page newsletter on my home PC. I want to send > it to my work laptop. I usually do this by email. This file is too > large to send it b...

Move Mailbox Task
I am consolidating mailboxes from two servers located at branch offices to a Exchange 2003 SP2 server located at HQ. I have been able to move most of the mailboxes, but there are about a dozen mailboxes on each of the branch servers that fail. The errors in the application log on the destination server are 1023 1008 9172. -- Sr. Network Administrator MILLER LEGG 1800 N. Douglas Road Pembroke Pines, FL 33024 CE News 2002 & 2003 "Top 50 Best Places to Work in USA" On Wed, 23 Aug 2006 05:44:02 -0700, treaston2 <treaston2@news.postalias> wrote: >I am consolidating...

Quicker way to assign transactions to categories?
I imported the last 6 months of my credit card activity. Although some of the transactions were correctly categorized, most were listed under the Miscellaneous category. 1. Is it possible to setup money so that if I tell it , say, "Russian River Brewing Company" is Food:Dining Out, it will automatically reclassify *all* of those transactions as Food:Dining Out, or do I have to go through one-by-one and select the correct category for every Russian River Brewing Company transaction over the last 6 months? In other words, can I tell money *once* what category a transaction belongs to...

Is there a way to...
Is there a way to view email messages stored on an Exchange 2000 POP3 server? I'm getting the following error from Outlook Express... Your server has unexpectedly terminated the connection. Possible causes for this include server problems, network problems, or a long period of inactivity. Account: 'rms@yahoo.com', Server: 'mail.yahoo.com', Protocol: POP3, Server Response: '+OK', Port: 110, Secure(SSL): No, Error Number: 0x800CCC0F I'm not sure what to do. Could someone give me an idea? Thanks, Robert So your trying to connect to a Yahoo account usi...

Moving Messages
I have got both Outlook and Outlook Express on my computer, can I move messages from Outlook to Outlook Express or vice versa? How? Jeff -----= Posted via Newsfeeds.Com, Uncensored Usenet News =----- http://www.newsfeeds.com - The #1 Newsgroup Service in the World! -----== Over 80,000 Newsgroups - 16 Different Servers! =----- ...

How can i move AD users from a domain to another?
Hi, I have a windows 2000 domain in mixed mode. Also Exchange 2003 SP1. I just created a windows subdomain on a windows 2003 server. When i create a user in the subdomain it creates the exchange mailbox and works fine. But i'd like to move some users from the windows domain to the windows subdomain without creating the mailboxes again (first exporting them to PST and importing them later over the new ones) Is that possible? thanks a lot Alex On Thu, 19 Aug 2004 02:19:01 -0700, "Alex" <Alex@discussions.microsoft.com> wrote: >Hi, > >I have a windows 2000 do...

Way to turn off "show in Groups" globally
When I look at E-Mail folders in Outlook (2003), by default "show in groups" (View / Arrange by / Show in Groups) is turned on. It's clear how to turn this off for any single folder, but is there a way to turn it off globally? I have over 1,000 folders in my E-Mail PST file. do you have many custom views? if not, the best way is to restart outlook using the /cleanviews switch. Then go to View, Arrange By, Current view, Define view and choose Messages, then modify and change the grouping. if you have a lot of custom views, you can try changing the grouping in Views but ...

"paste special" function
I've created 13 Excel worksheets in one book. There is one worksheet for each month of the year (with all of the appropriate columns, summing and arrays). These all work great. The 13th worksheet in the book is the summary or totals page. What is the correct way to have the totals from the individual monthly pages automatically transferred to the summary page? And will these automatically update when the monthly pages are changed? On Sheet 13 in the appropriate cell, assuming the sheet is laid out exactly the same as the other 12 sheets, use the formula =SUM(Sheet1:Sheet12!A1) or w...

shortcut for doc changed or moved and doesnt work
I created a document in word. I went to get into it today to add some more info and I couldnt find it where it should have been. I eventually found it in Roaming but cannot open it because the message says The Item xxxxx that this shortcut refers to has been changed or moved, so this shortcut will no longer work properly. Do you want to delete this shortcut?. I don't know what to do and am anxious to get my work back. HELP!! If you created the document in Word (as opposed to having opened it as an email attachment) and saved it, it should have been saved to the default...

Fastest method
Hi, What is the fastest .NET method of opening an XML file (no schema validation) and doing basic XPath Queries? Thanks Richard. "Richard Bower" <richardbower@hotmail.com> wrote in message news:u2inuBY$DHA.2516@TK2MSFTNGP11.phx.gbl... > What is the fastest .NET method of opening an XML file (no schema > validation) and doing basic XPath Queries? The XPathNavigator class in the System.Xml.XPath namespace is most highly optimized for performing queries. If by queries, you mean those that node-sets, then you'd use: - - - CreateXPathNav.cs (excerpt) using System....

Client Move from 5.5 to 2003 problem
I have done a migration on a three users. One user was just created right before the migration and it migrated fine, can open up outlook to that mailbox and works just fine. The other two have been mailboxes of a 5.5 server for many years and they migrate just fine over to 2003 server but outlook wants a username and password put in, no matter what username or pass I Put in, It never works. Our setup is Exchange 5.5 SP4 on WinServer2k, and Exchange 03 Sp2 on WinServer 03 The WinServer 03 a DC, I know not reccommended to do it thisway, but with an Org of my size I was told that it w...

Is there any way around needing a password for a database?
I am attempting to open a file created by another program and am required to give a password. I don't know this password and therefore have no access to the information. The other program has collapsed and will no longer even recognize the file. Any help would be appreciated! hi what program was it created in? Cheers julieD "Scott Kershaw" <Scott Kershaw@discussions.microsoft.com> wrote in message news:A8A7B53B-5426-4334-9807-2C5E0D545B12@microsoft.com... >I am attempting to open a file created by another program and am required >to > give a password. ...

Inserted excel files into publisher document (printing problems)
I have imbedded some excel files (charts, graphs, etc.) into a publisher document. The files are linked to the original excel file so that they will automatically update when the document is opened. The formatting and everything looks great. However, when I print the document, the excel grids are printed. The gridlines are not set up to print in the original .xls file. Does anyone know how I can keep the gridlines from printing? ...

How to treat front & back pages of a booklet as a single page
I have a booklet with 4 pages. With the inside 2 pages if I want a picture to go across both pages it is all very simple. What I can't work out is how to achieve the same effect across the front/back page spread. Do I have to resort to chopping the picture in half and carefully positioning each half on the relevant page so they match up or is there an elegant way built into Publisher that I'm missing. Thanks Make the cover a separate document that's the size of two of the inside pages. -- JoAnn Paules MVP Microsoft [Publisher] ~~~~~ How to ask a question http://suppo...

XML deserialization from string
Hi, I have an XSD and created a VB.NET class file from it. When I have an XML file (conforming to the schema), it is straight forward to deserialize using the class file. I am looking for ways to deserialize when I have the XML as a string and not in a file. Writing the string to a file and deserializing from the file might have an adverse effect on the performance. Anyone know of a good method to do this? Any help will be appreciated. Thanks, Sampath. Use a StringReader to read the file and wrap that in an XmlTextReader. -- This posting is provided "AS IS" with no warranties,...