error-handling Chart component

H

henri korver

Hello,

I am using OWC 11.0 for the very useful chart components. Is there a way to turn off error-messages that are generated from this component internally. I give an example to explain my problem in more detail. Normally I use the (in)famous

ON ERROR RESUME NEXT

statement to prevent users getting confronted with ugly error messages on their screen. Unforntunately the following code sample does not catch all error messages.

On Error Resume Next
ChartSpace1.ConnectionString = "Provider=MSPersist.1"
ChartSpace1.CommandText = "http://server/data.xml"

Apparantly the ChartSpace1 object generates internal error-messages that can not be trapped in the surrounding VB code. Now my question is: Is there a way to tell the object to switch-off error messages.

Many thanks if somebody has a helpful hint.

Henri Korver
 
H

henri korver

We are trying to build a real-time monitor tool for monitoring our websites with the chart component. With a timer event we refresh our charts every second. In this situation it seems that we are facing the limits of the chart component.

There were several error messages which I came across that could not be catched

- Service error
- Data Provider or other Service returned E-Fail status
- Stream object cannot be read because it is empty, ....

They are all generated from the Office Data Source Control which is apparantly embedded somewhere inside the Chart component. By saving the code below in a .htm file one can reconstruct my problem.


<object id=ChartSpace1 classid=CLSID:0002E55D-0000-0000-C000-000000000046 style="width:100%;height:350"></object>

<script language=vbs>
On Error Resume Next
ChartSpace1.ConnectionString = "Provider=MSPersist.1"
ChartSpace1.CommandText = "C:\data.xml"

ChartSpace1.SetData chDimValues, chDataBound, "pageviews"

Set f = CreateObject("Scripting.FileSystemObject")
Set t = f.OpenTextFile("C:\data.xml", 2, 0)
t.Write ("")

ChartSpace1.Refresh
</script>

IMPORTANT: before running this code first put the file 'data.xml' in de C: directory. The XML code of this file is given below. It is a pardox, but to reconstruct the error one has to start with a proper XML file.


------------------ cut here
<xml xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema">
<s:Schema id="RowsetSchema">
<s:ElementType name="row" content="eltOnly" rs:CommandTimeout="30">
<s:AttributeType name="pageviews" rs:number="3" rs:nullable="true" rs:writeunknown="true">
<s:datatype dt:type="int" dt:maxLength="4" rs:precision="10" rs:fixedlength="true"/>
</s:AttributeType>
<s:extends type="rs:rowbase"/>
</s:ElementType>
</s:Schema>
<rs:data>
<z:row EditionName="The edition" minute="19:52" pageviews="5"/>
</rs:data>
</xml>
-------------------------------

Alvin Bruney said:
this may be a bug. what is the error message?

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
henri korver said:
Hello,

I am using OWC 11.0 for the very useful chart components. Is there a way
to turn off error-messages that are generated from this component
internally. I give an example to explain my problem in more detail.
Normally I use the (in)famous

ON ERROR RESUME NEXT

statement to prevent users getting confronted with ugly error messages on
their screen. Unforntunately the following code sample does not catch all
error messages.

On Error Resume Next
ChartSpace1.ConnectionString = "Provider=MSPersist.1"
ChartSpace1.CommandText = "http://server/data.xml"

Apparantly the ChartSpace1 object generates internal error-messages that
can not be trapped in the surrounding VB code. Now my question is: Is
there a way to tell the object to switch-off error messages.

Many thanks if somebody has a helpful hint.

Henri Korver
 
A

Alvin Bruney [MVP]

Loads quite fine for me. No errors. Maybe your problem lies elsewhere

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
henri korver said:
We are trying to build a real-time monitor tool for monitoring our
websites with the chart component. With a timer event we refresh our
charts every second. In this situation it seems that we are facing the
limits of the chart component.

There were several error messages which I came across that could not be
catched

- Service error
- Data Provider or other Service returned E-Fail status
- Stream object cannot be read because it is empty, ....

They are all generated from the Office Data Source Control which is
apparantly embedded somewhere inside the Chart component. By saving the
code below in a .htm file one can reconstruct my problem.


<object id=ChartSpace1 classid=CLSID:0002E55D-0000-0000-C000-000000000046
style="width:100%;height:350"></object>

<script language=vbs>
On Error Resume Next
ChartSpace1.ConnectionString = "Provider=MSPersist.1"
ChartSpace1.CommandText = "C:\data.xml"

ChartSpace1.SetData chDimValues, chDataBound, "pageviews"

Set f = CreateObject("Scripting.FileSystemObject")
Set t = f.OpenTextFile("C:\data.xml", 2, 0)
t.Write ("")

ChartSpace1.Refresh
</script>

IMPORTANT: before running this code first put the file 'data.xml' in de
C: directory. The XML code of this file is given below. It is a pardox,
but to reconstruct the error one has to start with a proper XML file.


------------------ cut here
<xml xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882"
xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"
xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema">
<s:Schema id="RowsetSchema">
<s:ElementType name="row" content="eltOnly" rs:CommandTimeout="30">
<s:AttributeType name="pageviews" rs:number="3" rs:nullable="true"
rs:writeunknown="true">
<s:datatype dt:type="int" dt:maxLength="4" rs:precision="10"
rs:fixedlength="true"/>
</s:AttributeType>
<s:extends type="rs:rowbase"/>
</s:ElementType>
</s:Schema>
<rs:data>
<z:row EditionName="The edition" minute="19:52" pageviews="5"/>
</rs:data>
</xml>
-------------------------------

Alvin Bruney said:
this may be a bug. what is the error message?

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
henri korver said:
Hello,

I am using OWC 11.0 for the very useful chart components. Is there a
way
to turn off error-messages that are generated from this component
internally. I give an example to explain my problem in more detail.
Normally I use the (in)famous

ON ERROR RESUME NEXT

statement to prevent users getting confronted with ugly error messages
on
their screen. Unforntunately the following code sample does not catch
all
error messages.

On Error Resume Next
ChartSpace1.ConnectionString = "Provider=MSPersist.1"
ChartSpace1.CommandText = "http://server/data.xml"

Apparantly the ChartSpace1 object generates internal error-messages
that
can not be trapped in the surrounding VB code. Now my question is: Is
there a way to tell the object to switch-off error messages.

Many thanks if somebody has a helpful hint.

Henri Korver
 
A

Alvin Bruney [MVP]

provide me with an expanded data.xml file and the full script including the
timer. tell me what you expect to see in the table and what errors are
coming thru. i'll take another look

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
Alvin Bruney said:
Loads quite fine for me. No errors. Maybe your problem lies elsewhere

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
henri korver said:
We are trying to build a real-time monitor tool for monitoring our
websites with the chart component. With a timer event we refresh our
charts every second. In this situation it seems that we are facing the
limits of the chart component.

There were several error messages which I came across that could not be
catched

- Service error
- Data Provider or other Service returned E-Fail status
- Stream object cannot be read because it is empty, ....

They are all generated from the Office Data Source Control which is
apparantly embedded somewhere inside the Chart component. By saving the
code below in a .htm file one can reconstruct my problem.


<object id=ChartSpace1 classid=CLSID:0002E55D-0000-0000-C000-000000000046
style="width:100%;height:350"></object>

<script language=vbs>
On Error Resume Next
ChartSpace1.ConnectionString = "Provider=MSPersist.1"
ChartSpace1.CommandText = "C:\data.xml"

ChartSpace1.SetData chDimValues, chDataBound, "pageviews"

Set f = CreateObject("Scripting.FileSystemObject")
Set t = f.OpenTextFile("C:\data.xml", 2, 0)
t.Write ("")

ChartSpace1.Refresh
</script>

IMPORTANT: before running this code first put the file 'data.xml' in de
C: directory. The XML code of this file is given below. It is a pardox,
but to reconstruct the error one has to start with a proper XML file.


------------------ cut here
<xml xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882"
xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"
xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema">
<s:Schema id="RowsetSchema">
<s:ElementType name="row" content="eltOnly" rs:CommandTimeout="30">
<s:AttributeType name="pageviews" rs:number="3" rs:nullable="true"
rs:writeunknown="true">
<s:datatype dt:type="int" dt:maxLength="4" rs:precision="10"
rs:fixedlength="true"/>
</s:AttributeType>
<s:extends type="rs:rowbase"/>
</s:ElementType>
</s:Schema>
<rs:data>
<z:row EditionName="The edition" minute="19:52" pageviews="5"/>
</rs:data>
</xml>
-------------------------------

Alvin Bruney said:
this may be a bug. what is the error message?

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
Hello,

I am using OWC 11.0 for the very useful chart components. Is there a
way
to turn off error-messages that are generated from this component
internally. I give an example to explain my problem in more detail.
Normally I use the (in)famous

ON ERROR RESUME NEXT

statement to prevent users getting confronted with ugly error messages
on
their screen. Unforntunately the following code sample does not catch
all
error messages.

On Error Resume Next
ChartSpace1.ConnectionString = "Provider=MSPersist.1"
ChartSpace1.CommandText = "http://server/data.xml"

Apparantly the ChartSpace1 object generates internal error-messages
that
can not be trapped in the surrounding VB code. Now my question is: Is
there a way to tell the object to switch-off error messages.

Many thanks if somebody has a helpful hint.

Henri Korver
 
H

henri korver

Are you sure that your first saved the 'data.xml' to your c:\ drive before running the code?

And also before running the sample code please check that you saved the xml correctly by manually opening this file in you internet browser. You should see the expanded version. Then you are sure there were no copy and paste errors.

NOTE: my problem only shows up when the xml file is first properly loaded into the object and then is changed run-time. If the xml is already loaded incorrectly from start than VB is able to catch the error

Note that after you have run the sample code the data.xml is empty. If you then want to reconstruct the error again, you first have to fill the data.xml file again with the XML.

Alvin Bruney said:
Loads quite fine for me. No errors. Maybe your problem lies elsewhere

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
henri korver said:
We are trying to build a real-time monitor tool for monitoring our
websites with the chart component. With a timer event we refresh our
charts every second. In this situation it seems that we are facing the
limits of the chart component.

There were several error messages which I came across that could not be
catched

- Service error
- Data Provider or other Service returned E-Fail status
- Stream object cannot be read because it is empty, ....

They are all generated from the Office Data Source Control which is
apparantly embedded somewhere inside the Chart component. By saving the
code below in a .htm file one can reconstruct my problem.


<object id=ChartSpace1 classid=CLSID:0002E55D-0000-0000-C000-000000000046
style="width:100%;height:350"></object>

<script language=vbs>
On Error Resume Next
ChartSpace1.ConnectionString = "Provider=MSPersist.1"
ChartSpace1.CommandText = "C:\data.xml"

ChartSpace1.SetData chDimValues, chDataBound, "pageviews"

Set f = CreateObject("Scripting.FileSystemObject")
Set t = f.OpenTextFile("C:\data.xml", 2, 0)
t.Write ("")

ChartSpace1.Refresh
</script>

IMPORTANT: before running this code first put the file 'data.xml' in de
C: directory. The XML code of this file is given below. It is a pardox,
but to reconstruct the error one has to start with a proper XML file.


------------------ cut here
<xml xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882"
xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"
xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema">
<s:Schema id="RowsetSchema">
<s:ElementType name="row" content="eltOnly" rs:CommandTimeout="30">
<s:AttributeType name="pageviews" rs:number="3" rs:nullable="true"
rs:writeunknown="true">
<s:datatype dt:type="int" dt:maxLength="4" rs:precision="10"
rs:fixedlength="true"/>
</s:AttributeType>
<s:extends type="rs:rowbase"/>
</s:ElementType>
</s:Schema>
<rs:data>
<z:row EditionName="The edition" minute="19:52" pageviews="5"/>
</rs:data>
</xml>
-------------------------------

Alvin Bruney said:
this may be a bug. what is the error message?

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
Hello,

I am using OWC 11.0 for the very useful chart components. Is there a
way
to turn off error-messages that are generated from this component
internally. I give an example to explain my problem in more detail.
Normally I use the (in)famous

ON ERROR RESUME NEXT

statement to prevent users getting confronted with ugly error messages
on
their screen. Unforntunately the following code sample does not catch
all
error messages.

On Error Resume Next
ChartSpace1.ConnectionString = "Provider=MSPersist.1"
ChartSpace1.CommandText = "http://server/data.xml"

Apparantly the ChartSpace1 object generates internal error-messages
that
can not be trapped in the surrounding VB code. Now my question is: Is
there a way to tell the object to switch-off error messages.

Many thanks if somebody has a helpful hint.

Henri Korver
 
H

henri korver

Are you sure that your first saved the 'data.xml' to your c:\ drive before running the code?

And also before running the sample code please check that you saved the xml correctly by manually opening this file in you internet browser. You should see the expanded version. Then you are sure there were no copy and paste errors.

NOTE: my problem only shows up when the xml file is first properly loaded into the object and then is changed run-time. If the xml is already loaded incorrectly from start than VB is able to catch the error

After you have run the sample code the data.xml is empty. If you then want to reconstruct the error again, you first have to fill the data.xml file again with the XML.

Alvin Bruney said:
Loads quite fine for me. No errors. Maybe your problem lies elsewhere

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
henri korver said:
We are trying to build a real-time monitor tool for monitoring our
websites with the chart component. With a timer event we refresh our
charts every second. In this situation it seems that we are facing the
limits of the chart component.

There were several error messages which I came across that could not be
catched

- Service error
- Data Provider or other Service returned E-Fail status
- Stream object cannot be read because it is empty, ....

They are all generated from the Office Data Source Control which is
apparantly embedded somewhere inside the Chart component. By saving the
code below in a .htm file one can reconstruct my problem.


<object id=ChartSpace1 classid=CLSID:0002E55D-0000-0000-C000-000000000046
style="width:100%;height:350"></object>

<script language=vbs>
On Error Resume Next
ChartSpace1.ConnectionString = "Provider=MSPersist.1"
ChartSpace1.CommandText = "C:\data.xml"

ChartSpace1.SetData chDimValues, chDataBound, "pageviews"

Set f = CreateObject("Scripting.FileSystemObject")
Set t = f.OpenTextFile("C:\data.xml", 2, 0)
t.Write ("")

ChartSpace1.Refresh
</script>

IMPORTANT: before running this code first put the file 'data.xml' in de
C: directory. The XML code of this file is given below. It is a pardox,
but to reconstruct the error one has to start with a proper XML file.


------------------ cut here
<xml xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882"
xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"
xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema">
<s:Schema id="RowsetSchema">
<s:ElementType name="row" content="eltOnly" rs:CommandTimeout="30">
<s:AttributeType name="pageviews" rs:number="3" rs:nullable="true"
rs:writeunknown="true">
<s:datatype dt:type="int" dt:maxLength="4" rs:precision="10"
rs:fixedlength="true"/>
</s:AttributeType>
<s:extends type="rs:rowbase"/>
</s:ElementType>
</s:Schema>
<rs:data>
<z:row EditionName="The edition" minute="19:52" pageviews="5"/>
</rs:data>
</xml>
-------------------------------

Alvin Bruney said:
this may be a bug. what is the error message?

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
Hello,

I am using OWC 11.0 for the very useful chart components. Is there a
way
to turn off error-messages that are generated from this component
internally. I give an example to explain my problem in more detail.
Normally I use the (in)famous

ON ERROR RESUME NEXT

statement to prevent users getting confronted with ugly error messages
on
their screen. Unforntunately the following code sample does not catch
all
error messages.

On Error Resume Next
ChartSpace1.ConnectionString = "Provider=MSPersist.1"
ChartSpace1.CommandText = "http://server/data.xml"

Apparantly the ChartSpace1 object generates internal error-messages
that
can not be trapped in the surrounding VB code. Now my question is: Is
there a way to tell the object to switch-off error messages.

Many thanks if somebody has a helpful hint.

Henri Korver
 
H

henri korver

Are you sure that your first saved the 'data.xml' to your c:\ drive before running the code?

And also before running the sample code please check that you saved the xml correctly by manually opening this file in you internet browser. You should see the expanded version. Then you are sure there were no copy and paste errors.

NOTE: my problem only shows up when the xml file is first properly loaded into the object and then is changed run-time. If the xml is already loaded incorrectly from start than VB is able to catch the error

After you have run the sample code the data.xml is empty. If you then want to reconstruct the error again, you first have to fill the data.xml file again with the XML.

PS Our monitor tool with the timers is written in VB6 (not in VBS). In that situation the errors only show up once an hour. Therefore I created this little code sample to share our problem with the newsgroup

Alvin Bruney said:
provide me with an expanded data.xml file and the full script including the
timer. tell me what you expect to see in the table and what errors are
coming thru. i'll take another look

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
Alvin Bruney said:
Loads quite fine for me. No errors. Maybe your problem lies elsewhere

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
henri korver said:
We are trying to build a real-time monitor tool for monitoring our
websites with the chart component. With a timer event we refresh our
charts every second. In this situation it seems that we are facing the
limits of the chart component.

There were several error messages which I came across that could not be
catched

- Service error
- Data Provider or other Service returned E-Fail status
- Stream object cannot be read because it is empty, ....

They are all generated from the Office Data Source Control which is
apparantly embedded somewhere inside the Chart component. By saving the
code below in a .htm file one can reconstruct my problem.


<object id=ChartSpace1 classid=CLSID:0002E55D-0000-0000-C000-000000000046
style="width:100%;height:350"></object>

<script language=vbs>
On Error Resume Next
ChartSpace1.ConnectionString = "Provider=MSPersist.1"
ChartSpace1.CommandText = "C:\data.xml"

ChartSpace1.SetData chDimValues, chDataBound, "pageviews"

Set f = CreateObject("Scripting.FileSystemObject")
Set t = f.OpenTextFile("C:\data.xml", 2, 0)
t.Write ("")

ChartSpace1.Refresh
</script>

IMPORTANT: before running this code first put the file 'data.xml' in de
C: directory. The XML code of this file is given below. It is a pardox,
but to reconstruct the error one has to start with a proper XML file.


------------------ cut here
<xml xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882"
xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"
xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema">
<s:Schema id="RowsetSchema">
<s:ElementType name="row" content="eltOnly" rs:CommandTimeout="30">
<s:AttributeType name="pageviews" rs:number="3" rs:nullable="true"
rs:writeunknown="true">
<s:datatype dt:type="int" dt:maxLength="4" rs:precision="10"
rs:fixedlength="true"/>
</s:AttributeType>
<s:extends type="rs:rowbase"/>
</s:ElementType>
</s:Schema>
<rs:data>
<z:row EditionName="The edition" minute="19:52" pageviews="5"/>
</rs:data>
</xml>
-------------------------------

:

this may be a bug. what is the error message?

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
Hello,

I am using OWC 11.0 for the very useful chart components. Is there a
way
to turn off error-messages that are generated from this component
internally. I give an example to explain my problem in more detail.
Normally I use the (in)famous

ON ERROR RESUME NEXT

statement to prevent users getting confronted with ugly error messages
on
their screen. Unforntunately the following code sample does not catch
all
error messages.

On Error Resume Next
ChartSpace1.ConnectionString = "Provider=MSPersist.1"
ChartSpace1.CommandText = "http://server/data.xml"

Apparantly the ChartSpace1 object generates internal error-messages
that
can not be trapped in the surrounding VB code. Now my question is: Is
there a way to tell the object to switch-off error messages.

Many thanks if somebody has a helpful hint.

Henri Korver
 
H

henri korver

did you give it another try reconstructing my problem? It is very important for us. If we cannont catch error-messages from the chart component then our monitor tool development is at risc and we may be forced to look for another component.

As you know our monitor tool refreshes every second and has to be up and running 7x24 and we have to be able to catch all unexpected errors.



henri korver said:
Are you sure that your first saved the 'data.xml' to your c:\ drive before running the code?

And also before running the sample code please check that you saved the xml correctly by manually opening this file in you internet browser. You should see the expanded version. Then you are sure there were no copy and paste errors.

NOTE: my problem only shows up when the xml file is first properly loaded into the object and then is changed run-time. If the xml is already loaded incorrectly from start than VB is able to catch the error

After you have run the sample code the data.xml is empty. If you then want to reconstruct the error again, you first have to fill the data.xml file again with the XML.

Alvin Bruney said:
Loads quite fine for me. No errors. Maybe your problem lies elsewhere

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
henri korver said:
We are trying to build a real-time monitor tool for monitoring our
websites with the chart component. With a timer event we refresh our
charts every second. In this situation it seems that we are facing the
limits of the chart component.

There were several error messages which I came across that could not be
catched

- Service error
- Data Provider or other Service returned E-Fail status
- Stream object cannot be read because it is empty, ....

They are all generated from the Office Data Source Control which is
apparantly embedded somewhere inside the Chart component. By saving the
code below in a .htm file one can reconstruct my problem.


<object id=ChartSpace1 classid=CLSID:0002E55D-0000-0000-C000-000000000046
style="width:100%;height:350"></object>

<script language=vbs>
On Error Resume Next
ChartSpace1.ConnectionString = "Provider=MSPersist.1"
ChartSpace1.CommandText = "C:\data.xml"

ChartSpace1.SetData chDimValues, chDataBound, "pageviews"

Set f = CreateObject("Scripting.FileSystemObject")
Set t = f.OpenTextFile("C:\data.xml", 2, 0)
t.Write ("")

ChartSpace1.Refresh
</script>

IMPORTANT: before running this code first put the file 'data.xml' in de
C: directory. The XML code of this file is given below. It is a pardox,
but to reconstruct the error one has to start with a proper XML file.


------------------ cut here
<xml xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882"
xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"
xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema">
<s:Schema id="RowsetSchema">
<s:ElementType name="row" content="eltOnly" rs:CommandTimeout="30">
<s:AttributeType name="pageviews" rs:number="3" rs:nullable="true"
rs:writeunknown="true">
<s:datatype dt:type="int" dt:maxLength="4" rs:precision="10"
rs:fixedlength="true"/>
</s:AttributeType>
<s:extends type="rs:rowbase"/>
</s:ElementType>
</s:Schema>
<rs:data>
<z:row EditionName="The edition" minute="19:52" pageviews="5"/>
</rs:data>
</xml>
-------------------------------

:

this may be a bug. what is the error message?

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
Hello,

I am using OWC 11.0 for the very useful chart components. Is there a
way
to turn off error-messages that are generated from this component
internally. I give an example to explain my problem in more detail.
Normally I use the (in)famous

ON ERROR RESUME NEXT

statement to prevent users getting confronted with ugly error messages
on
their screen. Unforntunately the following code sample does not catch
all
error messages.

On Error Resume Next
ChartSpace1.ConnectionString = "Provider=MSPersist.1"
ChartSpace1.CommandText = "http://server/data.xml"

Apparantly the ChartSpace1 object generates internal error-messages
that
can not be trapped in the surrounding VB code. Now my question is: Is
there a way to tell the object to switch-off error messages.

Many thanks if somebody has a helpful hint.

Henri Korver
 
A

Alvin Bruney [MVP]

the file would not load from c:\data.xml, i changed it to a relative path
and it loaded quite nicely. I was satisfied. This is the reason i asked for
more information.

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
henri korver said:
did you give it another try reconstructing my problem? It is very
important for us. If we cannont catch error-messages from the chart
component then our monitor tool development is at risc and we may be
forced to look for another component.

As you know our monitor tool refreshes every second and has to be up and
running 7x24 and we have to be able to catch all unexpected errors.



henri korver said:
Are you sure that your first saved the 'data.xml' to your c:\ drive
before running the code?

And also before running the sample code please check that you saved the
xml correctly by manually opening this file in you internet browser. You
should see the expanded version. Then you are sure there were no copy and
paste errors.

NOTE: my problem only shows up when the xml file is first properly loaded
into the object and then is changed run-time. If the xml is already
loaded incorrectly from start than VB is able to catch the error

After you have run the sample code the data.xml is empty. If you then
want to reconstruct the error again, you first have to fill the data.xml
file again with the XML.

Alvin Bruney said:
Loads quite fine for me. No errors. Maybe your problem lies elsewhere

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
We are trying to build a real-time monitor tool for monitoring our
websites with the chart component. With a timer event we refresh our
charts every second. In this situation it seems that we are facing
the
limits of the chart component.

There were several error messages which I came across that could not
be
catched

- Service error
- Data Provider or other Service returned E-Fail status
- Stream object cannot be read because it is empty, ....

They are all generated from the Office Data Source Control which is
apparantly embedded somewhere inside the Chart component. By saving
the
code below in a .htm file one can reconstruct my problem.


<object id=ChartSpace1
classid=CLSID:0002E55D-0000-0000-C000-000000000046
style="width:100%;height:350"></object>

<script language=vbs>
On Error Resume Next
ChartSpace1.ConnectionString = "Provider=MSPersist.1"
ChartSpace1.CommandText = "C:\data.xml"

ChartSpace1.SetData chDimValues, chDataBound, "pageviews"

Set f = CreateObject("Scripting.FileSystemObject")
Set t = f.OpenTextFile("C:\data.xml", 2, 0)
t.Write ("")

ChartSpace1.Refresh
</script>

IMPORTANT: before running this code first put the file 'data.xml' in
de
C: directory. The XML code of this file is given below. It is a
pardox,
but to reconstruct the error one has to start with a proper XML file.


------------------ cut here
<xml xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882"
xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"
xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema">
<s:Schema id="RowsetSchema">
<s:ElementType name="row" content="eltOnly" rs:CommandTimeout="30">
<s:AttributeType name="pageviews" rs:number="3" rs:nullable="true"
rs:writeunknown="true">
<s:datatype dt:type="int" dt:maxLength="4" rs:precision="10"
rs:fixedlength="true"/>
</s:AttributeType>
<s:extends type="rs:rowbase"/>
</s:ElementType>
</s:Schema>
<rs:data>
<z:row EditionName="The edition" minute="19:52" pageviews="5"/>
</rs:data>
</xml>
-------------------------------

:

this may be a bug. what is the error message?

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
message
Hello,

I am using OWC 11.0 for the very useful chart components. Is there
a
way
to turn off error-messages that are generated from this component
internally. I give an example to explain my problem in more
detail.
Normally I use the (in)famous

ON ERROR RESUME NEXT

statement to prevent users getting confronted with ugly error
messages
on
their screen. Unforntunately the following code sample does not
catch
all
error messages.

On Error Resume Next
ChartSpace1.ConnectionString = "Provider=MSPersist.1"
ChartSpace1.CommandText = "http://server/data.xml"

Apparantly the ChartSpace1 object generates internal
error-messages
that
can not be trapped in the surrounding VB code. Now my question is:
Is
there a way to tell the object to switch-off error messages.

Many thanks if somebody has a helpful hint.

Henri Korver
 
A

Alvin Bruney [MVP]

hartSpace1.ConnectionString = "Provider=MSPersist.1" ChartSpace1.CommandText
= "data.xml" ChartSpace1.SetData chDimValues, chDataBound, "pageviews" Set f
= CreateObject("Scripting.FileSystemObject") Set t =
f.OpenTextFile("data.xml", 2, 0) t.Write ("")

the exact file path would be http://localhost/bugtest/data.xml

putting the file in c: drive is not expected to work since the worker
process does not normally have rights to the c: drive.

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
henri korver said:
Strange! What do you exactly mean by relative path?

For instance if I use a 'http" path than i also get the error, see the
sample code below (i only changed the command text)

as a matter of fact, normally I only use http paths in this context. But i
thought that a hard-coded path was easier for the newsgroup such that
people are not forced to create a virtual directory for running my sample
code.

<object id=ChartSpace1 classid=CLSID:0002E55D-0000-0000-C000-000000000046
style="width:100%;height:350"></object>

<script language=vbs>
On Error Resume Next
ChartSpace1.ConnectionString = "Provider=MSPersist.1"
ChartSpace1.CommandText = "http://localhost/XML/data.xml"

ChartSpace1.SetData chDimValues, chDataBound, "pageviews"

Set f = CreateObject("Scripting.FileSystemObject")
Set t = f.OpenTextFile("C:\data.xml", 2, 0)
t.Write ("")

ChartSpace1.Refresh
</script>

Alvin Bruney said:
the file would not load from c:\data.xml, i changed it to a relative path
and it loaded quite nicely. I was satisfied. This is the reason i asked
for
more information.

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
henri korver said:
did you give it another try reconstructing my problem? It is very
important for us. If we cannont catch error-messages from the chart
component then our monitor tool development is at risc and we may be
forced to look for another component.

As you know our monitor tool refreshes every second and has to be up
and
running 7x24 and we have to be able to catch all unexpected errors.



:

Are you sure that your first saved the 'data.xml' to your c:\ drive
before running the code?

And also before running the sample code please check that you saved
the
xml correctly by manually opening this file in you internet browser.
You
should see the expanded version. Then you are sure there were no copy
and
paste errors.

NOTE: my problem only shows up when the xml file is first properly
loaded
into the object and then is changed run-time. If the xml is already
loaded incorrectly from start than VB is able to catch the error

After you have run the sample code the data.xml is empty. If you then
want to reconstruct the error again, you first have to fill the
data.xml
file again with the XML.

:

Loads quite fine for me. No errors. Maybe your problem lies
elsewhere

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
message
We are trying to build a real-time monitor tool for monitoring our
websites with the chart component. With a timer event we refresh
our
charts every second. In this situation it seems that we are facing
the
limits of the chart component.

There were several error messages which I came across that could
not
be
catched

- Service error
- Data Provider or other Service returned E-Fail status
- Stream object cannot be read because it is empty, ....

They are all generated from the Office Data Source Control which
is
apparantly embedded somewhere inside the Chart component. By
saving
the
code below in a .htm file one can reconstruct my problem.


<object id=ChartSpace1
classid=CLSID:0002E55D-0000-0000-C000-000000000046
style="width:100%;height:350"></object>

<script language=vbs>
On Error Resume Next
ChartSpace1.ConnectionString = "Provider=MSPersist.1"
ChartSpace1.CommandText = "C:\data.xml"

ChartSpace1.SetData chDimValues, chDataBound, "pageviews"

Set f = CreateObject("Scripting.FileSystemObject")
Set t = f.OpenTextFile("C:\data.xml", 2, 0)
t.Write ("")

ChartSpace1.Refresh
</script>

IMPORTANT: before running this code first put the file 'data.xml'
in
de
C: directory. The XML code of this file is given below. It is a
pardox,
but to reconstruct the error one has to start with a proper XML
file.


------------------ cut here
<xml xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882"
xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"
xmlns:rs="urn:schemas-microsoft-com:rowset"
xmlns:z="#RowsetSchema">
<s:Schema id="RowsetSchema">
<s:ElementType name="row" content="eltOnly"
rs:CommandTimeout="30">
<s:AttributeType name="pageviews" rs:number="3" rs:nullable="true"
rs:writeunknown="true">
<s:datatype dt:type="int" dt:maxLength="4" rs:precision="10"
rs:fixedlength="true"/>
</s:AttributeType>
<s:extends type="rs:rowbase"/>
</s:ElementType>
</s:Schema>
<rs:data>
<z:row EditionName="The edition" minute="19:52" pageviews="5"/>
</rs:data>
</xml>
-------------------------------

:

this may be a bug. what is the error message?

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
message
Hello,

I am using OWC 11.0 for the very useful chart components. Is
there
a
way
to turn off error-messages that are generated from this
component
internally. I give an example to explain my problem in more
detail.
Normally I use the (in)famous

ON ERROR RESUME NEXT

statement to prevent users getting confronted with ugly error
messages
on
their screen. Unforntunately the following code sample does not
catch
all
error messages.

On Error Resume Next
ChartSpace1.ConnectionString = "Provider=MSPersist.1"
ChartSpace1.CommandText = "http://server/data.xml"

Apparantly the ChartSpace1 object generates internal
error-messages
that
can not be trapped in the surrounding VB code. Now my question
is:
Is
there a way to tell the object to switch-off error messages.

Many thanks if somebody has a helpful hint.

Henri Korver
 
H

henri korver

fair enough, if you have right problems, I can show you the problem in another way. Run the script given below. At a certain moment a message box will pop up. Then first delete the data.xml file before clicking OK. Then I will get the error message: "The system cannot locate the resource file specified". This error is unfortunately not catched by the 'On Error Resume Next' statement.

Are you now able to reconstruct our problem?

NOTE: before running the script it is very important that the data.xml exists and is properly filled with the XML code I have sent you in earlier posts


<object id=ChartSpace1 classid=CLSID:0002E55D-0000-0000-C000-000000000046 style="width:100%;height:350"></object>
<script language=vbs>
On Error Resume Next
ChartSpace1.ConnectionString = "Provider=MSPersist.1"
ChartSpace1.CommandText = "c:\data.xml"
ChartSpace1.SetData chDimValues, chDataBound, "pageviews"
Msgbox "Delete the data.xml file before clicking OK!"
ChartSpace1.Refresh
</script>

Alvin Bruney said:
hartSpace1.ConnectionString = "Provider=MSPersist.1" ChartSpace1.CommandText
= "data.xml" ChartSpace1.SetData chDimValues, chDataBound, "pageviews" Set f
= CreateObject("Scripting.FileSystemObject") Set t =
f.OpenTextFile("data.xml", 2, 0) t.Write ("")

the exact file path would be http://localhost/bugtest/data.xml

putting the file in c: drive is not expected to work since the worker
process does not normally have rights to the c: drive.

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
henri korver said:
Strange! What do you exactly mean by relative path?

For instance if I use a 'http" path than i also get the error, see the
sample code below (i only changed the command text)

as a matter of fact, normally I only use http paths in this context. But i
thought that a hard-coded path was easier for the newsgroup such that
people are not forced to create a virtual directory for running my sample
code.

<object id=ChartSpace1 classid=CLSID:0002E55D-0000-0000-C000-000000000046
style="width:100%;height:350"></object>

<script language=vbs>
On Error Resume Next
ChartSpace1.ConnectionString = "Provider=MSPersist.1"
ChartSpace1.CommandText = "http://localhost/XML/data.xml"

ChartSpace1.SetData chDimValues, chDataBound, "pageviews"

Set f = CreateObject("Scripting.FileSystemObject")
Set t = f.OpenTextFile("C:\data.xml", 2, 0)
t.Write ("")

ChartSpace1.Refresh
</script>

Alvin Bruney said:
the file would not load from c:\data.xml, i changed it to a relative path
and it loaded quite nicely. I was satisfied. This is the reason i asked
for
more information.

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
did you give it another try reconstructing my problem? It is very
important for us. If we cannont catch error-messages from the chart
component then our monitor tool development is at risc and we may be
forced to look for another component.

As you know our monitor tool refreshes every second and has to be up
and
running 7x24 and we have to be able to catch all unexpected errors.



:

Are you sure that your first saved the 'data.xml' to your c:\ drive
before running the code?

And also before running the sample code please check that you saved
the
xml correctly by manually opening this file in you internet browser.
You
should see the expanded version. Then you are sure there were no copy
and
paste errors.

NOTE: my problem only shows up when the xml file is first properly
loaded
into the object and then is changed run-time. If the xml is already
loaded incorrectly from start than VB is able to catch the error

After you have run the sample code the data.xml is empty. If you then
want to reconstruct the error again, you first have to fill the
data.xml
file again with the XML.

:

Loads quite fine for me. No errors. Maybe your problem lies
elsewhere

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
message
We are trying to build a real-time monitor tool for monitoring our
websites with the chart component. With a timer event we refresh
our
charts every second. In this situation it seems that we are facing
the
limits of the chart component.

There were several error messages which I came across that could
not
be
catched

- Service error
- Data Provider or other Service returned E-Fail status
- Stream object cannot be read because it is empty, ....

They are all generated from the Office Data Source Control which
is
apparantly embedded somewhere inside the Chart component. By
saving
the
code below in a .htm file one can reconstruct my problem.


<object id=ChartSpace1
classid=CLSID:0002E55D-0000-0000-C000-000000000046
style="width:100%;height:350"></object>

<script language=vbs>
On Error Resume Next
ChartSpace1.ConnectionString = "Provider=MSPersist.1"
ChartSpace1.CommandText = "C:\data.xml"

ChartSpace1.SetData chDimValues, chDataBound, "pageviews"

Set f = CreateObject("Scripting.FileSystemObject")
Set t = f.OpenTextFile("C:\data.xml", 2, 0)
t.Write ("")

ChartSpace1.Refresh
</script>

IMPORTANT: before running this code first put the file 'data.xml'
in
de
C: directory. The XML code of this file is given below. It is a
pardox,
but to reconstruct the error one has to start with a proper XML
file.


------------------ cut here
<xml xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882"
xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"
xmlns:rs="urn:schemas-microsoft-com:rowset"
xmlns:z="#RowsetSchema">
<s:Schema id="RowsetSchema">
<s:ElementType name="row" content="eltOnly"
rs:CommandTimeout="30">
<s:AttributeType name="pageviews" rs:number="3" rs:nullable="true"
rs:writeunknown="true">
<s:datatype dt:type="int" dt:maxLength="4" rs:precision="10"
rs:fixedlength="true"/>
</s:AttributeType>
<s:extends type="rs:rowbase"/>
</s:ElementType>
</s:Schema>
<rs:data>
<z:row EditionName="The edition" minute="19:52" pageviews="5"/>
</rs:data>
</xml>
-------------------------------

:

this may be a bug. what is the error message?

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
message
Hello,

I am using OWC 11.0 for the very useful chart components. Is
there
a
way
to turn off error-messages that are generated from this
component
internally. I give an example to explain my problem in more
detail.
Normally I use the (in)famous

ON ERROR RESUME NEXT

statement to prevent users getting confronted with ugly error
messages
on
their screen. Unforntunately the following code sample does not
catch
all
error messages.

On Error Resume Next
ChartSpace1.ConnectionString = "Provider=MSPersist.1"
ChartSpace1.CommandText = "http://server/data.xml"

Apparantly the ChartSpace1 object generates internal
error-messages
that
can not be trapped in the surrounding VB code. Now my question
is:
Is
there a way to tell the object to switch-off error messages.

Many thanks if somebody has a helpful hint.

Henri Korver
 
A

Alvin Bruney [MVP]

There's no way to suppress this dialog box because it is coming from the OS.

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
henri korver said:
fair enough, if you have right problems, I can show you the problem in
another way. Run the script given below. At a certain moment a message box
will pop up. Then first delete the data.xml file before clicking OK. Then
I will get the error message: "The system cannot locate the resource file
specified". This error is unfortunately not catched by the 'On Error
Resume Next' statement.

Are you now able to reconstruct our problem?

NOTE: before running the script it is very important that the data.xml
exists and is properly filled with the XML code I have sent you in earlier
posts


<object id=ChartSpace1 classid=CLSID:0002E55D-0000-0000-C000-000000000046
style="width:100%;height:350"></object>
<script language=vbs>
On Error Resume Next
ChartSpace1.ConnectionString = "Provider=MSPersist.1"
ChartSpace1.CommandText = "c:\data.xml"
ChartSpace1.SetData chDimValues, chDataBound, "pageviews"
Msgbox "Delete the data.xml file before clicking OK!"
ChartSpace1.Refresh
</script>

Alvin Bruney said:
hartSpace1.ConnectionString = "Provider=MSPersist.1"
ChartSpace1.CommandText
= "data.xml" ChartSpace1.SetData chDimValues, chDataBound, "pageviews"
Set f
= CreateObject("Scripting.FileSystemObject") Set t =
f.OpenTextFile("data.xml", 2, 0) t.Write ("")

the exact file path would be http://localhost/bugtest/data.xml

putting the file in c: drive is not expected to work since the worker
process does not normally have rights to the c: drive.

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
henri korver said:
Strange! What do you exactly mean by relative path?

For instance if I use a 'http" path than i also get the error, see the
sample code below (i only changed the command text)

as a matter of fact, normally I only use http paths in this context.
But i
thought that a hard-coded path was easier for the newsgroup such that
people are not forced to create a virtual directory for running my
sample
code.

<object id=ChartSpace1
classid=CLSID:0002E55D-0000-0000-C000-000000000046
style="width:100%;height:350"></object>

<script language=vbs>
On Error Resume Next
ChartSpace1.ConnectionString = "Provider=MSPersist.1"
ChartSpace1.CommandText = "http://localhost/XML/data.xml"

ChartSpace1.SetData chDimValues, chDataBound, "pageviews"

Set f = CreateObject("Scripting.FileSystemObject")
Set t = f.OpenTextFile("C:\data.xml", 2, 0)
t.Write ("")

ChartSpace1.Refresh
</script>

:

the file would not load from c:\data.xml, i changed it to a relative
path
and it loaded quite nicely. I was satisfied. This is the reason i
asked
for
more information.

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
message
did you give it another try reconstructing my problem? It is very
important for us. If we cannont catch error-messages from the chart
component then our monitor tool development is at risc and we may be
forced to look for another component.

As you know our monitor tool refreshes every second and has to be up
and
running 7x24 and we have to be able to catch all unexpected errors.



:

Are you sure that your first saved the 'data.xml' to your c:\ drive
before running the code?

And also before running the sample code please check that you saved
the
xml correctly by manually opening this file in you internet
browser.
You
should see the expanded version. Then you are sure there were no
copy
and
paste errors.

NOTE: my problem only shows up when the xml file is first properly
loaded
into the object and then is changed run-time. If the xml is already
loaded incorrectly from start than VB is able to catch the error

After you have run the sample code the data.xml is empty. If you
then
want to reconstruct the error again, you first have to fill the
data.xml
file again with the XML.

:

Loads quite fine for me. No errors. Maybe your problem lies
elsewhere

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
message
We are trying to build a real-time monitor tool for monitoring
our
websites with the chart component. With a timer event we
refresh
our
charts every second. In this situation it seems that we are
facing
the
limits of the chart component.

There were several error messages which I came across that
could
not
be
catched

- Service error
- Data Provider or other Service returned E-Fail status
- Stream object cannot be read because it is empty, ....

They are all generated from the Office Data Source Control
which
is
apparantly embedded somewhere inside the Chart component. By
saving
the
code below in a .htm file one can reconstruct my problem.


<object id=ChartSpace1
classid=CLSID:0002E55D-0000-0000-C000-000000000046
style="width:100%;height:350"></object>

<script language=vbs>
On Error Resume Next
ChartSpace1.ConnectionString = "Provider=MSPersist.1"
ChartSpace1.CommandText = "C:\data.xml"

ChartSpace1.SetData chDimValues, chDataBound, "pageviews"

Set f = CreateObject("Scripting.FileSystemObject")
Set t = f.OpenTextFile("C:\data.xml", 2, 0)
t.Write ("")

ChartSpace1.Refresh
</script>

IMPORTANT: before running this code first put the file
'data.xml'
in
de
C: directory. The XML code of this file is given below. It is a
pardox,
but to reconstruct the error one has to start with a proper XML
file.


------------------ cut here
<xml xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882"
xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"
xmlns:rs="urn:schemas-microsoft-com:rowset"
xmlns:z="#RowsetSchema">
<s:Schema id="RowsetSchema">
<s:ElementType name="row" content="eltOnly"
rs:CommandTimeout="30">
<s:AttributeType name="pageviews" rs:number="3"
rs:nullable="true"
rs:writeunknown="true">
<s:datatype dt:type="int" dt:maxLength="4" rs:precision="10"
rs:fixedlength="true"/>
</s:AttributeType>
<s:extends type="rs:rowbase"/>
</s:ElementType>
</s:Schema>
<rs:data>
<z:row EditionName="The edition" minute="19:52" pageviews="5"/>
</rs:data>
</xml>
-------------------------------

:

this may be a bug. what is the error message?

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
in
message
Hello,

I am using OWC 11.0 for the very useful chart components. Is
there
a
way
to turn off error-messages that are generated from this
component
internally. I give an example to explain my problem in more
detail.
Normally I use the (in)famous

ON ERROR RESUME NEXT

statement to prevent users getting confronted with ugly
error
messages
on
their screen. Unforntunately the following code sample does
not
catch
all
error messages.

On Error Resume Next
ChartSpace1.ConnectionString = "Provider=MSPersist.1"
ChartSpace1.CommandText = "http://server/data.xml"

Apparantly the ChartSpace1 object generates internal
error-messages
that
can not be trapped in the surrounding VB code. Now my
question
is:
Is
there a way to tell the object to switch-off error messages.

Many thanks if somebody has a helpful hint.

Henri Korver
 
H

henri korver

so there is very less hope building a realtime monitor based upon the Microsoft chart component. That is a real pity.....

Is there any hope that the OWC developers will correct this in the short term (i.e. add a property SuppressErrorMessages in the chart component).

What should be my next steps?

Alvin Bruney said:
There's no way to suppress this dialog box because it is coming from the OS.

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
henri korver said:
fair enough, if you have right problems, I can show you the problem in
another way. Run the script given below. At a certain moment a message box
will pop up. Then first delete the data.xml file before clicking OK. Then
I will get the error message: "The system cannot locate the resource file
specified". This error is unfortunately not catched by the 'On Error
Resume Next' statement.

Are you now able to reconstruct our problem?

NOTE: before running the script it is very important that the data.xml
exists and is properly filled with the XML code I have sent you in earlier
posts


<object id=ChartSpace1 classid=CLSID:0002E55D-0000-0000-C000-000000000046
style="width:100%;height:350"></object>
<script language=vbs>
On Error Resume Next
ChartSpace1.ConnectionString = "Provider=MSPersist.1"
ChartSpace1.CommandText = "c:\data.xml"
ChartSpace1.SetData chDimValues, chDataBound, "pageviews"
Msgbox "Delete the data.xml file before clicking OK!"
ChartSpace1.Refresh
</script>

Alvin Bruney said:
hartSpace1.ConnectionString = "Provider=MSPersist.1"
ChartSpace1.CommandText
= "data.xml" ChartSpace1.SetData chDimValues, chDataBound, "pageviews"
Set f
= CreateObject("Scripting.FileSystemObject") Set t =
f.OpenTextFile("data.xml", 2, 0) t.Write ("")

the exact file path would be http://localhost/bugtest/data.xml

putting the file in c: drive is not expected to work since the worker
process does not normally have rights to the c: drive.

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
Strange! What do you exactly mean by relative path?

For instance if I use a 'http" path than i also get the error, see the
sample code below (i only changed the command text)

as a matter of fact, normally I only use http paths in this context.
But i
thought that a hard-coded path was easier for the newsgroup such that
people are not forced to create a virtual directory for running my
sample
code.

<object id=ChartSpace1
classid=CLSID:0002E55D-0000-0000-C000-000000000046
style="width:100%;height:350"></object>

<script language=vbs>
On Error Resume Next
ChartSpace1.ConnectionString = "Provider=MSPersist.1"
ChartSpace1.CommandText = "http://localhost/XML/data.xml"

ChartSpace1.SetData chDimValues, chDataBound, "pageviews"

Set f = CreateObject("Scripting.FileSystemObject")
Set t = f.OpenTextFile("C:\data.xml", 2, 0)
t.Write ("")

ChartSpace1.Refresh
</script>

:

the file would not load from c:\data.xml, i changed it to a relative
path
and it loaded quite nicely. I was satisfied. This is the reason i
asked
for
more information.

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
message
did you give it another try reconstructing my problem? It is very
important for us. If we cannont catch error-messages from the chart
component then our monitor tool development is at risc and we may be
forced to look for another component.

As you know our monitor tool refreshes every second and has to be up
and
running 7x24 and we have to be able to catch all unexpected errors.



:

Are you sure that your first saved the 'data.xml' to your c:\ drive
before running the code?

And also before running the sample code please check that you saved
the
xml correctly by manually opening this file in you internet
browser.
You
should see the expanded version. Then you are sure there were no
copy
and
paste errors.

NOTE: my problem only shows up when the xml file is first properly
loaded
into the object and then is changed run-time. If the xml is already
loaded incorrectly from start than VB is able to catch the error

After you have run the sample code the data.xml is empty. If you
then
want to reconstruct the error again, you first have to fill the
data.xml
file again with the XML.

:

Loads quite fine for me. No errors. Maybe your problem lies
elsewhere

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
message
We are trying to build a real-time monitor tool for monitoring
our
websites with the chart component. With a timer event we
refresh
our
charts every second. In this situation it seems that we are
facing
the
limits of the chart component.

There were several error messages which I came across that
could
not
be
catched

- Service error
- Data Provider or other Service returned E-Fail status
- Stream object cannot be read because it is empty, ....

They are all generated from the Office Data Source Control
which
is
apparantly embedded somewhere inside the Chart component. By
saving
the
code below in a .htm file one can reconstruct my problem.


<object id=ChartSpace1
classid=CLSID:0002E55D-0000-0000-C000-000000000046
style="width:100%;height:350"></object>

<script language=vbs>
On Error Resume Next
ChartSpace1.ConnectionString = "Provider=MSPersist.1"
ChartSpace1.CommandText = "C:\data.xml"

ChartSpace1.SetData chDimValues, chDataBound, "pageviews"

Set f = CreateObject("Scripting.FileSystemObject")
Set t = f.OpenTextFile("C:\data.xml", 2, 0)
t.Write ("")

ChartSpace1.Refresh
</script>

IMPORTANT: before running this code first put the file
'data.xml'
in
de
C: directory. The XML code of this file is given below. It is a
pardox,
but to reconstruct the error one has to start with a proper XML
file.


------------------ cut here
<xml xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882"
xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"
xmlns:rs="urn:schemas-microsoft-com:rowset"
xmlns:z="#RowsetSchema">
<s:Schema id="RowsetSchema">
<s:ElementType name="row" content="eltOnly"
rs:CommandTimeout="30">
<s:AttributeType name="pageviews" rs:number="3"
rs:nullable="true"
rs:writeunknown="true">
<s:datatype dt:type="int" dt:maxLength="4" rs:precision="10"
rs:fixedlength="true"/>
</s:AttributeType>
<s:extends type="rs:rowbase"/>
</s:ElementType>
</s:Schema>
<rs:data>
<z:row EditionName="The edition" minute="19:52" pageviews="5"/>
</rs:data>
</xml>
-------------------------------

:

this may be a bug. what is the error message?

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
in
message
Hello,

I am using OWC 11.0 for the very useful chart components. Is
there
a
way
to turn off error-messages that are generated from this
component
internally. I give an example to explain my problem in more
detail.
Normally I use the (in)famous

ON ERROR RESUME NEXT

statement to prevent users getting confronted with ugly
error
messages
on
their screen. Unforntunately the following code sample does
not
catch
all
error messages.

On Error Resume Next
ChartSpace1.ConnectionString = "Provider=MSPersist.1"
ChartSpace1.CommandText = "http://server/data.xml"

Apparantly the ChartSpace1 object generates internal
error-messages
that
can not be trapped in the surrounding VB code. Now my
question
is:
Is
there a way to tell the object to switch-off error messages.

Many thanks if somebody has a helpful hint.

Henri Korver
 
A

Alvin Bruney [MVP]

well, part of the problem is that it is an error dialog box stemming from an
OS exception. Your best bet is to eliminate the source of the error. So
before you touch the graph code, you should check to make sure that the
resource is ready and available and take appropriate action before letting
it filter down to the OS level. Once it reaches the OS level, you will have
to accept the OS approach.

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
henri korver said:
so there is very less hope building a realtime monitor based upon the
Microsoft chart component. That is a real pity.....

Is there any hope that the OWC developers will correct this in the short
term (i.e. add a property SuppressErrorMessages in the chart component).

What should be my next steps?

Alvin Bruney said:
There's no way to suppress this dialog box because it is coming from the
OS.

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
henri korver said:
fair enough, if you have right problems, I can show you the problem in
another way. Run the script given below. At a certain moment a message
box
will pop up. Then first delete the data.xml file before clicking OK.
Then
I will get the error message: "The system cannot locate the resource
file
specified". This error is unfortunately not catched by the 'On Error
Resume Next' statement.

Are you now able to reconstruct our problem?

NOTE: before running the script it is very important that the data.xml
exists and is properly filled with the XML code I have sent you in
earlier
posts


<object id=ChartSpace1
classid=CLSID:0002E55D-0000-0000-C000-000000000046
style="width:100%;height:350"></object>
<script language=vbs>
On Error Resume Next
ChartSpace1.ConnectionString = "Provider=MSPersist.1"
ChartSpace1.CommandText = "c:\data.xml"
ChartSpace1.SetData chDimValues, chDataBound, "pageviews"
Msgbox "Delete the data.xml file before clicking OK!"
ChartSpace1.Refresh
</script>

:

hartSpace1.ConnectionString = "Provider=MSPersist.1"
ChartSpace1.CommandText
= "data.xml" ChartSpace1.SetData chDimValues, chDataBound, "pageviews"
Set f
= CreateObject("Scripting.FileSystemObject") Set t =
f.OpenTextFile("data.xml", 2, 0) t.Write ("")

the exact file path would be http://localhost/bugtest/data.xml

putting the file in c: drive is not expected to work since the worker
process does not normally have rights to the c: drive.

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
message
Strange! What do you exactly mean by relative path?

For instance if I use a 'http" path than i also get the error, see
the
sample code below (i only changed the command text)

as a matter of fact, normally I only use http paths in this context.
But i
thought that a hard-coded path was easier for the newsgroup such
that
people are not forced to create a virtual directory for running my
sample
code.

<object id=ChartSpace1
classid=CLSID:0002E55D-0000-0000-C000-000000000046
style="width:100%;height:350"></object>

<script language=vbs>
On Error Resume Next
ChartSpace1.ConnectionString = "Provider=MSPersist.1"
ChartSpace1.CommandText = "http://localhost/XML/data.xml"

ChartSpace1.SetData chDimValues, chDataBound, "pageviews"

Set f = CreateObject("Scripting.FileSystemObject")
Set t = f.OpenTextFile("C:\data.xml", 2, 0)
t.Write ("")

ChartSpace1.Refresh
</script>

:

the file would not load from c:\data.xml, i changed it to a
relative
path
and it loaded quite nicely. I was satisfied. This is the reason i
asked
for
more information.

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
message
did you give it another try reconstructing my problem? It is very
important for us. If we cannont catch error-messages from the
chart
component then our monitor tool development is at risc and we may
be
forced to look for another component.

As you know our monitor tool refreshes every second and has to be
up
and
running 7x24 and we have to be able to catch all unexpected
errors.



:

Are you sure that your first saved the 'data.xml' to your c:\
drive
before running the code?

And also before running the sample code please check that you
saved
the
xml correctly by manually opening this file in you internet
browser.
You
should see the expanded version. Then you are sure there were no
copy
and
paste errors.

NOTE: my problem only shows up when the xml file is first
properly
loaded
into the object and then is changed run-time. If the xml is
already
loaded incorrectly from start than VB is able to catch the error

After you have run the sample code the data.xml is empty. If you
then
want to reconstruct the error again, you first have to fill the
data.xml
file again with the XML.

:

Loads quite fine for me. No errors. Maybe your problem lies
elsewhere

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
in
message
We are trying to build a real-time monitor tool for
monitoring
our
websites with the chart component. With a timer event we
refresh
our
charts every second. In this situation it seems that we are
facing
the
limits of the chart component.

There were several error messages which I came across that
could
not
be
catched

- Service error
- Data Provider or other Service returned E-Fail status
- Stream object cannot be read because it is empty, ....

They are all generated from the Office Data Source Control
which
is
apparantly embedded somewhere inside the Chart component. By
saving
the
code below in a .htm file one can reconstruct my problem.


<object id=ChartSpace1
classid=CLSID:0002E55D-0000-0000-C000-000000000046
style="width:100%;height:350"></object>

<script language=vbs>
On Error Resume Next
ChartSpace1.ConnectionString = "Provider=MSPersist.1"
ChartSpace1.CommandText = "C:\data.xml"

ChartSpace1.SetData chDimValues, chDataBound, "pageviews"

Set f = CreateObject("Scripting.FileSystemObject")
Set t = f.OpenTextFile("C:\data.xml", 2, 0)
t.Write ("")

ChartSpace1.Refresh
</script>

IMPORTANT: before running this code first put the file
'data.xml'
in
de
C: directory. The XML code of this file is given below. It
is a
pardox,
but to reconstruct the error one has to start with a proper
XML
file.


------------------ cut here
<xml xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882"
xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"
xmlns:rs="urn:schemas-microsoft-com:rowset"
xmlns:z="#RowsetSchema">
<s:Schema id="RowsetSchema">
<s:ElementType name="row" content="eltOnly"
rs:CommandTimeout="30">
<s:AttributeType name="pageviews" rs:number="3"
rs:nullable="true"
rs:writeunknown="true">
<s:datatype dt:type="int" dt:maxLength="4" rs:precision="10"
rs:fixedlength="true"/>
</s:AttributeType>
<s:extends type="rs:rowbase"/>
</s:ElementType>
</s:Schema>
<rs:data>
<z:row EditionName="The edition" minute="19:52"
pageviews="5"/>
</rs:data>
</xml>
-------------------------------

:

this may be a bug. what is the error message?

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
"henri korver" <henri (e-mail address removed)>
wrote
in
message
Hello,

I am using OWC 11.0 for the very useful chart components.
Is
there
a
way
to turn off error-messages that are generated from this
component
internally. I give an example to explain my problem in
more
detail.
Normally I use the (in)famous

ON ERROR RESUME NEXT

statement to prevent users getting confronted with ugly
error
messages
on
their screen. Unforntunately the following code sample
does
not
catch
all
error messages.

On Error Resume Next
ChartSpace1.ConnectionString = "Provider=MSPersist.1"
ChartSpace1.CommandText = "http://server/data.xml"

Apparantly the ChartSpace1 object generates internal
error-messages
that
can not be trapped in the surrounding VB code. Now my
question
is:
Is
there a way to tell the object to switch-off error
messages.

Many thanks if somebody has a helpful hint.

Henri Korver
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top