473,700 Members | 2,859 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Validating UpdateGram

I've got a system which takes an XML file, translates it into an update gram
and then loads it into my database with SQLXML3 (all in dot net).

But it's fragile. And the SQLXML 3 error reporting is not absolutely
wonderful.

So what I want to do is to validate it before I upload it.

When I try and do this I get MILLIONS of errors (well lots) complaining
about elements like ROOT which are part of the
urn:schemas-microsoft-com:mapping-schema namespace.

SO I guess I need an xsd file which describes this.

There must be one somewhere? Surely? But I can find no trace in MSDN, on
the web or in the groups.

Can anyone point me to such animals?

Iain

P.S. If they do not exist as such it would seem to me they should do. Both
for formal documentation and to help people like me.

THanks
Nov 12 '05 #1
6 2421
At first I thought they would be quite helpful myself. If you think about it
though, you will not get very far with validating updategrams with schemas
since the schema to be very loose. The schema can only define the <before>
and <after> elements. It cannot define their content because the content is
specific to yor application. Furthermore, updategrams expect annotations to
the application-specific content which cannot expressed in a generic schema
either. If you really want to thoroghly want to validate your updategrams,
you have to define a comprehensive schema yourself.

However, most errors you get back using updategrams are not based on invalid
XML. They are usually caused by limitations of
SQLXML. Some of the error information comes back in the SqlXmlException [0].
If the error information is not sufficient, you can only trace the SQL
SQLXML sends to SQL Server using Sql Profiler, then execute the SQL that
causes errors using Query Analyzer and determine the source of the error.
That technique is not necesserily for the faint of heart ;)

--
HTH
Christoph Schittko [MVP, XmlInsider]
Software Architect, .NET Mentor

[0] http://www.topxml.com/sqlxml/sqlxmlexception_class.asp

"Iain" <id********@dir con.co.uk> wrote in message
news:u7******** *****@tk2msftng p13.phx.gbl...
I've got a system which takes an XML file, translates it into an update gram and then loads it into my database with SQLXML3 (all in dot net).

But it's fragile. And the SQLXML 3 error reporting is not absolutely
wonderful.

So what I want to do is to validate it before I upload it.

When I try and do this I get MILLIONS of errors (well lots) complaining
about elements like ROOT which are part of the
urn:schemas-microsoft-com:mapping-schema namespace.

SO I guess I need an xsd file which describes this.

There must be one somewhere? Surely? But I can find no trace in MSDN, on
the web or in the groups.

Can anyone point me to such animals?

Iain

P.S. If they do not exist as such it would seem to me they should do. Both for formal documentation and to help people like me.

THanks

Nov 12 '05 #2
Thanks for your reply Christoph.

Well. An updategram scheme is just a schema - and it can be pretty
comprehensive, of course.

What is missing from it are simply the definitions in the namespace
'schemas-microsoft-com:mapping-schema'. (or rather the urn which it refers
to). So definitions of at-identity and <ROOT> and stuff should fix this.

Were this available, I believe that (after adding it to the
SchemaCollectio n) you should be able to validate the XML input before
passing it through to SQLXML for processing.

At the moment, I check the raw input file against an XSD, then translate it
to an updategram (with quite a bit of mangling to make nice XML fit into the
more restricted format which SQLXML accepts). Then apply the updategram.
Any errors in my XSLT are therefore hard to debug (especially give that the
level of reporting from SQLXML amounts to 'oops' as you suggested).

Of course there are still subtle issues with the SQL data bits and I have NO
desire for the SQL trace learning curve.

So MS. PLEASE can we have an XSD for this?

Iain

PS. Christoph, you'll know this... When I do my Xslt I get an output which
is all on one line. I've tried puting <output indent="yes" ...> in the xslt
which is ignored. What do I need to do to get nicely formated text?
"Christoph Schittko [MVP]" <ch************ ********@austin .rr.com> wrote in
message news:#R******** ******@TK2MSFTN GP10.phx.gbl...
At first I thought they would be quite helpful myself. If you think about it though, you will not get very far with validating updategrams with schemas
since the schema to be very loose. The schema can only define the <before>
and <after> elements. It cannot define their content because the content is specific to yor application. Furthermore, updategrams expect annotations to the application-specific content which cannot expressed in a generic schema either. If you really want to thoroghly want to validate your updategrams,
you have to define a comprehensive schema yourself.

However, most errors you get back using updategrams are not based on invalid XML. They are usually caused by limitations of
SQLXML. Some of the error information comes back in the SqlXmlException [0]. If the error information is not sufficient, you can only trace the SQL
SQLXML sends to SQL Server using Sql Profiler, then execute the SQL that
causes errors using Query Analyzer and determine the source of the error.
That technique is not necesserily for the faint of heart ;)

--
HTH
Christoph Schittko [MVP, XmlInsider]
Software Architect, .NET Mentor

Nov 12 '05 #3
Iain,

The first problem defining schema for an updategram is that the root node of
an updategram is not part of the urn:schemas-microsoft-com:xml-updategram
namespace. In fact it's not part of any namespace, which makes things
already very complicated, esp. if you tried to validate content inside
<before> or <after> that wasn't part of any namespace either.

Microsoft could publish a schema that defines schema types for <before> and
<after>, but those schemas would be extremely lose. At best it could be
something like:

<complexType name="updgType" >
<sequence minOccurs="0" maxOccurs="unbo unded">
<element name="before" type="beforeTyp e"/>
<element name="after" type="afterType " />
<sequence>
</complexType>

<complexType name="beforeTyp e">
<sequence>
<any />
</sequence>
</complexType>

<complexType name="afterType ">
<sequence>
<any />
</sequence>
<attribute name="returnid" type="string" />
</complexType>

Now you still don't have a schema that you can validate against. You could
define a schema that defines the ROOT element (and possible all other
content that's not part of the namespacem but that is still not solving your
problem.

Another issue you have now are the id, at-identity and guid attributes from
the updategram namespace. If your <before> and <after> elements contain
content that is bound to a namespace then you need to extend that schema to
allow all element content to have these attributes, otherwise you could not
validate the content of the updategram against the schemas that define the
content.

Does this help clearing things up a little bit?
--
HTH
Christoph Schittko [MVP, XmlInsider]
Software Architect, .NET Mentor
"Iain" <id********@dir con.co.uk> wrote in message
news:uH******** ******@TK2MSFTN GP12.phx.gbl...
Thanks for your reply Christoph.

Well. An updategram scheme is just a schema - and it can be pretty
comprehensive, of course.

What is missing from it are simply the definitions in the namespace
'schemas-microsoft-com:mapping-schema'. (or rather the urn which it refers
to). So definitions of at-identity and <ROOT> and stuff should fix this.

Were this available, I believe that (after adding it to the
SchemaCollectio n) you should be able to validate the XML input before
passing it through to SQLXML for processing.

At the moment, I check the raw input file against an XSD, then translate it to an updategram (with quite a bit of mangling to make nice XML fit into the more restricted format which SQLXML accepts). Then apply the updategram.
Any errors in my XSLT are therefore hard to debug (especially give that the level of reporting from SQLXML amounts to 'oops' as you suggested).

Of course there are still subtle issues with the SQL data bits and I have NO desire for the SQL trace learning curve.

So MS. PLEASE can we have an XSD for this?

Iain

PS. Christoph, you'll know this... When I do my Xslt I get an output which is all on one line. I've tried puting <output indent="yes" ...> in the xslt which is ignored. What do I need to do to get nicely formated text?
"Christoph Schittko [MVP]" <ch************ ********@austin .rr.com> wrote in
message news:#R******** ******@TK2MSFTN GP10.phx.gbl...
At first I thought they would be quite helpful myself. If you think about
it
though, you will not get very far with validating updategrams with

schemas since the schema to be very loose. The schema can only define the <before> and <after> elements. It cannot define their content because the content

is
specific to yor application. Furthermore, updategrams expect annotations

to
the application-specific content which cannot expressed in a generic

schema
either. If you really want to thoroghly want to validate your updategrams, you have to define a comprehensive schema yourself.

However, most errors you get back using updategrams are not based on

invalid
XML. They are usually caused by limitations of
SQLXML. Some of the error information comes back in the SqlXmlException

[0].
If the error information is not sufficient, you can only trace the SQL
SQLXML sends to SQL Server using Sql Profiler, then execute the SQL that
causes errors using Query Analyzer and determine the source of the error. That technique is not necesserily for the faint of heart ;)

--
HTH
Christoph Schittko [MVP, XmlInsider]
Software Architect, .NET Mentor


Nov 12 '05 #4
Thanks for your feedback.

I think I'd have to try and do this to really understand it.

What I have, of course is an XSD that defines the datastructure of the tables I'm writing into and how to map to those tables from the xml file I put in. Snippet might look like below.

--------------------------

<xsd:schema xmlns:disk="htt p://DOD.COM/Disks"
targetNamespace ="http://DOD.COM/Disks"
xmlns:xsd="http ://www.w3.org/2001/XMLSchema"
xmlns:sql="urn: schemas-microsoft-com:mapping-schema">
<xsd:annotation >
<xsd:appinfo>
<sql:relationsh ip name="OrdersInB atch" parent="OrderBa tches" parent-key="OrderBatch ID" child="Orders"
child-key="OrderBatch ID" />
</xsd:appinfo>
</xsd:annotation>
<xsd:complexTyp e name="OrderType "></xsd:complexType >
<xsd:element name="OrderBatc h" sql:relation="O rderBatches">
<xsd:complexTyp e>
<xsd:sequence >
<xsd:element name="Order" maxOccurs="unbo unded" sql:relationshi p="OrdersInBatc h" sql:relation="O rders">
<xsd:complexTyp e>
<xsd:sequence >
<xsd:element name="ShipName" type="disk:Stri ng50" minOccurs="1" maxOccurs="1" />
</xsd:sequence>
<xsd:attribut e name="FileName" type="xsd:strin g" use="required" />
</xsd:complexType >
</xsd:element>
</xsd:schema>
-------------------------

Now surely if I changed this (maybe with an xslt to make it automatic) so that the "ROOT" element was insterted, with an import with the sqlxml namespace defined, this would allow validation?

Something like what you describe below but with the

<sequence>
<any />
</sequence>

replaced by my xsd contents?

I may give this a go, especially if you think it makes sense. As I am only uploading data then I only need concern myself with the <after> element.

Iain
"Christoph Schittko [MVP]" <ch************ ********@austin .rr.com> wrote in message news:OS******** ******@TK2MSFTN GP12.phx.gbl...
Iain,

The first problem defining schema for an updategram is that the root node of
an updategram is not part of the urn:schemas-microsoft-com:xml-updategram
namespace. In fact it's not part of any namespace, which makes things
already very complicated, esp. if you tried to validate content inside
<before> or <after> that wasn't part of any namespace either.

Microsoft could publish a schema that defines schema types for <before> and
<after>, but those schemas would be extremely lose. At best it could be
something like:

<complexType name="updgType" >
<sequence minOccurs="0" maxOccurs="unbo unded">
<element name="before" type="beforeTyp e"/>
<element name="after" type="afterType " />
<sequence>
</complexType>

<complexType name="beforeTyp e">
<sequence>
<any />
</sequence>
</complexType>

<complexType name="afterType ">
<sequence>
<any />
</sequence>
<attribute name="returnid" type="string" />
</complexType>

Now you still don't have a schema that you can validate against. You could
define a schema that defines the ROOT element (and possible all other
content that's not part of the namespacem but that is still not solving your
problem.

Another issue you have now are the id, at-identity and guid attributes from
the updategram namespace. If your <before> and <after> elements contain
content that is bound to a namespace then you need to extend that schema to
allow all element content to have these attributes, otherwise you could not
validate the content of the updategram against the schemas that define the
content.

Does this help clearing things up a little bit?
--
HTH
Christoph Schittko [MVP, XmlInsider]
Software Architect, .NET Mentor


Nov 12 '05 #5
If you were to add a definition for a ROOT element to the schema then that ROOT element would belong to the http://DOD.COM/Disks namespace. I seem to remember that updategrams work regardless what namespace the ROOT element belongs to because an updategram is a specialized case of a SQLXML template. I am not sure about this though. It's for you to try that out. ;)

You you need to define the root type to have zero or more <before><afte r> groups :
<schema targetNamespace ="urn:schema s-microsoft-com:mapping-schema"
xmlns="http://www.w3.org/2001/XMLSchema">
<complexType name="updgType" >
<sequence minOccurs="0" maxOccurs="unbo unded">
<element name="before" type="beforeTyp e" minOccurs="0" maxOccurs="1"/>
<element name="after" type="afterType " minOccurs="0" maxOccurs="1"/>
<sequence>
</complexType>

<complexType name="beforeTyp e">
<sequence>
<any /> <!-- no validation possible -->
</sequence>
</complexType>

<complexType name="afterType ">
<sequence>
<any /> <!-- no validation possible -->
</sequence>
<attribute name="returnid" type="string" />
</complexType>

</schema>

<schema xmlns:disk="htt p://DOD.COM/Disks"
targetNamespace ="http://DOD.COM/Disks"
xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:sql="urn: schemas-microsoft-com:mapping-schema">

<element name="ROOT" type="sql:updgT ype" />

That's the first problem solved, but now it gets harder. You need to define the content the ROOT element. You could go with the types I dummied up in my previous post but the benefits of validating against that schema are marginal. You ensure that the ROOT element has groups of <before><afte r> elements, where either one of them can be optional. You are not able to validate the content inside the <before> or <after> elements because the urn:schemas-microsoft-com:mapping-schema namespace cannot know anything about any application specific schemas and has to define both types as completely open:

<element name="before">
<complexType>
<sequence>
<any namespace="##an y" minOccurs="0" maxOccurs="unbo unded"/>
</sequence>
</complexType>
</element>

You can't "forward declare" elements and types like you can in programming languages like C++. Even of you tried to define your own custom schema for the urn:schemas-microsoft-com:mapping-schema namespace that only your application uses to validate updategrams like this:

<element name="before">
<complexType>
<sequence>
<any namespace="http ://DOD.COM/Disks" minOccurs="0" maxOccurs="unbo unded"/>
</sequence>
</complexType>
</element>

I don't believe you couldn't solve that problem. You would introduce a circular dependency and if I read the XML Schema spec [0] right then this is not allowed.

The id, at-identity and guid attributes pose another probem. Updategrams define the to propagating automatically generated @@IDENTITY values You can define them in an attributeGroup in the schema for the mapping schema namespace:

<attributeGroup >
<attribute name="id" type="int" />
<attribute name="at-identity" type="string" />
<attribute name="guid" type="string" />
</attributeGroup>

However, these attributes need to occur on the elements in the XML that you are inserting. Therefore you need to CHANGE(!) your application's schema to make these attributes schema legal on every element where you need expect them to let SQLXML know about @@IDENTITY values. Remember though, that this is probably pointless, since you probably can't build a schema that will validate the types from your schema because of the circular reference problem.

Regardless how you order the two schemas, you will always have a circular reference problem. The mapping-schema schema needs to know about your application's schema's namespace to enable validation of the content of the <before> and <after> element and the application's schema needs to know about the attributeGroup for inserting into tables with @@IDENTITY columns. Avoiding the circular reference with wildcard content renders a schema will not allow reasonable validation of updategrams.

I hope this post makes sense.
--
HTH
Christoph Schittko [MVP, XmlInsider]
Software Architect, .NET Mentor
"Iain" <id********@dir con.co.uk> wrote in message news:#2******** ******@TK2MSFTN GP12.phx.gbl...
Thanks for your feedback.

I think I'd have to try and do this to really understand it.

What I have, of course is an XSD that defines the datastructure of the tables I'm writing into and how to map to those tables from the xml file I put in. Snippet might look like below.

--------------------------

<xsd:schema xmlns:disk="htt p://DOD.COM/Disks"
targetNamespace ="http://DOD.COM/Disks"
xmlns:xsd="http ://www.w3.org/2001/XMLSchema"
xmlns:sql="urn: schemas-microsoft-com:mapping-schema">
<xsd:annotation >
<xsd:appinfo>
<sql:relationsh ip name="OrdersInB atch" parent="OrderBa tches" parent-key="OrderBatch ID" child="Orders"
child-key="OrderBatch ID" />
</xsd:appinfo>
</xsd:annotation>
<xsd:complexTyp e name="OrderType "></xsd:complexType >
<xsd:element name="OrderBatc h" sql:relation="O rderBatches">
<xsd:complexTyp e>
<xsd:sequence >
<xsd:element name="Order" maxOccurs="unbo unded" sql:relationshi p="OrdersInBatc h" sql:relation="O rders">
<xsd:complexTyp e>
<xsd:sequence >
<xsd:element name="ShipName" type="disk:Stri ng50" minOccurs="1" maxOccurs="1" />
</xsd:sequence>
<xsd:attribut e name="FileName" type="xsd:strin g" use="required" />
</xsd:complexType >
</xsd:element>
</xsd:schema>
-------------------------

Now surely if I changed this (maybe with an xslt to make it automatic) so that the "ROOT" element was insterted, with an import with the sqlxml namespace defined, this would allow validation?

Something like what you describe below but with the

<sequence>
<any />
</sequence>

replaced by my xsd contents?

I may give this a go, especially if you think it makes sense. As I am only uploading data then I only need concern myself with the <after> element.

Iain
"Christoph Schittko [MVP]" <ch************ ********@austin .rr.com> wrote in message news:OS******** ******@TK2MSFTN GP12.phx.gbl...
Iain,

The first problem defining schema for an updategram is that the root node of
an updategram is not part of the urn:schemas-microsoft-com:xml-updategram
namespace. In fact it's not part of any namespace, which makes things
already very complicated, esp. if you tried to validate content inside
<before> or <after> that wasn't part of any namespace either.

Microsoft could publish a schema that defines schema types for <before> and
<after>, but those schemas would be extremely lose. At best it could be
something like:

<complexType name="updgType" >
<sequence minOccurs="0" maxOccurs="unbo unded">
<element name="before" type="beforeTyp e"/>
<element name="after" type="afterType " />
<sequence>
</complexType>

<complexType name="beforeTyp e">
<sequence>
<any />
</sequence>
</complexType>

<complexType name="afterType ">
<sequence>
<any />
</sequence>
<attribute name="returnid" type="string" />
</complexType>

Now you still don't have a schema that you can validate against. You could
define a schema that defines the ROOT element (and possible all other
content that's not part of the namespacem but that is still not solving your
problem.

Another issue you have now are the id, at-identity and guid attributes from
the updategram namespace. If your <before> and <after> elements contain
content that is bound to a namespace then you need to extend that schema to
allow all element content to have these attributes, otherwise you could not
validate the content of the updategram against the schemas that define the
content.

Does this help clearing things up a little bit?
--
HTH
Christoph Schittko [MVP, XmlInsider]
Software Architect, .NET Mentor


Nov 12 '05 #6
I'm gonna have to try it.

Bear in mind that I am NOT looking for a general solution: I KNOW that I
have no before content and I can control my namespace if need be - and I've
already transformed my input from some more general XML to the subset of the
dialect which SQLXML likes.

I'll let you know as and when and if I get anywhere!

Thanks!

Iain
"Christoph Schittko [MVP]" <ch************ ********@austin .rr.com> wrote in
message news:eJ******** ******@TK2MSFTN GP10.phx.gbl...
If you were to add a definition for a ROOT element to the schema then that
ROOT element would belong to the http://DOD.COM/Disks namespace. I seem to
remember that updategrams work regardless what namespace the ROOT element
belongs to because an updategram is a specialized case of a SQLXML template.
I am not sure about this though. It's for you to try that out. ;)

You you need to define the root type to have zero or more <before><afte r>
groups :
<schema targetNamespace ="urn:schema s-microsoft-com:mapping-schema"
xmlns="http://www.w3.org/2001/XMLSchema">
<complexType name="updgType" >
<sequence minOccurs="0" maxOccurs="unbo unded">
<element name="before" type="beforeTyp e" minOccurs="0" maxOccurs="1"/>
<element name="after" type="afterType " minOccurs="0" maxOccurs="1"/>
<sequence>
</complexType>

<complexType name="beforeTyp e">
<sequence>
<any /> <!-- no validation possible -->
</sequence>
</complexType>

<complexType name="afterType ">
<sequence>
<any /> <!-- no validation possible -->
</sequence>
<attribute name="returnid" type="string" />
</complexType>

</schema>

<schema xmlns:disk="htt p://DOD.COM/Disks"
targetNamespace ="http://DOD.COM/Disks"
xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:sql="urn: schemas-microsoft-com:mapping-schema">

<element name="ROOT" type="sql:updgT ype" />

That's the first problem solved, but now it gets harder. You need to define
the content the ROOT element. You could go with the types I dummied up in my
previous post but the benefits of validating against that schema are
marginal. You ensure that the ROOT element has groups of <before><afte r>
elements, where either one of them can be optional. You are not able to
validate the content inside the <before> or <after> elements because the
urn:schemas-microsoft-com:mapping-schema namespace cannot know anything
about any application specific schemas and has to define both types as
completely open:

<element name="before">
<complexType>
<sequence>
<any namespace="##an y" minOccurs="0" maxOccurs="unbo unded"/>
</sequence>
</complexType>
</element>

You can't "forward declare" elements and types like you can in programming
languages like C++. Even of you tried to define your own custom schema for
the urn:schemas-microsoft-com:mapping-schema namespace that only your
application uses to validate updategrams like this:

<element name="before">
<complexType>
<sequence>
<any namespace="http ://DOD.COM/Disks" minOccurs="0" maxOccurs="unbo unded"/>
</sequence>
</complexType>
</element>

I don't believe you couldn't solve that problem. You would introduce a
circular dependency and if I read the XML Schema spec [0] right then this is
not allowed.

The id, at-identity and guid attributes pose another probem. Updategrams
define the to propagating automatically generated @@IDENTITY values You can
define them in an attributeGroup in the schema for the mapping schema
namespace:

<attributeGroup >
<attribute name="id" type="int" />
<attribute name="at-identity" type="string" />
<attribute name="guid" type="string" />
</attributeGroup>

However, these attributes need to occur on the elements in the XML that you
are inserting. Therefore you need to CHANGE(!) your application's schema to
make these attributes schema legal on every element where you need expect
them to let SQLXML know about @@IDENTITY values. Remember though, that this
is probably pointless, since you probably can't build a schema that will
validate the types from your schema because of the circular reference
problem.

Regardless how you order the two schemas, you will always have a circular
reference problem. The mapping-schema schema needs to know about your
application's schema's namespace to enable validation of the content of the
<before> and <after> element and the application's schema needs to know
about the attributeGroup for inserting into tables with @@IDENTITY columns.
Avoiding the circular reference with wildcard content renders a schema will
not allow reasonable validation of updategrams.

I hope this post makes sense.
--
HTH
Christoph Schittko [MVP, XmlInsider]
Software Architect, .NET Mentor
Nov 12 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1260
by: marcum williams | last post by:
Below I'm generating an updategram via xslt and currently referencing schema via <updg:sync mapping-schema="hpXSD.xsd"> .... </updg:sync> But I would like to LOAD the .xsd schema into memory and APPLY to the updategram in memory. Tried using XmlValidatingReader but couldn't get it to work. Thanks
6
5793
by: Alex Bink | last post by:
Hi, I have a validating event on a textbox in which I want to prevent the user to leave the textbox without entering the right data. Only if he clicks on another specific control he is allowed to leave the textbox without entering the right information. Is there a way to determine which other control was clicked in the validating event of the textbox? Thanks
0
1550
by: Joe | last post by:
Hi For a while now I have been finding postings of problems with the validating event not firing on controls properly. I too had this problem. The event would fire when clicking on another control which had it's causes validation property set to true however if I tabbed on to this control the event wouldn't fire. So after playing around with my code I figured out how to get it to work. I am not sure what the reason behind it is but it...
2
2125
by: Chris Dunaway | last post by:
I have a form with a textbox and numerous panels, buttons and other controls. I have handled the textbox Validating and Validated events. The textbox will hold a filename. In the validating event, I check that the string in the textbox is a file that exists or whether or not the string is blank and display a message box in either case. I also call e.Cancel so that the value will be corrected. However, certain buttons on the form...
0
2464
by: Matthew | last post by:
All, I have searched google and the newsgroups but can't find anything the same as what I am experiencing (though I may have missed something). I have controls (textboxes) within UserControls which are not behaving as I would expect. Specifically, if there is a command button external to the usercontrol which is activated by a shortcut key (eg Alt-B), the command button Click event handler code 'executes' even though the textbox set...
0
2435
by: Gary Shell | last post by:
I am experiencing some strange behavior between a UserControl's validating event and a treeview control. Initially, I thought it was related to an issue in the Knowledgebase article 810852 (http://support.microsoft.com/kb/810852), but then I realized that the hotfix mentioned was in .Net v1.1, which I am using. I took the sample from that article and recreated the situation I see in my application. (Code included below.) If you run the...
21
9182
by: Darin | last post by:
I have a form w/ a textbox and Cancel button on it. I have a routine to handle textbox.validating, and I have the form setup so the Cancel button is the Cancel button. WHen the user clicks on the cancel button, the textbox.validating is being called. I don't want it to be since they are exiting the screen the validation doesn't have to be done. How can I do that.
4
2477
by: easoftware | last post by:
I am using VS .Net 2003 and VB. I have an app with one parent and two Mdi child forms. I need to validate data in the Mdi form. The Form.Validating event works when I try to close a Mdi form, but not when I try to switch form one Mdi form to the other. I tried to add code to MdiForm1's Deactivate event: Private Sub MidForm1_Deactivate(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Deactivate Dim TempE As...
3
2794
by: TheSteph | last post by:
Hi Experts ! I have a Winform Program in C# / .NET 2.0 I would like to ensure that a value in a TextBox is a valid Int32 when user get out of it (TextBox loose focus)
0
8721
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8642
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9209
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8964
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8918
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7804
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4400
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3085
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2024
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.