How to use SQLXML Managed Classes

sunmorningindiasunmorningindia Member Posts: 65
Hi,

I want to use "SQLXML Managed Classes" in my CAL code.
I installed this form Microsoft SQL Server 2008 Service Pack 3 Feature Pack (http://www.microsoft.com/en-in/download ... x?id=27596). I am not able to find Microsoft Data SQL XML in Automation Server list.

How can i register this DLL (Microsoft.Data.SqlXml.dll) file so that i can use this in NAV. I try this but got stuck in the below error.

RegSvr32
C:\Program Files\SQLXML 4.0\bin\Microsoft.Data.SqlXml.dll was loaded, but the DllRegisterServer entry point was not found.
This file can not be registered.

Thanks,

Comments

  • koubekkoubek Member Posts: 84
    Have you tried to register the library using regasm command. I suppose it is managed .NET library...
  • sunmorningindiasunmorningindia Member Posts: 65
    I think after successful installation Microsoft Data SQL XML should available in Automation Server list.

    After manual registration (RegAsm "C:\Program Files\SQLXML 4.0\bin\Microsoft.Data.SqlXml.dll"), this is still not available in Automation Server list.

    In NAV 2009 R2, this is available under dotnet datatype. In my case I need to implement this in NAV 2009 Sp1. I want to complete this using automation /ocx variable.

    Thanks,
  • koubekkoubek Member Posts: 84
    The library probably (i have not really check it) does not provide COM interface (then you can not see it as a Automation type). You can creat simple COM wrapper in VisualStudio (for example in C#) or use it as a DotNet type.
  • sunmorningindiasunmorningindia Member Posts: 65
    I want to use SQLXML to get this result:

    1. Create a connection with NAV Database.
    2. Run the SQL quesry

    SELECT TOP 100 [No_],[Name],[Address],[City],[Contact],[Global Dimension 1 Code] as GD1,[Global Dimension 2 Code] as GD2
    FROM [Demo Database NAV (6-0) W1].[dbo].[CRONUS International Ltd_$Customer]
    FOR XML PATH ('Customers'), ROOT ('Customer');

    3. Write the output of the above query in stream (NAV OutStream).
    4. Create InStream and call XMLport to import this.

    Can someone suggest some solution approach here.

    Thanks,
    Manish
  • koubekkoubek Member Posts: 84
    You have probably two DBs and importing data from the first one to another one...? This is the only reason i can imagine you want to use so complicated approach. Please, describe the situation better (databases - one/two; platform - native/sql - NAV version etc.) to propose you another solution.
Sign In or Register to comment.