J
Jim Lacenski
I have a VB class that uses .NET and ADODB to write into
an Excel spreadsheet (via Jet) on a server as part of a
web application. ADODB is used instead of ADO.NET because
it greatly simplifies the write process, and is supported
for use on a server. (Excel is not supported (1),
licensing issues with OWC). The routine works fine for a
user at the server, but when a user from a system other
than the server runs the page the error "Unspecified
Error" occurs.
Exception Details:
System.Runtime.InteropServices.COMException: Unspecified
Error
which occurs on the Open call of the ADODB connection.
Code fragment:
' make connection to Excel sheet
strConnExcelPfx = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source="
If blHasHeader = True Then
strConnExcelSfx = ";Extended
Properties=""Excel 8.0;HDR=YES;MAXSCANROWS=1;"""
Else
strConnExcelSfx = ";Extended
Properties=""Excel 8.0;HDR=NO;MAXSCANROWS=1;"""
End If
strConn = strConnExcelPfx & sTempFilePathName &
strConnExcelSfx
cnn.ConnectionString = strConn
cnn.Open()
What do I need to do to eliminate the "Unspecified Error"
for the web users?
Summary:
1) application works fine when run on the development
server by a (web) user at the server
2) application fails when accessed by a user remote to
the server (web client): Unspecified "COMException"
3) Excel and OWC are not acceptable alternatives due to
lack of MS support and licensing issues with OWC
4) ADODB preferred instead of ADO.NET for the write
because it greatly simplifies the code when scalability
to other data layouts is concerned
(1) Reference: MS KnowledgeBase article 257757
Thank you in advance,
Jim Lacenski
an Excel spreadsheet (via Jet) on a server as part of a
web application. ADODB is used instead of ADO.NET because
it greatly simplifies the write process, and is supported
for use on a server. (Excel is not supported (1),
licensing issues with OWC). The routine works fine for a
user at the server, but when a user from a system other
than the server runs the page the error "Unspecified
Error" occurs.
Exception Details:
System.Runtime.InteropServices.COMException: Unspecified
Error
which occurs on the Open call of the ADODB connection.
Code fragment:
' make connection to Excel sheet
strConnExcelPfx = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source="
If blHasHeader = True Then
strConnExcelSfx = ";Extended
Properties=""Excel 8.0;HDR=YES;MAXSCANROWS=1;"""
Else
strConnExcelSfx = ";Extended
Properties=""Excel 8.0;HDR=NO;MAXSCANROWS=1;"""
End If
strConn = strConnExcelPfx & sTempFilePathName &
strConnExcelSfx
cnn.ConnectionString = strConn
cnn.Open()
What do I need to do to eliminate the "Unspecified Error"
for the web users?
Summary:
1) application works fine when run on the development
server by a (web) user at the server
2) application fails when accessed by a user remote to
the server (web client): Unspecified "COMException"
3) Excel and OWC are not acceptable alternatives due to
lack of MS support and licensing issues with OWC
4) ADODB preferred instead of ADO.NET for the write
because it greatly simplifies the code when scalability
to other data layouts is concerned
(1) Reference: MS KnowledgeBase article 257757
Thank you in advance,
Jim Lacenski