.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

SQLXML 4 - How to specify a relationship on repeating element of global complex type

Posted By:      Posted Date: May 22, 2011    Points: 0   Category :

I have tried to create a sample showing the issue.  Basically we have multiple elements that use a global complex type.  This complex type has a repeating element and, therefore, should have another relationship specified for it.  I've tried specifying two relationships on the "Phone" element that reference their respective parents, but that does not work.  Is this scenario supported in SQLXML using SchemaGen?

<?xml version="1.0" encoding="utf-16"?>
<xs:schema version="1.0" xmlns:xs 

View Complete Post

More Related Resource Links

Parent-Child relationship on a Type 2 (SCD) Dimension

For a Type 2 slowly changing dimension (SCD) such as Employee with a Parent-Child relationship, how do you handle the explosion of new rows when a high ranking employee has an attribute change?   It will require terminating the high ranking employee row and adding a new current row with a new surrogate key. Then every employee row below this employee will also have to be terminated and a new current row added with the new surrogate key of the parent.   This will have to be performed 1 level at a time so the subordinate rows will have the new surrogate key of their immediate parent.   For a large organization such as 20,000 employees, this will result in a dimension with hundreds of thousands rows in a relatively short time.   Is there a better way to model this?

'Frame' TargetType does not match type of element 'PlaceHolderControl'

Hi. I'm trying to modify ControlTemplate for WPF Frame control. I extract Frame ControlTemplate  using blend. When I try to compile my app I get the following error: 'Frame' TargetType does not match type of element 'PlaceHolderControl'. Any ideas why?

External Content Type - Read List Operation - "Cannot find a collection element of a supported type.


I'm trying to define External Content Type Operations for an External Content Type. I can add a Connection, Type "WCF Service" no problem. And I can define a "New Read Item Operation" using that connection.

But I can't define a "Read List Operation". I get the following error message, in the Return Parameter Configuration: "Cannot find a collection element of a supported type..." it goes on to say - see the help documentation for supported types. I can't find any help documentation on this.

I've tried returning different types in the provider web service but keep getting the same error. What are the supported types the web service can return?

The reading I've done suggests that you can connect to a non-MS web service using a connection type of "WCF Service". Is this correct? If it is what's the best soap format the web service provider should use - Doc/Literal?



Circular Reference with Complex Type


I have created a webservice that returns a complex type.  This is the xml that is returned from the webservice:

<NinjaRouteEntity xmlns="http://tempuri.org/">
  <Entity NinjaRouteID="1" xmlns="">
    <EntityCollectionReference PropertyName="PointCollectionViaNinjaRouteVector">
        <Entities />

MessageContract/XMLSerializer - Known Type not being named with its element name when passed as obje


Okay, I've just deleted my first post since I was having issues with editting a post with codeblocks.  Trying once more.

I'm new to WCF and I am trying to write a webservice that must follow a specific XML format.  Because of this, I found that I had to drop DataContractSerializer since I must be able to use attributes.  I now have the <XMLSerializerFormat> attribute on my servicecontract for this purpose and I have laid out the schema I need by using a Class with Public Properties and the <Serializable()> attribute where appropriate.  I have one service endpoint that has several different schemas that it may accept.  I have a base class with derived classes for this purpose.  This also works well from what I can see as the test client and webservice are talking to each other just fine.  However, the client that will be using the service is non-WCF and must have the elements named specifically in order to handle them.  The problem arises when the service is serializing the derived classes.  The structure of each class works perfectly, however, the name of the element is not the name of the element I have assigned it.  It is most likely because of the way that I pass the information back and forth to the service and the fact that I do not know what the object actually is when it is passed into or out o

'Window' not type of element 'WindowInstance' Error


I've been teaching myself WPF for about a week now, so I'm sure this is something easy.
I have made a project to contain my 'Themes' for a window.  Assembly= libThemes   Namespace= Theme_Library
The only item in this is a ResourceDictionary in the file generic.xaml (in the 'Themes' folder) with a code-behind generic.xaml.cs .
The markup of this file looks like this...


<!--  STYLES  ***********************************************************************
               *********************************************************************** -->
 <Style TargetType="{x:Type Window}" x:Key="{ComponentResourceKey TypeInTargetAssembly={x:Type theme:StandardTheme}, ResourceId=WindowStyleA}">
  <Setter Property="AllowsTransparency" Value="True" />
  <Setter Property="Wi

WCF client for axis2 web service (same element names for different elements in different complex typ



we want to consume a axis2 web wervice. We can't influence the web service definition.

the wsdl looks like:

<?xml version="1.0" encoding="utf-8"?>
        <xs:element name="BAPI_COMPANYCODE_GETLIST">
            <xs:element minOccurs="0" maxOccurs="1" name="OUTPUT">
                  <xs:element minOccurs="0" maxOccurs="1" name="RETURN" type="psi:BAPIRETURN">

casting to complex type


I'm trying to figure out how to use the combobox item object collection.  Given the code below, how can I put a term in the "Cast<?>" statement to get my anonymous types back?  Or, is there a completely different way to do it?  Can I explicitly cast 'a'?

var citiesbox = new ComboBox();
ComboBox.ObjectCollection objects_to_store = new ComboBox.ObjectCollection(citiesbox);
objects_to_store.Add(new { cityid = 1, cityname = "Eugene" });
objects_to_store.Add(new { cityid = 2, cityname = "Portland" });
objects_to_store.Add(new { cityid = 3, cityname = "Salem" });

var citycode_from_db = 2;

citiesbox.SelectedItem = from a in citiesbox.Items.Cast<?>
             where a.cityid = citycode_from_db
             select a;
-Ethan Nelson

Complex Matrix column data with different data type

I have a data like this

drop table #table
select 34 as A,17948 as B,0.19 as C,19 as D,16145 as E,'Jan' as Period into #table
Insert into #table
select 26 as A,14206 as B,0.18 as C,19 as D,13411 as E,'Feb' as Period
union all
select 38 as A,13037 as B,0.21 as C,18 as D,14974 as E,'Mar' as Period
select * from #table

From this #table i want the view as below format and is doable thru matrix report option in SSRS,but the problem i am running is that i cannot get in this type of data type format. If you look into it,i have column with header 'Jan' and it has data in different data type e.g money,number,percentage. I need to maintain this data type in order to do the calculation after it generates the report on excel spreadsheet. If i use the varchar for the column, it is not usable to me in the final report and i cannot do the calcualtion. Any workaround will be highly appreciated.

    Jan               Feb          Mar
A $34               $26          $26
B 17,

Using Complex Type with Stored Procedure in EF4.0??


Hi All,

Playing with my new toy, VS2010.

  1. Created a .NET 4.0 Web App.
  2. Added Entity Data Model, SPTestModel.edmx, using local AdventureWork SQL Server database, included all tables and one stored procedure.
  3. From the Model Browser>Add Function Import>Choose Stored Proc>Get Column Info>Create New Complex Type>Return a Collection of New Complex Type>OK
  4. Add new WFC Data Service
    1. namespace SPTestDataService
          public class SPTestDataService : DataService<SPTest.AdventureWorksEntities>
              // This method is called only once to initialize service-wide policies.
              public static void InitializeService(DataServiceConfiguration config)
                  config.SetEntitySetAccessRule("*", EntitySetRights.AllRead);
                  config.DataServiceBehavior.MaxProtocolVersion = DataServiceProtocolVersion.V2;

QUESTION: How do I use the stored procedure?? The complex type mapped to it is ju

DataAnnotation with .edmx complex type


I have a problem.

In edmx Contact entity PersonalInfo complex type is defined with property FullName and Title.

In view the code is

<div class="editor-label">
                <%: Html.LabelFor(model => model.PersonalInfo.FullName) %>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.PersonalInfo.FullName) %>
                <%: Html.ValidationMessageFor(model => model.PersonalInfo.FullName) %>

Got buddy class like
    public partial class Contact

    public class ContactValidation

        public string FullName { get; set; }

When I submit form get an error of mapping but if I take FullName out of complex type than form is working fine.
How I validate FullName if it is in Complex type?


Microsoft SQLXML Bulkload 4.0 Type Library with SQL Express



I'm trying to follow a sample from microsoft for Using SQLXML Bulk Load in the .NET Environment

In the sample c# console app. it says to select add reference then In the COM tab, select Microsoft SQLXML Bulkload 4.0 Type Library (xblkld4.dll) and click OK.

The problem I have is I cannot find the library or the xblkd4.dll file on my pc.

Does anyone have any suggestions? Any help would be much appreicated.



Saving a complex custom type Variable to ModelItem


I am using a custom designer in a hosted workflow designer and want to use a complex custom type as a variable in a workflow.

I have been able to save the Variable, complete with values set in the designer Popup, in the ModelItem (to be able to save the workflow to a file) using:




Is it possible SQLXML to accept the Base64Binary data type and convert it back to binary to a 'ntex


Hi, I am trying to pass to SQLXML ("SQLXMLBulkLoad.SQLXMLBulkload.4.0") an XSD schema to be able to accept the Base64Binary data type and convert it back to binary to a 'ntext' type field(Due to a legacy DB that sore some Binary data at a 'ntext' field at SQL Server)

I have try the following without success:

'<xsd:attribute name="Mybase64field" type="xsd:base64Binary" sql:datatype="image" />'

Is this possible?

the constant/fixed element cannot have attributes sqlxml bulkload error


My xml schema fails in getting attributes from 'empty' element... using sql:is-constant="1" disables reading attributes and by not using constant for element, error comes back with define relation... element is only a header for the attributes...

part of the xml:

<orderitem id="124810">


<name><![CDATA[Jac Digilabel folie tra glos]]></name>


<attribute name="ALGEMEEN_KLEUR"><![CDATA[Transparant]]></attribute>

<attribute name="ALGEMEEN_FORMAAT"><![CDATA[320x460]]></attribute>

<attribute name="ALGEMEEN_GEWICHT"><![CDATA[110]]></attribute>

An Entity Relationship Diagram Example

An Entity Relationship Diagram conveys a lot of information with a very concise notation. The important part to keep in mind is to limit what you're reading using the following technique:

Choose two entities (e.g. Company and Employee)
Pick one that you're interested in (e.g. how a single Company relates to employees)
Read the notation on the second entity (e.g. the crow's feet with the O above it next to the Employee entity).

TreeSelector : playing with generics and type inference

create a generic way to define a selection starting from a tree of objects, the most simpler way as possible.

Let's start with the beginning...
Here is a very simple little interface defining a node of the tree, basically, a value and the references to the child nodes.
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