Discussion:
Using MsChart20.ocx in VS2008 project; where's MSDATASRC.dll?
(too old to reply)
Roy Soltoff
2009-05-19 14:11:41 UTC
Permalink
I use the MsChart20.ocx in a VB.Net Vs2008 project to add some minimal
charting capabilities. This project uses the MSCHART20Lib.dll via the
AxMSChart20Lib.dll interface wrapper. On most computers, this works OK. In
testing on a stock Windows Vista and Windows 7RC1, I get an error indicating
that the system could not load assembly MSDATASRC, Version=7.0.3300.0, etc.
On my computer, this assembly is in the GAC. Apparently it is pulled into my
project as a reference when the AxMsChart20Lib.dll is brought in.

According to the VB6 REDIST.TXT file, mschart20.ocx is a redistributable
component. But it appears that MSDATASRC.dll is a component of Microsoft
Office. In searching the Microsoft site, I found a few references to
download a set of interface modules that included MSDATASRC.dll. I dl'd
O2003PIA, extracted the files, and attempted to install it on the W7RC1
system. But it required an install of Office 2003 before it would install.

Since MsChart20.ocx is a redistributable component, is there a dl that
provides an intall of MSDATASRC.dll that is needed to allow this component
to work with VS2008 projects using the AxMSChart20Lib.dll wrapper??
Zhi-Xin Ye [MSFT]
2009-05-20 13:28:22 UTC
Permalink
Hi Roy.

Welcome to Microsoft Managed Newsgroup!

Have you register the MsChrt20.ocx on the target machine? If not, you can
try the following steps to register it.

1. Copy the MsChrt20.ocx file to the C:\Windows\System32 folder of the
target machine;
2. In the C:\Windows\System32 folder,if the the target machine is
Vista/Server2008/Windows7, right click on the "cmd.exe" file and select
"Run As Administrator"; otherwise double click the "cmd.exe" file directly;
3. Type "regsvr32 MsChrt20.ocx" in the command line and press enter key;
4. A message box pops up to show the component is successully registered.

After registerring the MsChrt20.ocx, run the application again, it should
work.

By the way, the VS 2008 has build-in support for charting feature, please
see: http://msdn2.microsoft.com/en-us/library/ms252128(VS.80).aspx,
using this charting feature, you can run the application on any machines if
it has .NET Framework 3.5 installed.

Best Regards,
Zhi-Xin Ye
Microsoft Managed Newsgroup Support Team

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
***@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

Note: MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 2 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions. Issues of this
nature are best handled working with a dedicated Microsoft Support Engineer
by contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/en-us/subscriptions/aa948874.aspx
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Roy Soltoff
2009-05-20 14:34:19 UTC
Permalink
The problem is not registering the mschart20.ocx; the VS2008 setup project
has mschart20.ocx set for vsdrfCOMSelfReg and there is no failure of the
install. The problem is that the MSDATASRC.dll that is apparently needed for
the AxMSChart20Lib.dll is not installed on the target computer. I do not
have that in included in the setup as that does not appear to be a
redistributable component. But the installer that includes it cannot install
it without Microsoft Office installed. So it is the lack of MSDATASRC.dll
thatis the problem.

I'll have to look into your link to see if that charting capability is
compatible with my use of mschart20 where data is dyunamically developed for
a graph and what it will take for me to port my project over to that
charting capability. But for the moment, it would be nice to resplve the
issue with MSDATASRC.dll as to whether that is redistributable, whether it
is available from Microsoft in a downloadable and installable package
without requiring Office, or whether it is solely for use with Office.
Apparently it is not needed for mschart20.ocx in a VB6 ActiveX project
because there are (should not be) dependencies on Microsoft Office products
when building a VB6 executable. My hunch is that the inface wrapper for
DotNet need to use that MSDATASRC.dll. Perhaps I am wrong in that
assumption.
Post by Zhi-Xin Ye [MSFT]
Hi Roy.
Welcome to Microsoft Managed Newsgroup!
Have you register the MsChrt20.ocx on the target machine? If not, you can
try the following steps to register it.
1. Copy the MsChrt20.ocx file to the C:\Windows\System32 folder of the
target machine;
2. In the C:\Windows\System32 folder,if the the target machine is
Vista/Server2008/Windows7, right click on the "cmd.exe" file and select
"Run As Administrator"; otherwise double click the "cmd.exe" file directly;
3. Type "regsvr32 MsChrt20.ocx" in the command line and press enter key;
4. A message box pops up to show the component is successully registered.
After registerring the MsChrt20.ocx, run the application again, it should
work.
By the way, the VS 2008 has build-in support for charting feature, please
see: http://msdn2.microsoft.com/en-us/library/ms252128(VS.80).aspx,
using this charting feature, you can run the application on any machines if
it has .NET Framework 3.5 installed.
Best Regards,
Zhi-Xin Ye
Microsoft Managed Newsgroup Support Team
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.
Note: MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 2 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions. Issues of this
nature are best handled working with a dedicated Microsoft Support Engineer
by contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/en-us/subscriptions/aa948874.aspx
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Zhi-Xin Ye [MSFT]
2009-05-25 12:58:46 UTC
Permalink
Hi Roy,

Have you tried adding the MSDATASRC.dll assembly to your setup project as a
file? If not, you can add it with the following steps:

1. Right click on the Setup Project, and select "View"->"File System";
2. Right click on the "Application Folder" on the left view;
3. Select "Add"->"Assembly.." and pick up the MSDATASRC.dll assembly from
the GAC;

By the way, besides the chart feature I mentioned in my last post, there's
a new Chart control for .NET 3.5, you can download it from here:

Microsoft Chart Controls for Microsoft .NET Framework 3.5
http://www.microsoft.com/downloads/details.aspx?FamilyId=130F7986-BF49-4FE5-
9CA8-910AE6EA442C&displaylang=en

Microsoft Chart Controls Add-on for Microsoft Visual Studio 2008
http://www.microsoft.com/downloads/details.aspx?FamilyId=1D69CE13-E1E5-4315-
825C-F14D33A303E9&displaylang=en

If you have any questions or concerns, please feel free to let me know.

Best Regards,
Zhi-Xin Ye
Microsoft Managed Newsgroup Support Team

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
***@microsoft.com.

This posting is provided "AS IS" with no warranties, and confers no rights.
Loading...