Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




MAPI Error 32002 (Unspecified Failure Has Occured)


I am trying to send mails with attachement using MAPI. Everything works fine except that from time to time I get this error on the .SEND method:

32002: Unspecified failure has occured

Why is that? And why isn't the definition more explicit?

In debug mode, if I re-execute that line (F8 key), I goes through without problem.

It looks like it just needs a bit more time to attach the file or something but I tried using a goto if the error is 32002 to go back to the .SEND line but it still gives me the error on the second try without continuing the loop.

Hope I am clear

here is my code in case it helps:


Code:
Public Function SendMail(Recipient As String, MailTo As String, Subject As String, Message As String, Optional FilePath As String) As Boolean
Dim ErrorCount As Integer

On Error GoTo ErrHandler
ErrorCount = 0
SendMail = True
With frmInfo

.MSession.UserName = MAPIUserName
.MSession.Password = MAPIPassword
.MSession.SignOn
.MMessages.SessionID = .MSession.SessionID

.MMessages.Compose

.MMessages.RecipDisplayName = Recipient
.MMessages.RecipAddress = MailTo

.MMessages.MsgSubject = Subject
.MMessages.MsgNoteText = Message

If FilePath <> "" Then
.MMessages.AttachmentIndex = .MMessages.AttachmentCount
.MMessages.AttachmentPathName = FilePath
.MMessages.AttachmentPosition = Len(Message) - 1
.MMessages.AttachmentType = mapData
End If

SendIt:
On Error GoTo ErrHandler
.MMessages.Send
.MSession.SignOff
End With

Exit Function

ErrHandler:
If Err.Number = 32002 And ErrorCount < 5 Then
Err = 0
ErrorCount = ErrorCount + 1
GoTo SendIt
End If
SendMail = False
frmInfo.MSession.SignOff
End Function




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Unspecified Failure (32002) When Using MAPI?
That's the message I get at the mpmessages.send routine. I'm trying to send an e-mail with 2 attachments. Here's the code.


vb Code:
'Set initial parameters for sending malMPSession.DownLoadMail = FalseMPSession.LogonUI = True'Sign on to the serverMPSession.SignOn'Allow the server to sign onDoEvents'Check is the connection was established correctly.If MPSession.SessionID = 0 Then    'If not, then display message box asking user if they want to make a backup        'If they choose to, then run the routine as if the user clicked on export    End If'Link the message control with the session controlMPMessages.SessionID = MPSession.SessionID'Set the mesage index to -1 (there is no selected message)MPMessages.MsgIndex = -1'Compose a new messageMPMessages.Compose 'Dont display anything about the addressesMPMessages.AddressResolveUI = False 'The first recipientMPMessages.RecipIndex = 0'We are sending it TO that recipientMPMessages.RecipType = mapToList'The addressMPMessages.RecipAddress = InputBox("Enter destination address.")'Make sure it's validMPMessages.ResolveName 'Subject of the messageMPMessages.MsgSubject = "Automated backup e-mail for " & App.TitleMPMessages.MsgNoteText = "The backup data files for: " & vbCrLf & _        frmLocation.txtContactName.Text & vbCrLf & _        frmLocation.txtNameAddress(0).Text & vbCrLf & _        frmLocation.txtNameAddress(1).Text & vbCrLf & _        frmLocation.txtNameAddress(2).Text & String(2, vbCrLf) & _        "for " & Format(DateTime.Now, "mmmm dd, yyyy")    'Set up attachments'The first attachment is the data file.MPMessages.AttachmentIndex = MPMessages.AttachmentCountMPMessages.AttachmentType = mapDataMPMessages.AttachmentPathName = App.Path & "data.mdb"'The second attachment is the report file.MPMessages.AttachmentIndex = MPMessages.AttachmentCountMPMessages.AttachmentType = mapDataMPMessages.AttachmentPathName = App.Path & "
eports.mdb" 'Send the e-mailMPMessages.Send 'Sign off the serverMPSession.SignOff

MAPI: Unspecified Failure 32002
Hello all,
The following script will give an error "unspecified failure 32002" after sending 3-9 emails when I use attachments of 300 kb. With small attachments the script runs OK.
In the real script the emailaddress and attachments are changing.
After this I have to restart my application and mailprogram. This goes wrong with MS Exchange and MS Outlook.
Does anyone know what is wrong?

Code:

Dim i as Single
on error GoTo FoutMelding
With MAPISession1
.LogonUI = true
.NewSession = true
.SignOn
End With
for i = 1 to 25
With MAPIMessages1
.SessionID = MAPISession1.SessionID
.Compose
.RecipDisplayName = "my@address"
.MsgSubject = "testmail "
.MsgNoteText = "this is a test"
.AttachmentIndex = 0
.AttachmentPosition = 1
.AttachmentPathName= "c: empmypic.jpg"
.AttachmentIndex = 1
.AttachmentPosition = 1
.AttachmentPathName = "c: empmytext.txt"
.AttachmentIndex = 2
.AttachmentPosition = 2
.AttachmentPathName= "c: empinfo.doc"
.Send false
End With
next

MAPISession1.SignOff
Exit Sub
FoutMelding:
MsgBox Err.Number & " " & Err.Description
MAPISession1.SignOff

&"Unspecified Failure Has Occurred&" Error (Mapi Controls)
Hi,
i'm trying to send a simple mail(with no attachments)
using VB and Mapi controls and i'm getting this error:
"Unspecified Failure has occurred"" (32002 error number)
this is my code:

MAPISession1.SignOn

If MAPISession1.SessionID <> 0 Then
With MAPIMessages1
.SessionID = MAPISession1.SessionID
.Compose
.RecipAddress = "benn-dor@inter.net.il"
.MsgSubject = "SUBJECT"
.MsgNoteText = "Message"
.Send False
End With
MAPISession1.SignOff
End If


thanx,
pokpoki

P.S
i'm using windows 2000 server and microsoft outlook 2000

MAPI Error - &"Unspecified Failure&"
I have developed an application using MAPI controls to send mail from VB App. which works fine for few days and now it gives an error message "Unspecified failure". I have copy same code to another application then it works.

Unspecified Failure On Sending Attachments With MAPI
I am trying to attach a text file to my email.

When I execute MAPI.Send Statement I get the following

******

Run-time error '32002'


Unspecified failure has occurred

*****


The following the Code

*****

ls_FileName = "c: empgbtest1.cmd"

MAPIMsg.AttachmentIndex = MAPIMsg.AttachmentCount

MAPIMsg.AttachmentName = Dir(ls_FileName)

MAPIMsg.AttachmentPathName = ls_FileName 'Left(ls_FileName, InStr(ls_FileName, Chr(0)))

MAPIMsg.AttachmentPosition = MAPIMsg.AttachmentIndex

******


If anybody has experienced this problem and fixed it please reply


Thank you

Ganesh

Error Using MAPI (32002)
Im getting the following error message when using MAPI, any ideas ? "Run-time error '32002' : Unspecified Failure has occured. (I have removed the usernam and pass and email address for obvious reasons)


Code:
Private Sub Form_Load()
MAPISession1.Username = ""
MAPISession1.Password = ""
MAPISession1.SignOn

MAPIMessages1.SessionID = MAPISession1.SessionID
MAPIMessages1.Compose
MAPIMessages1.RecipAddress = ""
MAPIMessages1.MsgSubject = "New Stock Sheet"
MAPIMessages1.MsgNoteText = "This is a test message"

MAPIMessages1.AttachmentPosition = Len(MAPIMessages1.MsgNoteText)
MAPIMessages1.AttachmentType = mapData
MAPIMessages1.AttachmentName = "Stock sheet"
MAPIMessages1.AttachmentPathName = Frm_MainMenu.File1.FileName
MAPIMessages1.Send True
MAPISession1.SignOff
End Sub

MAPI Error 32002
I keep getting an error when trying to send an attachment using the MAPI controls.


VB Code:
Public Sub Send()    '* Purpose  :   E-mail file to recipient.        If MAPISession1.NewSession Then        MsgBox "MAPI Session already established."        End    End If        With MAPISession1        .LogonUI = False        .UserName = txtProfile.Text        .Password = txtPassword.Text        .SignOn        .NewSession = True        MAPIMessages1.SessionID = .SessionID    End With        With MAPIMessages1        .Compose        .RecipAddress = txtAddress.Text        .MsgSubject = txtSubject.Text        .AttachmentPathName = txtZipTo.Text & "Data.zip"        .ResolveName        .Send    End With        MsgBox "File Sent"        MAPISession1.SignOff    MAPISession1.NewSession = False    End Sub


If I comment out the AttachmentPathName it works fine, but doesn't when the line is left in.

The error happens on Send.

Has anyone any ideas why?

Regards

MAPI Fetch 32002 Error
I'm trying to write a program that can pull in an email file from a mail server. I can send just find, but receiving is the problem ><. Every time I use MAPIMessages1.Fetch, my program crashes and gives me the 32002 error! I am running Vista and have not yet tried this on an xp machine. Here is a section of the code:

Code:
Private Sub Form_Load()
'Sign on to the MAPI Session
MAPISession1.SignOn
MAPIMessages1.SessionID = MAPISession1.SessionID
MAPIMessages1.Fetch
If MAPIMessages1.MsgCount > 0 Then
'If there are messages, display the first one.
txtFrom.Text = MAPIMessages1.MsgOrigDisplayName
txtTo.Text = MAPIMessages1.RecipDisplayName
txtSubject.Text = MAPIMessages1.MsgSubject
txtMessage.Text = MAPIMessages1.MsgNoteText
'Enable the buttons to allow message navigation.
cmdBack.Enabled = True
cmdForward.Enabled = True
cmdSend.Enabled = True
Else
'No Messages? Tell the user immediately and Sign off!
MsgBox "You have no messages”"
MAPISession1.SignOff
'Disable the buttons to avoid error messages
cmdBack.Enabled = False
cmdForward.Enabled = False
cmdSend.Enabled = False
End If

Can someone help me out?

MAPI Error 32002 (Unspecidied Error)
VB6. I am using MAPI to send an Email along with a small text file. For some reason when I send an Email without the attachment it works fine. However when I send an attachment I get an unspecified error(32002). Anyone else run into this???


'*****************
A.MAPISession1.signon

With A.MAPIMessages1
.MsgIndex = -1
.RecipDisplayName = "John_Doe@afcc.com
.MsgSubject = "Subject"
.MsgNoteText = "MessageText"
.AttachmentName = "TEST.TXT"
.AttachmentPathName = "C:WindowsTempTEST.TXT"
.SessionID = A.MAPISession1.SessionID
.Send
End With

A.MAPISession1.SignOff

HELP Unspecified Error With MAPI
I have a small application to send e-mail, this works at home when I use Outlook express with dial up connection.

At the office we use Outlook 97 with Exchange Server. The application asks for a profile name which I select form the list having only Outlook then it returns with an Unspecified error has occurred.

Help is much appreciated and thanks in advance.

Tony

MAPI Control - Err 32002
Hey guys, it is my first post after a while, I got a question, it's driving me nuts.
I'm trying to use MAPI Control to send email in an application.
Here is the code:
----------------------------------------------
MAPISes.DownLoadMail = False
MAPISes.LogonUI = False
MAPISes.username = username
MAPISes.Password = Password
MAPISes.SignOn
If MAPISes.SessionID = 0 Then
MsgBox "ERROR"
End If
MAPISes.NewSession = True
MAPIMsg.SessionID = MAPISes.SessionID
MAPIMsg.MsgIndex = -1 ' set -1 compose event to work
MAPIMsg.Compose
MAPIMsg.AddressResolveUI = False
MAPIMsg.MsgSubject = "TEST"
MAPIMsg.MsgNoteText = "TEST"
MAPIMsg.RecipIndex = 0
MAPIMsg.RecipType = 1
MAPIMsg.RecipAddress = "username@email.com"
MAPIMsg.ResolveName
MAPIMsg.Send ---&gt; ERROR Occurs HERE
MAPISes.SignOff
--------------------------------------------------
MAPISes and MAPIMsg are Mapi Controls.
I get "Error 32002 -- Unspecified Failure has occurred." in the Send statement.
Can someone help me out here.

Thanks Guys,
Roger

"Great Ideas need Landing Gears as well as Wings"

MAPI Login Failure
Hi all,

I'm having some troubles with the .SignOn method of the MAPISession control. I have a compiled program that works on three of the computers in my office but gives me a Run-Time Error 32003 - 'Login has failed' on two other computers.

All of the computers have Netscape 7.1 installed and running as the default email program with the same settings.

Interestingly, the three computers it works on have VB6 installed but the two it doesn't work on do not have. Does this mean I have to distribute MAPI component files??? Or is there anything that I am missing???

Thanks in advance.

Regards, Richard
ADL Software

MAPI Session Sign On Failure
I am sending Email using MAPI in VB6. It works fine on some clients, and on some clients it returns error "Unspecified Failure has occured". On further investigation, it came to know that they have Windows 2003 server. Can anyone guide me that is there any security restriction on windows 2003 server that does not allow me to Sign on using MAPI?

Plz guide if any one knows....
Regards,
Ahmed.

Create Package Error; &"Unexpected Error Number 380 Has Occured;invalid Property Value
Hi all,

I try to create a package in visual basic; However, I found the following error. "Unexpected error number380 has occured; Invalid property value". My development environment ,
OS: Win2000
VB: Visual Basic 6.0

Thanks a lot .

Regards,
Edward Hui

Error 2140: An Internal Windows NT Error Occured
Hey,
I have written an NT service, but when i try to start it up i get the following error -
"Error 2140: An Internal Windows NT error occured"

I looked in the Event Log for more details and i got this -
'The service failed to start due to the following error:
The service did not respond to the start or control request in a timely fashion.'

Has anyone any ideas on how to go about fixing this problem...
I have been searching around, but nothing really works....

Thanks in advance,
Bill

AN ERROR OCCURED
Hi,

I do this type process, there is an error occured ie. unrecognised database format.

so, there is any possibility using ADO's to create query in access database.


regards,

Error Occured In Routine (372)
when first install the application, and logon as local user, user tries to open the application, this error is happen, the application window cannot be opened.
but when admin logon and open application, no error.
when local user logon again, re-open the application, no error anymore.
Is anyone can help?

Error Occured When Palying...
i've got a problem here that when playing the project....
all the things are working properly but their comes messege saying...
[ADODC]:no RecordSource specified.[ADO]:
command text was not set for the command object

so i don't know how to solve this.....help me plezzzz
kaylu_mo...
thnx

A Trappable Error Occured...
A trappable error occured in an external object.
The script cannot continue running.

So how do I read my .csv file to EOF in the vbscript in my .asp?

<%
Response.Expires = -1
Response.ContentType = "image/gif"
%>
<!-- #include file="FlpGrf.inc" -->
<%
'create the FlpASP object
Dim FlpAsp
Set FlpAsp = Server.CreateObject("FlpGrfASP.FlpGrfASP.1")
'initialize it
FlpAsp.InitializeGraph 1, flpLine
'open input file
Set fso = Server.CreateObject("Scripting.FileSystemObject")
Set ts = fso.OpenTextFile(Server.MapPath(".") & "atlantic1.csv")
'load data
s = ts.SkipLine
ctr = 0
sum = 0
Do
s = ts.ReadLine
pos = InStr(s, ",")
x = Left(s, pos -1)
y = Mid(s, pos +1)
ctr = ctr + 1
sum = sum + y
'convert the 'T' in the time/date to a space
pos = InStr(x,"T")
x = Left(x,pos -1) & " " & Mid(x,pos +1)
'load points to graph
FlpAsp.DataValue(i, 0) = CDate(x)
FlpAsp.DataValue(i, 1) = 0 + y
Loop While (Len(s)>5)
ts.close
...
...
%>

Know On Which Line The Error Occured
Is there a way I can display the code line in which an error occurs?

When you're in debug mode it works well but I'm about to send an application to a company that has an error management system in it. So if there's an error, it will only display the error number and error description

I'd rather have the line in which the error occured on top of that, so that I can go look trough the code in my copy of the application, it's much easier that way

An Error Has Occured In Script On This Page???
I am getting this very annoying error message when I try to access online help.
e.g. when I F1 on application.FileDialog CHM help goes to the correct page, but then pop-us this very annoying window saying something like:
"
An Error Has occured in script on this page.
Line: 115
Char: 2
Error: Object Required.
Code: 0
URL: mk:@MSITStore:C:Program%20FilesMicrosoft%20OfficeOffice101033vbao f10.chm::/links/ofobjFileDialog_L.htm

Do you want to continue to run scripts on this page?
(Yes/No).

The error keeps comming up.
I reloaded the I-net explorer, looked for spyware, add ware, any"ware".
Still occurs.
In my memory this worked in the past, but I may be wrong.

Has anyone seen this kind of behavior.

I am using WindowsXP pro and excel 2002

Thanks


"

Finding Line An Error Occured?
Is it possible to find the exact line that an error has been thrown from? I am using On Error GoTo ErrorHandler: but, if I don't have to do that, then I can change it.

The err object doesnt have a 'line' property

An Error Occured In ModProjectUse.main 0-
What could this problem be?? It is a vb program.

Reference - Unexpected Error Occured
When I try to reference a C++ DLL in my project(Browse and select the dll file), this error happens: Unexpected error occured in GOFNF: Error loading DLL.

What's that supposed to mean? I googled this error but nothing showed.

Determining If An Error Occured On A Shelled App
I am using CreateProcessA along with WaitForSingleObject to
run a process, hold the calling application, and resume when then generated process is finished. The shelled process is a scoring programming that could possible fail due to possible bad data in a database. I wish to, in the program that is calling this scoring application, find out when the scoring application fails so it can be rescheduled to run at a later time. How can I return the called processes generated errors or any value informing that the called process has errored in any way.

Thanks !!

Unexpected Error Number 28 Has Occured
Hi all,

Could anybody advise me. When I create SETUP file with VB Package and
Deployment Wizard, at the end of the step when I press "Finish" button,
the message bellow appear:

Error Occured While Registering The Msado20.tlb
 i made a vb package while installing the same on computer i have received an error

error occured while registering the file c:windowssystem32msado20.tlb

you are requested to please send me the appropriate solution so that my problem could be solved

thanking you

CRAXDRT Error Occured On Server
CRAXDRT Error Occured on Server. - 2147189177 : SQL Expressions can not be used in this report.

I wrote crystal report in version 9 and put it on web site and using ASP and activeX viewer to view the report. but I got error like this "CRAXDRT Error Occured on Server. - 2147189177 : SQL Expressions can not be used in this report".

It was working fine when i removed SQL Expression from the crystal report designer.

An Error Occured While Register The File...
when i compiled my project and installed on my computer and a laptop that doesnt hav vb6 i get the same error when it finishes installing...
"an error occured while registering the file c:windowssystemmsado25.tlb"
what is causing the error???
can anyone help....???
thanks

Error Occured While Registering The File
I created a VB application using ADO for data connection and Excel and Word as report writers. Everything works OK, but when I tried to create installation package I get message "Missing dependency information" (EXCEL9.OLB, msadomd.dll, msadox.dll, MSWORD.OLB), so I marked them as no dependancy files and they are included in setup files.
When I run installation I got message "Error occuring while registering the file msadox.dll/msadomd.dll" (Retry, Abort, Ignore). I choose "Ingore" and the application seems working OK, but how can I install it properly without that error message?
Any ideas, please?

Error -2147467259 - Unspecified Error - Pointing To DB Connection String ? (URGENT)
I have had my system running on and off in memory for some time now (maybe a couple of hours)...

On my most recent compilation/execution of the system, I was able to open and close several forms before I was presented with an error.

After I had opened and closed around 5 forms, and tried to open another, this error appeared:

Error -2147467259
Unspecified Error

Highlighting in yellow this line in my Form_load:
Code:
db.Open "PROVIDER=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" & ConnPath & "MyDatabase.mdb";



I have also just tried adding a record, it works fine.
I add 5 records, adding them fine.
When I get to around 10, this error comes up again, and points to the same line on my connection string.


NOTE: Nowhere have I closed my database (eg. db.close)

Everytime I am saving my records I am refreshing the form to be sure it is up to date.

Could this be causing the problem?

Do I need to close the database and then reopen after every transaction ?


Thanks

Drwtsn32 Error - Application Exception Occured
Hi,

My Visual basic application which was installed on a Terminal Server machine is using Microsoft Excel for reports.

While my application is executing some excel reports, all of a sudden the generated excel file pops-up and my visual basic application was terminating.

I couln't able to guess what might be the problem.

At last, I found that in the task list, just before the application terminates, I found Drwtsn32.exe in the list and after termination of my application, even this file(Drwtsn32.exe) too doesn't exists in the task list.

Then I have opened the Drwtsn.log file and I found the following error:

Application exception occurred:
App: (pid=1065)
When: 1/7/2005 @ 21:25:26.985
Exception number: c0000005 (access violation)

Please help me in this regard, how to proceed further.

Thanx.

Drwtsn32 Error - Application Exception Occured
Hi,

My Visual basic application which was installed on a Terminal Server machine is using Microsoft Excel for reports.

While my application is executing some excel reports, all of a sudden the generated excel file pops-up and my visual basic application was terminating.

I couln't able to guess what might be the problem.

At last, I found that in the task list, just before the application terminates, I found Drwtsn32.exe in the list and after termination of my application, even this file(Drwtsn32.exe) too doesn't exists in the task list.

Then I have opened the Drwtsn.log file and I found the following error:

Application exception occurred:
App: (pid=1065)
When: 1/7/2005 @ 21:25:26.985
Exception number: c0000005 (access violation)

Please help me in this regard, how to proceed further.

Thanx.

Run-time Error -2147467259 (80004005) Unspecified Error
Hello all, I am writing quite the complicated little program here and need your help with an error.
First off I am writing a program that will view an access database that contains 3 levels of parent child forms. Since you cannot have embedded forms in VB 6.0 I am writign code using ADODB connections and recordsets. Now how it works is basically you have records loaded into the parent form, and on this parent form are 4 buttons. When you click on a button another form appears (child form) and the records for that form based on the parent forms record appear. Now there are 4 child 1 forms, so if you click on another form then the previous one closes, that way only one child recordsource is open at all times. Now one of my child forms has child forms of its own.
Now to the problem. I can have 3 windows open at once, the parent, 1 child1 and one child2 form. When I scroll through my records from the parent form the records do appear in the 2 child forms, but after a while I will get an error for the first child form which is:

run-time error -2147467259 (80004005) Unspecified error

Now I will show you a sample of the code and you can tell me what I am doing wrong.

-----------------------------------------------------------------------

Code:
'Create variables
Set cnChild1 = New ADODB.Connection
Set rsChild1 = New ADODB.Recordset

'Connect to database
cnChild1.ConnectionTimeout = 0
If cnChild1.State = 0 Then
cnChild1.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=databaseMasterDatabase2004.mdb" ****THIS LINE GIVES ME THE ERROR
Else
cnChild1.Close
cnChild1.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=databaseMasterDatabase2004.mdb"
End If

'Get STATNUM value from station form and show only lithologies from that station
varStatnum = Station.txtStatnum.Text
strSQL = "select * from LITHOLOGY_TABLE where STATNUM = '" & varStatnum & "' order by ROCKNUM"

'Open connection
rsChild1.Open strSQL, cnChild1, adOpenStatic, adLockReadOnly
-------------------------------------------------------------------------
Since it only craps out after lookign at around 30 to 50 records I know my code elsewhere is fine, just that for some reason my open statement will crash on me. Is there a more secure way of making sure it will not crash on me. I tried error handlers like resume and actually unloading and reloading the form) but they do not work.

Thanks

System Error &H80004005(-2147467259). Unspecified Error
The subject is the error. I'm going to look it up now. But this happened when I cycle through the Recordset object for a particular form connecting to the specifi database table.

System Error &H80004005 (-2147467259). Unspecified Error
System Error &H80004005 (-2147467259). Unspecified error ...?

Unspecified Error Not Being Handled By VB Application Error Handler
I have a VB 6.0 application running as a service on a Win 2000 server. The VB application has an error routine that writes the error to the event log, then restarts itself. I have noticed over the past several days, that there has been an error thrown by the application, which doesn’t seem to go thru the error handling routine, thus the application doesn’t restart. The error is the ubiquitous ‘Unspecified Error’. The error that appears in the event log is:

The VB Application identified by the event source logged this Application VBEasyLinkInterface: Thread ID: 3148 ,Logged: MsgBox: , Run-time error '-2146949859 (8008251d)':

Unspecified error

Any ideas as to why the application doesn’t seem to be handling the error would be appreciated.


 

Please Help: Automation Error Unspecified Error When Trying To Instantiate An Object
Hi,

I'm developing an Excel Macro (VB) that can launch a Data Junction project (Data Junction is a third party deveopment tool... not important to know anything about it for this question). I've included the Data Junction Type Libraries under References --> Tools.

Here is the code that I'm trying to execute (lifted straight out of an example from Data Junction):

Code:
Dim djengine As DJEC.Engine
Set djengine = New DJEC.Engine
djengine.InitializationFile = "C:WINNTdjeng750.ini"


However, I get a runtime error that is caused by the 2nd line of code (Set djengine = New DJEC.Engine):

Run-time error '-2147467259 (80004005)':
Automation error
Unspecified error

Any ideas why this might be happening? Workarounds? I'm new to VBA and COM and am unsure how to solve this problem. Thanks.

Sanjay Pathiyal
sp228@hotmail.com
PS I originally posted this to the general discussion board, but feel it's more appropriate here...

Unexpected Error Occured In Code Generator Or Linker
I get this error every time I re-compile my .ocx project with binary compatibility.

I am attempting to re-compile the project onto the previous compilation which is also the same file I am maintaining binary compatibility with. I know this is not a problem with .dll projects as I have done two previously.

When I click on 'View Error Messages' I get:

LINK : fatal error LNK1104: cannot open file "\Ex1lanrootgroupCompiledComponentsecsSearchBox.ocx"


This error occurs in the final stages of the compilation process when it is 'Writing OCX'.

Any ideas anyone?

Error: A Problem Occured While Access Was Communicating With OLE Server...
(cont. from subject) or ActiveX control

I am getting the above error message when I click on a command button to enter a with data on a form. I am brand new to this forum, but I did do a search and could find any info on this error. Maybe I am not refering to the database properly or not referencing my controls properly. This is my first attempt at passing data from controls (text boxes and comboxes) to an eventprocedure. Here is the some of the code (first part). Before I was getting standartd complie errors (1 was type mismatch when I tried to relate a recordset to a table), but now I can't do any more troubleshooting with this error message. I would really appreciate any advice.....here is the code...

Option Compare Database


Private Sub cmdAddRec_Click()
'inserting my code here to assingn a search num (based on class/unclass and Dept.)
Dim db As Database
Dim searchRecs As Recordset
Dim PCNumClass As Recordset
Dim PCNumUnClass As Recordset
Dim searchNumCountClass As Recordset
Dim searchNumCountUnclass As Recordset
Dim lastNumTemp As Recordset
Dim searchNum As String
Dim sNumDate As String 'get date from "Date Received" text box
Dim sSQL As String
Dim deptSQL As String
Dim deptCode As String
Dim newPCNumber As String
Dim nextDeptNum As Integer
Dim ctlClass As Control
Dim ctlCategory As Control
Dim ctlDate As Control

Set db = CurrentDb
Set searchRecs = db.OpenRecordSet("Job Search Records")
'Set unclassified = db.OpenRecordset("Unclassified Job Search")
Set searchNumCountClass = db.OpenRecordSet("Classified Search Number Assignment")
Set searchNumCountUnclass = db.OpenRecordSet("Unclassified Search Number Assignment")
Set PCNumClass = db.OpenRecordSet("Classified PC Number Assignment")
Set PCNumUnClass = db.OpenRecordSet("UnClassified PC Number Assignment")
'assign values to my control variables so I can manipulate and reference data
Set ctlClass = Me.Controls("cboClass")
Set ctlCategory = Me.Controls("cboCategory")
Set ctlDate = Me.Controls("txtDateReceived")

sNumDate = Right(ctlDate.Value, 2) 'get 2 rightmost digits for year for sNumDate
deptCode = Left(ctlCategory.Text, 1)
'insert code to format string of data for the searchNum (primary key of class/unclass tables)
If ctlClass.Text = "Unclassified" Then 'look at category and year to generate searchNum
    deptSQL = "SELECT Unclassified Seach Number Assignment.Last Number FROM ...........

Unspecified Error
Hi everybody

I have made a DLL in VB that uses an Access Database at its backend and provides some Bussiness Services.

Now the problem is, This DLL works very fine on the computer where it is developed and compiled but on any other computer (althought installed by proper installation program), some times it works fine but some times it generates the following error.

Error Type:
Provider (0x80004005)
Unspecified error

This error is usually generated when DLL tries to Load Data from Database.

I could not figure out what this error means. Could anybody help me in this regard??

Unspecified Error
When I 'test run' my program in VB, it works fine. But when I compile it and try to run it separate from VB, I get this:


System Error &H80004005 (-2147467259). Unspecified error


Any ideas? I know it has to do with my database, though. If I comment out the line opening the ADO connection it works fine when compiled.

Unspecified Error
Below is my coding, i can run program when the url (after the "GET") is valid/correct url, but when i change the url to invalid or wrong url, then an "unspecified error" message will prompt out. I had sit in front of the pc half day, but still failed to find out the errors. can somebody help me to find it out. i will very appreciate.

thank you very much


-leos

codes:

Private Sub Command1_Click()

Dim obj As MSXML2.xmlHttp

Set obj = Nothing
Set obj = CreateObject("MSXML2.xmlHttp")
obj.open "GET", "http://www.test.net/integration_test1.asp?xml_text=<a><b>aaafdddd</b></a>"
obj.Send

If obj.Status >= 400 And obj.Status <= 599 Then
txtXMLResult = "Error Occurred : " & obj.Status & " - " & obj.statusText
Else
txtXMLResult = obj.ResponseText
End If

Set obj = Nothing

End Sub


ps: The error fall on If obj.Status >= 400 And obj.Status <= 599 Then

Unspecified Error Help Please
I have a COM object and it errors after executing the create method of the the Catalog object. The thing is it works sometimes and sometimes it gets the error. Anyway the error is:

-2147467259 Unspecified error

Unspecified Error???
I had a problem creating new forms in my project, I was getting unspecified errors trying to do that. So, I created a new project and added existing items.
That seemed to clear my problem with adding new forms. However, The existing items that were added didn't load the crystal report icon on the form. I searched for crystal report viewer in the references and could not find it. Could someone help me out???


Post Moved to reporting section from the database section. Please do post in the approriate sections of the site.



Edited by - vikramjb on 5/10/2006 1:56:31 AM

Unspecified Error?
hi everyone, i was just wondering what's up with this unspecified error stuff...every so often while i'm testing my program, i'll get an unspecified error....then when i stop the program and run it again, the unspecified error comes up before the main form loads up....out of curiousity, i copied and pasted all the code in the program to notepad so that i could test it with the exact code again. when i re-open the project and paste the code that generated the error it works for awhile then eventually i get another unspecified error.
as if debugging wasn't hard enough when it shows you where the problem is, now i gotta debug something that happens randomly?? i hate loving programming....;)

thanks,
Ryan

Unspecified Error
Below is my coding, i can run program when the url (after the "GET") is valid/correct url, but when i change the url to invalid or wrong url, then an "unspecified error" message will prompt out. I had sit in front of the pc half day, but still failed to find out the errors. can somebody help me to find it out. i will very appreciate.

thank you very much


-leos

codes:

Private Sub Command1_Click()

Dim obj As MSXML2.xmlHttp

Set obj = Nothing
Set obj = CreateObject("MSXML2.xmlHttp")
obj.open "GET", "http://www.test.net/integration_test1.asp?xml_text=<a><b>aaafdddd</b></a>"
obj.Send

If obj.Status >= 400 And obj.Status <= 599 Then
  txtXMLResult = "Error Occurred : " & obj.Status & " - " & obj.statusText
Else
  txtXMLResult = obj.ResponseText
End If

Set obj = Nothing

End Sub

Error Opening Database: Unspecified Error
VB Code:
Function Database_Load(iSQLString)    Dim oXMLHttp    Dim sXML    Dim URL    Dim aString    Open "C: est.txt" For Output As #15    'MsgBox ("Not Implemented yet")    aString = iSQLString                Set oXMLHttp = CreateObject("MSXML2.XMLHTTP")        URL = "http://localhost/default.asp"         oXMLHttp.Open "POST", URL, False    oXMLHttp.setRequestHeader "Content-type", "application/x-www-form-urlencoded"    oXMLHttp.send aString        If oXMLHttp.Status = 200 Then      sXML = oXMLHttp.responseText   ' Retrieve from serverB.      Print #15, sXML    End If        Set oXMLHttp = Nothing


The program loads the database to a local file on startup and works fine.
However when this function is called the second time, to do any SQL queries i always get an Error Opening DB: Unspecified error returned.

any ideas?

Resolved Automation Error Unspecified Error
I have been staring at this so long.
ADODB
Reference = Microsoft ActiveX Data Objects 2.7 Library.
The path to the database and the database exist.
I have rights to the database and it's location.
The table exists and has data in it.

function OpenDB is good
funciton OpenRs produces the -2147467259 Automation Error Unspceified Error on the .open statement.

Can someone see something that is wrong?


Option Explicit

Dim cLocal As New ADODB.Connection
Dim rsWhen As New ADODB.Recordset

Dim sPath As String


Private Sub Form_Load()
    Dim sSql As String
    
    sPath = "\willowgroupsack_end
ewroomschedule.mdb"

    If Not (OpenDB(sPath, cLocal)) Then
        Exit Sub
    End If

    ' get the data collection date/time
    sSql = "Select * from When"
    If Not (OpenRs(sSql, rsWhen, cLocal)) Then
        Exit Sub
    End If

End Sub



Private Function OpenRs(sSql As String, rs As ADODB.Recordset, db As ADODB.Connection) As Boolean
    On Error GoTo err:

    If rs.State = 1 Then rs.Close
    With rs
        .CursorLocation = adUseClient
        .CursorType = adOpenDynamic
        .LockType = adLockOptimistic
        .Open sSql, db, , , adCmdText
    End With
    OpenRs = True
    Exit Function
    err: MsgBox "Error in OpenRS" & vbCrLf & _
            err.Number & vbCrLf & err.Description
    
    
    OpenRs = False
End Function

Private Function OpenDB(sPath As String, db As ADODB.Connection) As Boolean
    On Error GoTo err:

        ' connect to the database
    If db.State <> 1 Then
        db.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
            "Persist Security Info=False;Data Source = " & sPath & _
            ";Mode = readwrite"
        cLocal.Open
    End If
        
    OpenDB = True
    Exit Function
    
     err: MsgBox "Error in OpenDBs" & vbCrLf & _
            err.Number & vbCrLf & err.Description
    OpenDB = False
            
End Function



Edited by - ootencl on 9/1/2006 6:09:31 AM

Copyright © 2005-08 www.BigResource.com, All rights reserved