By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,523 Members | 1,938 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,523 IT Pros & Developers. It's quick & easy.

COMException Unspecified Error with ADODB and .NET remote users

P: n/a
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

Nov 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Hi,

I'm not sure but it looks like security issue (since it happning just to
remote users). try to change the default asp.net user by using Identity
tag in web.config. let me know

HTH
Natty Gur[MVP]
Phone Numbers:
Office: +972-(0)9-7740261
Fax: +972-(0)9-7740261
Mobile: +972-(0)58-888377
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 17 '05 #2

P: n/a
Hi,

I'm not sure but it looks like security issue (since it happning just to
remote users). try to change the default asp.net user by using Identity
tag in web.config. let me know

HTH
Natty Gur[MVP]
Phone Numbers:
Office: +972-(0)9-7740261
Fax: +972-(0)9-7740261
Mobile: +972-(0)58-888377
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.