473,385 Members | 1,478 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Need help with exception during some EXCEL automation

After sorting a dataset using a DataView and then creating a DataRowView I
get an Exception from HRESULT: 0x800A03EC on only one field in the
DataRowView.

code snippet:
xlWS.Cells(row, 1).Value = drvProd("RunNo")
xlWS.Cells(row, 2).Value = drvProd("CGN")
xlWS.Cells(row, 3).Value = ""
xlWS.Cells(row, 4).Value = drvProd("WorkOrder")
tempb = drvProd("Qty")

The error occurs on this next statement, tempb is diefined as an Int16 and
at least one record had a value of 16 but the exception was thrown anyway

xlWS.Cells(row, 5).Value = drvProd("Qty")
xlWS.Cells(row, 6).Value = drvProd("CoreType")
xlWS.Cells(row, 7).Value = drvProd("MandrelDiam")

What could be the cause of this problem
Nov 21 '05 #1
2 1093
Instead of using drvProd("Qty") I used the value of tempb and it works just
fine. tempb is defined as an Int16 whereas drvProd("Qty") is coming from a
typed dataset where it is defined as type "Integer", "Decimal" types were not
causing problems coming out of the DataRowView.
"Darrell Wesley" wrote:
After sorting a dataset using a DataView and then creating a DataRowView I
get an Exception from HRESULT: 0x800A03EC on only one field in the
DataRowView.

code snippet:
xlWS.Cells(row, 1).Value = drvProd("RunNo")
xlWS.Cells(row, 2).Value = drvProd("CGN")
xlWS.Cells(row, 3).Value = ""
xlWS.Cells(row, 4).Value = drvProd("WorkOrder")
tempb = drvProd("Qty")

The error occurs on this next statement, tempb is diefined as an Int16 and
at least one record had a value of 16 but the exception was thrown anyway

xlWS.Cells(row, 5).Value = drvProd("Qty")
xlWS.Cells(row, 6).Value = drvProd("CoreType")
xlWS.Cells(row, 7).Value = drvProd("MandrelDiam")

What could be the cause of this problem

Nov 21 '05 #2
Problem Solved -- Turns out the the data type of Integer in a typed Dataset
is a 64bit interger changing this to type "Int" resolved the issue -- looks
like Excel doesn't like these BIG INTEGER fields.
"Darrell Wesley" wrote:
After sorting a dataset using a DataView and then creating a DataRowView I
get an Exception from HRESULT: 0x800A03EC on only one field in the
DataRowView.

code snippet:
xlWS.Cells(row, 1).Value = drvProd("RunNo")
xlWS.Cells(row, 2).Value = drvProd("CGN")
xlWS.Cells(row, 3).Value = ""
xlWS.Cells(row, 4).Value = drvProd("WorkOrder")
tempb = drvProd("Qty")

The error occurs on this next statement, tempb is diefined as an Int16 and
at least one record had a value of 16 but the exception was thrown anyway

xlWS.Cells(row, 5).Value = drvProd("Qty")
xlWS.Cells(row, 6).Value = drvProd("CoreType")
xlWS.Cells(row, 7).Value = drvProd("MandrelDiam")

What could be the cause of this problem

Nov 21 '05 #3

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

Similar topics

0
by: Nik | last post by:
I have a VB.NET Web application. I have to export data from SQL Server to excel. I have 3 Select statements and the results need to go in 3 separate worksheets and the column headers of the sheets...
3
by: Mitchell Vincent | last post by:
Does anyone have some good examples of Excel automation with (VB).NET? I have some Excel spreadsheets that a customer needs parsed out but I've never tried to use Excel programatically before! ...
1
by: sunil | last post by:
hi there During my development i used .Net framework 1.1 with Office com component 9.0 (ie Word (.0 and Excel 9.0) object library and my application and my development system has windows XP...
1
by: Troy | last post by:
I have VB.Net code that opens Excel files and imports data from them. It works fine for all versions up to 2003 and has for over a year. We have users updating to Office 2003 and the Excel...
0
by: Brano | last post by:
Hi all, I have a asp.net website that has been live for about 2 weeks now and there were no problems with it. I have got a new server that is Win 2003 IIS 6.0 I have moved my application onto...
12
by: Tomas | last post by:
Hi, I have worked with VB.NET for half a year (semi-newbie). Currently I am looking around for some books for those that crossed the starting hurdle. There are too many books out there-make...
4
by: Keith Wilby | last post by:
How controllable from Access VBA is Excel? I'm currently using automation to dump 2 columns of data into an Excel spreadsheet so that the end user can create a line graph based on it. Could the...
0
by: etp | last post by:
I am using office automation to open and read an excel doc on a K2 workflow server. I get an intermittent bug where I get a pop-up error box in excel saying "Not enough system resources to display...
1
vinci
by: vinci | last post by:
Please help me out... i only have two weeks to do it... here is my code: Dim ex As New Object Dim wb As Excel.Workbook Dim sheet As Excel.Worksheet
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.