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




Automation Error Unspecified Error


The following code is from a VB 6 (SP5) program. We want to retrieve the record from table someTable that has the value 801 in the HeaderID field and the value 2 in the Position field.

Here are the relevant declarations:
Dim rsElement As New ADODB.Recordset
Dim strSQL As String

When trying to get the record from an Access 97 database, using ADO 2.5 and the Microsoft.Jet.OLEDB.4.0 provider, the following code generates the error, “Automation error Unspecified error”.

strSQL = “SELECT * FROM someTable WHERE HeaderID=801 AND Position=2”
rsElement.Open strSQL, m_Database, adOpenStatic, adLockOptimistic, adCmdText

The SELECT statement above works fine when trying to get the record from an Access 97 database using DAO, or when retrieving it from a SQL Server 2000 version of the same database using ADO. Even more annoying is the fact the following DELETE statement below works where the SELECT statement above does not:

“DELETE FROM someTable WHERE HeaderID=801 AND Position=2”

My solution was to open the table with a filter applied to retrieve the desired record:

rsElement.Filter = "HeaderID=801 AND Position=2"
rsElement.Open "someTable", m_Database, adOpenStatic, adLockOptimistic, adCmdTable

Why does the ADO/Jet combination have a problem with a column named “Position” (sometimes)? Is my solution adequate, or does it incur a significant performance penalty? Keep in mind that I used constants in the SQL statements for the purposes of this example. The actual code resides in a loop that builds the statements using variables that hold the values of HeaderID and Position.




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
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...

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

Errors : Automation Error & Unspecified Error
Hi,

I am unable to understand for what reason these two Errors are worrying my application like anything. I got fed up with these two errors. I agree that I am using various Third party ActiveX Controls in my application viz. Sheridian Controls , Video Conferencing Controls , LEAD Tools etc.

Even I am unable to know at what instance this error is occuring.. Sometimes it occurs and sometimes it doesn't.

Can u extend ur opinion on these issue.

Regards

Prasad

Automation Error Unspecified Error
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

Automation Error Unspecified Error
I am getting the following error when i run my vb application.

Run-time error '-214747259 (80004005)

Automation Error
Unspecified Error

In my application i have added the references to the Microsoft Internet Control and the Microsoft HTML Object Library.

And I have a code as follows:


Dim SWs As New SHDocVw.ShellWindows
Dim IE As SHDocVw.InternetExplorer
Dim Doc

For Each IE In SWs

Set Doc = IE.document
If TypeOf Doc Is HTMLDocument Then
If IE.hWnd = WindowHandle Then
While IE.Busy
Wend
End If
End If

Next

when I comment out the code, I dont see this error, but when i keep it i do get it....this is very critical for my application..can someone please help...

Thanks!

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

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.


 

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?

Error '80004005' Unspecified Error
I'm connecting to an access database which has 3 linked tables from a CA-clipper database. (i'm using a dbase driver as it seems to work okay for reading (not writing due to index compatability).

All my MIS reports work fine except one which gives ...

Quote:error '80004005'

Unspecified error

/staff/MIS/review.asp, line 44

I've attached the code in a text file as its more readable.

connection string :
Provider=MSDATASHAPE;Data Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\Server-01MainAdministrationAdminAppDatasitec_data.mdb;

The SQL works fine inside an Access query

has anyone got anyideas why?



Edited by - DanInManchester on 6/17/2003 7:58:55 AM

Error #-2147467259 Unspecified Error
I get this error sometimes in my application.
It's a VB application that uses ADO objects to connect to a database the lies on a SQL Server 7.0.

The application is intended to work on several computers at the same time, and all are accessing the database regulary.

When this error occurs the application chrashes and a Dr. Watson log is created.

Has anyone seen this before ? or do anyone have any suggestions what do about it ?

Can there be a problem with that the applications want to access the database at the same time.

Error Msg - &"Run-Time Error &#039;-2147417848(80010108)&#039;: Automation Error
I have a menu-item which when clicked starts up a browser and goes to the site which the user selected from the appropriate menulist. It works fine in VB6 when I click on the play button, (design time). However, after using the Package & Deployment Wizard, I get the following error message: "Run-Time error '-2147417848(80010108)': Automation Error What in the world is going on. Is it that the browser object is not installing correctly since it works in the VB6 environment? :-( Or is it some code that is creating the problem. I am still new at this, but making great progress. Just ready to get this beta out to some of my testers.

I was under the impression that if you could run the program during the design process without any problems, then you could run it after compiling and packaging with the Deployment Wizard.

email should be on my post,... however it is:
scrocker@midsouth.rr.com

Thanks,
Sal

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

Unspecified Error! (Resolved)
Help!! I was messing around with my program (don't think I changed much, and what I did change I changed back...) and now when I run it, it says:

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

Whats wrong?! It first started saying this on my laptop, so I just copied the program to my desktop, and it worked there for a while, then after a few revisions, it started doing it on the desktop! (All programming done on laptop, copied to disk and only .exe copied to desktop). Now I can't use the program on either computer! Older versions that WERE working on both also no longer work. What did I do?

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

UpdateBatch Gives Unspecified Error
Hi All,

  I am inserting records into SQL Server database in Batch using VB6 update batch command of recordset.  However, I face a strange problem.  I am totally inserting 229 fields per record.  It properly inserts, when I insert upto 9 records using updatebatch.  But if I insert one more record before updatebatch, it gives "Unspecified Error".  Please help me in solving the issue.

Thanks,
Manohar

IIS Application - Unspecified Error
I was thinking of using a IIS app as a webserver. I start a new project, which starts with WebClass1 designer, I click run, click past the folder and temp dialogs, and then it gives me "An unspeicified error has occurred". I've hear it's supposed to show the default html in IE. that's it, does anyone know about these, I don't see much discussion, maybe this is why.

UpdateBatch Specified Unspecified Error
Hi All,

I am inserting records into SQL Server database in Batch using VB6 update batch command of recordset. However, I face a strange problem. I am totally inserting 229 fields per record. It properly inserts, when I insert upto 9 records using updatebatch. But if I insert one more record before updatebatch, it gives "Unspecified Error". Please help me in solving the issue.

Thanks,
Manohar

Unspecified Error When Using Disconnected
I have a disconnected recordset that I use as a data store so that I can use the filter and sort properties. It worked great in VB6 MDAC2.5 on Win98.

We are now porting to Win2K, VB6, MDAC2.6 and I get an unspecified error on the recordset when I try to do an addnew, some other method or even just setting one of the fields. It works great for a while but as the recordset grows, eventually I get 'Unspecified Error' failure. The error does not consistantly happen at the same place everytime, and appears to occur as the recordset grows. This makes me suspect some kind of memory leak or something. Any Ideas? The following is how I create the recordset.

Private Sub createRS as recordset()
Dim rs As New Recordset

'create the recordset
With rs
.Fields.Append "A", adChar, 4
.Fields.Append "B", adChar, 1200
.Fields.Append "C", adChar, 2000
.Fields.Append "C", adChar, 12
.Fields.Append "E", adChar, 50
.Fields.Append "F", adChar, 4
.Fields.Append "G", adChar, 8
.Fields.Append "H", adChar, 8, adFldIsNullable
.Fields.Append "I", adChar, 8
.Fields.Append "J", adInteger
.Fields.Append "K", adInteger
.Fields.Append "L", adChar, 10
.Fields.Append "M", adChar, 40
.Fields.Append "N", adChar, 24
.Fields.Append "O", adChar, 4
.Fields.Append "P", adChar, 4
.Fields.Append "Q", adChar, 4
.Fields.Append "R", adInteger
.Fields.Append "S", adInteger
.Fields.Append "T", adBoolean
.Fields.Append "U", adBoolean
.Fields.Append "V", adBoolean
.Fields.Append "W", adChar, 10, adFldIsNullable
.Fields.Append "X", adChar, 10, adFldIsNullable
.Fields.Append "Y", adInteger
.Fields.Append "X", adBoolean
.Fields.Append "Z", adBoolean
.CursorLocation = adUseClient
.Open
End With
Set createRS = rs

Thanks for any insight.

PSH

Error -2147467259 (&amp;H80004005) : &"Unspecified Error&"
I have one VB application in that i am fetching records from database and writing to xls file. I have created a setup of that application and installed on some PCs which are not having VB and SQL. It works perfectly fine on some PCs but on one PC its giving me the following error

Error -2147467259 (&H80004005) : "Unspecified error"

Can any one tell me why its giving me this problem. I just couldnot understand why this error is generated. Please help me out.
Any help will be appreciated.
Thanx in advance.

MSXML2.xmlHttp =&gt; 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

Please Help, Provider (0x80004005) Unspecified Error
I have been struggling with this problem for some time now and
I'm starting to get very desparate.

The thing is that I´m accessing data from an Active directory through an ASP page. This works fine for all the attributes except for the department attribute, if I ask for the department attribute I get this error : Provider (0x80004005)
Unspecified error.


Please help me if you have any ideas, I have no clue as to why I might be having this problem.

Thanks,
Linda b.

Unspecified Error -2147467259 For ADODB
I am using ADO to connect to Oracle database:
Global adoCn4 As New ADODB.Connection
With adoCn4
Connect_String4 = "DSN=" & Pub_DB_Name & ";" _
& "UID=" & Pub_DB_UserName & ";" _
& "PWD=" & Pub_DB_PassWord
.Open Connect_String4
End With

When I try to insert a new record with BLOB field, "Unspecified error -2147467259" occurs after debug message "DEBUG 4". But when I run the program in other PC, no error occurs.
StrDnname = Replace(StrDnname, "'", "''")
sSQLString = "INSERT INTO MA_T_CERTIFICATE (CAID, SERIAL_NO,ISSUERDN, SUBJECTDN, PUBLIC_KEY, CERT_START_DATE, CERT_END_DATE, TRUSTED, CERT, IS_CACHE, CRL_URL) VALUES('DS02','"

sSQLString = sSQLString & Serial_num & "','" & UCase(StrIssueCa) & "', '" & UCase(StrDnname) & "','1', to_date('" & Issue_dt & "','yyyymmddhh24miss'),to_date('" & Expiry_dt

sSQLString = sSQLString & "','yyyymmddhh24miss'),'Y','1','N','ldap://123.123.123.12')"

Print #2, "DEBUG 1"
Set adoRs = New ADODB.Recordset
adoRs.Open sSQLString, adoCn4

Print #2, "DEBUG 2"
sSQLString = "Select SERIAL_NO, CERT from MA_T_CERTIFICATE where SERIAL_NO ='" & Serial_num & "' and CAID = 'DS02'"
Sleep 1000

Print #2, "DEBUG 3"
Set adoRs = New ADODB.Recordset

Print #2, "DEBUG 4"
adoRs.Open sSQLString, adoCn4, adOpenDynamic, adLockOptimistic, adCmdText

Print #2, "DEBUG 5"
Open InpFile For Binary Lock Read As InFile
ReDim Chunk(LOF(InFile) - 1)
Get InFile, , Chunk
Close InFile
adoRs("CERT").AppendChunk Chunk
adoRs.Update
adoRs.Close

Please help! Thanks!

Unspecified Error On ODBC Connection
I am getting an "Uspecified Error" when I try to connect to a DSN with ADO yet when I connect a different DSN (of the same type) then it will work fine. Out of ideas on how to troubleshoot this, any help or any other info I can give for help.
Thanks

Getting Unspecified Error On Form_Load Event
The following code works just fine:


Private Sub Form_Load()
    Set Conn1 = New ADODB.Connection
    strConn = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
        "Data Source=N:RECMANDATARec.mdb"
    Conn1.Open strConn
End Sub

Private Sub cmdCmd_Click()
    Dim strSQL As String
    
    Set rstNTE = New ADODB.Recordset
    Set cmdNTE = New ADODB.Command
    strSQL = "SELECT P_Loc FROM Roster;"
    cmdNTE.CommandText = strSQL
    cmdNTE.CommandType = adCmdText
    cmdNTE.ActiveConnection = Conn1
    rstNTE.Open cmdNTE, , adOpenForwardOnly, adLockReadOnly
    Do Until rstNTE.EOF = True
        lstCmd.AddItem rstNTE!P_Loc
        rstNTE.MoveNext
    Loop
    rstNTE.Close
    Set rstNTE = Nothing
    Set cmdNTE = Nothing
End Sub


It connects in the form load event, then gets data in a button click event.

If I try to do the whole thing (similar) in the form load event, I get an unspecified error.  Here's the code:


Private Sub Form_Load()
    Dim strConn As String
    Dim strSQL As String
    
    Set Conn1 = New ADODB.Connection
    strConn = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
        "Data Source=N:RECMANDATARec.mdb"
    Conn1.Open strConn
    
    Set rstPay = New ADODB.Recordset
    Set cmdPay = New ADODB.Command
    strSQL = "SELECT DISTINCT [P_Loc] FROM Roster;"
    cmdPay.CommandText = strSQL
    cmdPay.CommandType = adCmdText
    cmdPay.ActiveConnection = Conn1
    rstPay.Open cmdPay, , adOpenForwardOnly, adLockReadOnly
    Do Until rstPay.EOF = True
        If rstPay!P_Loc > 100 And rstPay!P_Loc < 400 Then
            lstPLoc.AddItem rstPay!P_Loc
        End If
        rstPay.MoveNext
    Loop
    rstPay.Close
End Sub


I can't figure out the problem.  Could it be the connection is timing out and giving the error?  I can't understand why there's an unspecified error.

I'm connecting to a Microsoft Access 2 database that resides on a server.  Thanks for any help

UnSpecified System Error Compiling
Hi everyone,

VB6
SP6
WinXP

I've been hitting an UnSpecified System Error at the time the compile has completed and it has begun writing the .exe.

We have two development systems.  One in our office, and one on site.  If we make changes to any classes, bas, or forms at the site, we bring those changes back with us and include them in the Office Development system.  

After a little research, I found that the problem seems to have something to do with bringing the changes back.  

Does anyone know if VB stores the actual location of components.  Meaning that if the tabctl32.ocx is located at one address on one computer, and at another address on the another computer, will VB look for the address that existed at the time of the actual creation?  Does that make sense?  I'm thinking that somehow, there MUST be some sort of difference in where it's looking for some type of specific information that VB needs to complete the compile.

Or I may be blowing smoke.

Any help would be appreciated.

Thanks,
Dave


Databae Connect With 'Unspecified Error'
When the following code executes, i get an unexplained runtime error - 2147467259(80004005).  ANy ideas what this is or where my code is wrong?

Code:

DBCmd.CommandText = "INSERT INTO engine ( EngineName, TypeID) VALUES ('" & Com_type(1).text & "', (SELECT TypeID FROM type WHERE typeName = '" & com_tpye(0).text & "'))"

I have replaced all of the variables with static values, and the problem comes at the subquery with the second select statment.  I would be very grateful of any ideas.

BB

Unspecified Error, Ado Data Control
Hi, I'm trying to specify the datafield of my check boxes in the form load event. It generates unspecified errors randomly, it works perfect for a while and then I get an error saying,
ADODC unspecified error, I have to then restart my prog otherwise the error will generate continuously. After I restarted the prog everything works fine for a while. Can someone please help I really don't know what to do.

I've got three ado data controls and I've got 18 check boxes.
Within my database I have this,

TABLES = UserRights1 FIELDS = check1 to check6
    UserRights2      check1 to check6
    UserRights3      check1 to check6

I specify the Datasource in the check boxes properties.

Check2 datasource is adcCheck0
Check3 datasource is adcCheck1
Check4 datasource is adcCheck2

Here is the code that generates the error.

[red]Path = App.Path & "databasesSetupUserNames.mdb"

For iX = 0 To 2
         adcCheck(iX).ConnectionString = "provider=Microsoft.Jet.OLEDB.3.51;data source="& Path & ";"
        adcCheck(iX).CommandType = adCmdTable
        adcCheck(iX).RecordSource = "UserRights" & (iX + 1)
    Next iX
    
For iX = 0 To 5
        Check2(iX).DataField = "Check" & iX + 1
        Check3(iX).DataField = "Check" & iX + 1
        Check4(iX).DataField = "Check" & iX + 1
Next iX

With regards
DPX

Unspecified Error Accessing O2K Database With Asp
I've got an Access 2k database that I'm trying to open up with asp code. If I open the page once, everything is fine (and dandy), but if I reload, or open another page that connects to the same database, I get an "Unspecified Error" the moment I try to open a connection.

I have found that if I open the database and then close it with access, I can reload the webpage one more time before I get the error.

Also, I am developing my pages on win98 with personal web server, if that is of any importance.

This is driving me batty... I've tried everything I can think of.... which happens to be very little, but still...


set conPrivate = Server.CreateObject("ADODB.Connection")
conPrivate.Open "private" 'error occurs here.




Brewguru99

How To Resolve Unspecified Error Problem - VB?
Hi,

I am running my application on a Pentium II Processor with 128 MB RAM and 6.2 GB HDD. Paltform is Ms-Access / VB 6.0 . In my application I am using Sheridian Controls , Video Conferencing Controls , Lead Tool , and some other Third Party tools . I am encountering this problem at some instances of my application, I made so many attempts to know where exactly this error is raising, but failed ultimately. Did u encounter with this problem any time.

Please let me know any way out for this problem as early as possible.

Regards

Prasad

Common Dialog Control (unspecified Error)
Hai Guys,
I am a newbie to VB. i want to use Microsoft Comon Dialog Control in my form. so i have added this control to the toolbox. when i use my mouse over the control it shows me 'Unknown'. and when i click it and use it in my form it is giving me 'Unspecified Error'.
pls help me ....
how can i solve this problem. I am using VB 6.0. and this common dialog control is of version 6.0. how can i get he exact version of this control.
thanks & regards
Mahesh

Unspecified Error Opening ADODB.Recordset
Hello All -

I am having trouble opening a ADO recordset when the executable is run.
My application runs fine in design mode. I am connecting to an AS/400
using the Client Access ODBC Driver installed on my machine. I created
a File DSN and extracted the necessary values for my connection string.
I have verified that the connection does open. Trapping the error
results in:

Error: -2147467259
Description: Unspecified Error
Source: Provider

I cannot seem to find any relevant information on the web. Resolutions
include removing spaces in the connection string, checking user
security, & recordset is read only (which is how I am connecting). The
error that is raised is a generic error number. I have tried both MDAC
2.5 & 2.6.

Again, the application runs fine in design mode. Any help would be
greatly appreciated.



Dim dbConn As New ADODB.Connection
Dim dbRS As New ADODB.Recordset

dbConn.ConnectionString = _
"DRIVER=Client Access ODBC Driver (32-bit);DBQ =
JZMENU051;System = CHHQC01;CONNTYPE=2"
dbConn.Open

QueryString = "Select M03MNM, M03PGM, M03PRM, M03DES, M03LNE, M03CUS
from MNU03F " & _
"where M03PGM <> '' and M03DES <> '' Order by M03MNM,
M03LNE"

dbRS.Open QueryString, dbConn <-- Bombs here when executable is run



Some Code Here



dbRS.Close
dbConn.Close

Set dbRS = Nothing
Set dbConn = Nothing

DataEnvironment Raising Unspecified Error Problem
Hi,

I am encountering "Unspecified Error" Problem when using DataEnvironment of VB6.
At Some instances I am getting this error when the Requery Option is Set or when using the Filter Property of the Recordset.

Please let me know what is the problem...

Regards

Robert.

Error 2147023067 (80070725) Automation Error&" Launching Excel Sheet From VB App.
Hi All,
I have done a simple VB application that launches a excel sheet, this has worked proppely from my developement computer (WIN XP) and the package has been installed and the app. works propperly in another XP computer.When I have installed this same package in the Win 98 computer running the app. , launching the excel appears the message:
"Error 2147023067 (80070725) Automation error" , specifically at the code point:
wrbRes.Sheets(1).Range(strStart, strEnd).Borders(xlTop).LineStyle = xlSquare

I have done the same test in a WINNT developement computer (with VB installed) and I get the same trouble.
I have read that could be done due to an update of the windows system files when the package is installed.(OLEAUT.DLL specifically)
Thanks in advance for your help,
Al

Run Time Error (80040111) Automation Error ClassFactory Cannot Supply Requested Class
Anyone ever get this error ?

Run-time error '-2147221231 (80040111)':

Automation error
ClassFactory cannot supply requested class

I get this error when i am doing a Set MyShortcut = VBsObj.CreateShortcut(ShortCutPath & ".lnk")

I am only trying to create a shortcut here...and the server running this program is Windows 2000... Please advise..

Graph Report In Crystal Reports 8.5 Shows Error (Automation Error. The Object Invoked Has Disconnect
Dear All,

while calling a report containing graph from VB 6.0 I found following error,

"Automation Error. The object invoked has disconnected from its clients"

but when I install crystal reports 8.5 on client machine then the error disappears.

can anybody advice?

Best Regards,Shahzad Anwar 92-345-8237099

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

VB App/Access 2000 - Create Table - Unspecified Error
I have a VB App that inserts rows into an Access 2000 database. I am using an ADO Command object with a concatenated string as the command text (INSERT INTO...). I run perfectly in the development environment. When I compile and test the EXE, I get the Error (-2147467259). Unspecified Error. I am triple/quadruple sure that I am cleaning up after myself, i.e. Closing connections and Setting to Nothing for all of my ADO objects.

Question1. I've read in one of these forums about an errors collection. Is there more information available pertaining to the 1 Error I receieved? If so, how do I attain that information?

Question2. How do I solve this problem?

BruceH

 

ADOX: Unspecified Error When Trying To Create Table At Runtime?
Hey, I hope this is an easy one. I thought I was doing this right but now I'm getting an "Unspecified Error '2147467259'" which I haven't been able to fix.

Basically, I have a program using Access 2000 at the d/b. I've been tasked with the job of writing an "update" script for the d/b. So what I'm doing is looping through the database looking for specific table names and, if they are not found, adding them at runtime. Here's what I've got so far:

Code:' sub for checking for existing tables

    Dim arrTables() As String
    Dim catMyCatalog As ADOX.Catalog
    Dim tblMyTable As ADOX.Table
    Dim idxMyIndex As ADOX.Index
    Dim colMyColumn As ADOX.Column
    Dim fkyMyForeignKey As ADOX.Key

    ReDim arrTables(50)
    ' the array is filled here

    Set catMyCatalog = New ADOX.Catalog

    ' the connection is global and is open already.
    catMyCatalog.ActiveConnection = connMyConnection

    ' Loop through collection checking for existing tables
    For i = LBound(arrTables) To UBound(arrTables)

        For Each tblMyTable In catMyCatalog.Tables

            If tblMyTable.Name = arrTables(i) Then

                arrTables(i) = ""

                Exit For

            End If

        Next

    Next i

    For i = LBound(arrTables) To UBound(arrTables)

        If arrTables(i) <> "" Then

            Set tblMyTable = New ADOX.Table

            Select Case arrTables(i)

                Case "tblSystem"

                    With tblMyTable

                        .Name = "tblSystem"
                        .ParentCatalog = catMyCatalog

                        .Columns.Append "sysID", adInteger
                        .Columns("sysID").Properties("AutoIncrement").Value = True
                        .Columns("sysID").Properties("Nullable").Value = False

                        .Columns.Append "sysName", adVarWChar, 255
                        .Columns("sysName").Properties("Jet OLEDB:Allow Zero Length").Value = True
                        .Columns("sysName").Properties("Nullable").Value = True
                        .Columns("sysName").Properties("Default").Value = "no name"

                        .Columns.Append "sysLocation", adVarWChar, 255
                        .Columns("sysLocation").Properties("Jet OLEDB:Allow Zero Length").Value = True
                        .Columns("sysLocation").Properties("Nullable").Value = True
                        .Columns("sysLocation").Properties("Default").Value = ""

                        .Columns.Append "sysGroupNum", adVarWChar, 50
                        .Columns("sysGroupNum").Properties("Jet OLEDB:Allow Zero Length").Value = True
                        .Columns("sysGroupNum").Properties("Nullable").Value = True
                        .Columns("sysGroupNum").Properties("Default").Value = ""

                    End With

                    ' here we set the sysID as primary key
                    Set idxMyIndex = New ADOX.Index

                    With idxMyIndex

                        .Name = "sysID"
                        .PrimaryKey = True
                        .Unique = True
                        .Columns.Append "sysID"

                    End With

                    tblMyTable.Indexes.Append idxMyIndex
                    Set idxMyIndex = Nothing

                    catMyCatalog.Tables.Append tblMyTable

            End Select

            Call Pause(500)

            Set tblMyTable = Nothing

        End If

    Next i


Now there are more items in the Select statement (one for each possible table). But when I run the code, it all works until it gets to:
Quote:catMyCatalog.Tables.Append tblMyTable
and that is where it crashes

Does anyone see anything that would be causing that? I'm writing in VB 6.0 and using ADOX and Access 2000.

I don't know if this is the best approach to doing this but the problem is that the clients using this database have 3 different versions (not my project). Some have an older (1 year or so) database which is missing some entire tables. Others have a d/b from about 8 months ago who have most of the tables but some of those tables are missing fields. We don't want them to have to lose the information from the past year or so so we are just trying to "update" their database (inserting the missing tables and/or missing fields).

If there is a better way, I am all ears.

Thank you in advance for any and all help that you can give. It is very much appreciated.


DTFan
Ever-hopeful programmer-in-training

Unspecified Error While Attempting To Query Failed To Execute
Getting following error while attempting to show Oracle 8i CLOB object value (using Oracle ODBC 8i Driver) in Crystal report 9.0 at run time:
"Crystal Report Error : Exception 'Unspecified error' while attempting to Query failed to execute - Check SQL syntax".

But the same is working in oralce 9i database (using Oralce in OraHome driver) in Crystal report at runtime.

Can any one of you, help me on how to get Oracle clob / blob value in Crystal Report using oracle database and oracle odbc driver?

thanks in advance

Can't Save Record In Client PC - When Installing App - Unspecified Error -2147467259
Hai,

I compiled my project created the Package using Package And Deployment Wizard.

When i run the set up in the client machine, i am getting 3 errors. i also attach the picture of the 3 errors.

PHP Code:




1. Setup Error 168
    Setup has encountered a problem updating your system registry.

2. Error Executing Action     
    REGSVR: DLL Register Server failed on 'C:ProgramFilesCommon FilesSystemOLE DBmsdaps.dll

    -2147467259:UnSpecified error
    
    with  error code - 2147467259

3. Error while configuring ODBC drivers!
    Unable to register library C:ProgramFilesCommonFilesSystemOLE DB\msdaps.dll: The operation completed
sucessfully.







After installed this setup in my machine i am able to Save new records from the installed application. But when i install the same setup in the client machine , and there i see all datas populated, but when i try to add new record then the following error is coming and the operation is cancelled.

-2147467259
Operation must use an updatable query

I heard that it will happen because of the Previlleges in the shared directory, but i given FullControl to EveryOne and also to the user i install. But still this error remains.

Also i attach the picture of the database RecordLocking setting, kindly check this and suggest me , is this error occurs because of that settings or what.


<Edited After Testing> But also i tested by selecting [purple]None[/purple] in the [brown]Default Record Locking[/brown] Frame instead of [brown]Edited Record[/brown], even though the 3 same errors occurs when installing the setup in the client pc

thankyou,
Chock.

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