Hi Beth,
I am afraid datatype won't help you much. If you really need to check the
nature of your node, the only way that I know of is to load you schema as a
separate document from your code and to check through that. This is not
straight forward, if you can avoid it...
Why don't you pick a naming convention, such as all boolean nodes starts by
"b"
Hope that it helps.
Regards,
Franck Dauché
> I'm struggling with trying to get some Booleans in my schema to behave
> correctly. It seems that when I declare the node like this:
[quoted text clipped - 11 lines]
>
> Beth A.
BethA - 27 Dec 2005 15:05 GMT
The nodes in question are boolean in the schema. The problem comes up when I
declare a node in VB.net and assign it to this node (while the boolean is
empty), the declared node has a null datatype and I get an error that it
can't be converted to boolean. I'm going to try it again, first giving those
fields a default value.
Beth A.
> Hi Beth,
>
[quoted text clipped - 26 lines]
> >
> > Beth A.
BethA - 27 Dec 2005 15:16 GMT
I really meant that I would required the field to not be blank. That didn't
make a difference. I still get an error at the line:
oOnDSNNode.nodeTypedValue = mDSN
where mDSN is a boolean variable - I get the error:
Cast from type 'DBNull' to type 'Boolean' is not valid.
Any ideas?
Thanks,
Beth
Franck Dauché - 27 Dec 2005 15:16 GMT
How are you assigning the value? .text = "true"?
Regards,
Franck Dauché
> The nodes in question are boolean in the schema. The problem comes up when I
> declare a node in VB.net and assign it to this node (while the boolean is
[quoted text clipped - 34 lines]
> > >
> > > Beth A.
BethA - 28 Dec 2005 16:23 GMT
I have a boolean variable mDSN that I want to assign to the nodetypedvalue
property of the node:
oOnDSNNode.nodeTypedValue = mDSN
That's when I get the error. The node oOnDSNNode seems to be assigned to the
correct thing.
I think the problem may have started when I changed the original field from
boolean to text and then back to boolean. (I was having a problem with the
boolean field getting a -1 assigned for true.) Now I need to get this working!
Thanks,
Beth