Link to home
Start Free TrialLog in
Avatar of sabev
sabev

asked on

Run time error 3219 Invalid Operation

Hi everyone,

I have a VB app that queries an informix database, and opens a recordset.

It works fine on all machines but one.

This is a windows 2000 box.  It will make the database connection, but when I try to open the recordset, I get 'Runtime error 3219' Invalid operation.

I think that the machine is probably missing a .dll for the recordset object, but I can't figure out which one it is.

Some of the code -

Dim platrec As Recordset
Dim informixcon As Connection

If informixcon Is Nothing Then

    Set wrkODBC = CreateWorkspace("NewODBCWorkspace", _
    "admin", "", dbUseODBC)
    Set informixcon = wrkODBC.OpenConnection("Connection1", _
    dbDriverNoPrompt, , _
    "ODBC;DATABASE=theDatabase;UID=user;PWD=password;DSN=informix7")

End If

'''''' This is where it crashes -
Set platrec = informixcon.OpenRecordset( _
"select * from ct_mstr, ct_grantee where ct_mstr.doc_type = 'PLT' and upper(ct_grantee.last_name) like '" & prefix & "%' and ct_mstr.recno = ct_grantee.recno order by ct_grantee.recno", dbOpenSnapshot)














Avatar of gbzhhu
gbzhhu
Flag of United Kingdom of Great Britain and Northern Ireland image

Has the machine got correct MDAC versoin installed?
Avatar of sabev
sabev

ASKER

I installed the newest version.  2.8.

Try using Depends(know as Dependency Walker)
Compile your app exe, run Depends.exe then open your app via depends menu.  it should help you pinpoint if a dll is missing

Depends is part of Visual Studio tools
Avatar of sabev

ASKER

Thanks, I knew there was something like that.  I'll double check all those .dlls and make sure they are registered on the no functioning machine and get back to you.

I may not have access to the users machine for a few hours.



No probs.  Good luck
Avatar of sabev

ASKER

Rats....

All the dependencies are there.  I re-registered them just in case.  Still no go.

I ran depends.exe on a working machine, and on the machine that is having problems.  It found the same files in both cases.

OK,

Try to run RegClean (if you don't have it check download.com) and see if that helps.  This looks pretty much some cooruption either registry or system files
See this

http://www.registryscan.com/articles/runtime-error-3219.html

Please be careful when dealing with registry.  Backup if you have important data on the PC (I expect you know this already)
Avatar of sabev

ASKER

Well, I ran RegClean, and the free trial of ErrorNuker. No go.

I think I'm going to go ahead and buy the full version.  It says that it only fixed some of the errors.

Avatar of sabev

ASKER

The full version did not fix it either.
I am short of ideas now.  The only other suggestion I have is to try and connect to a different DB on different RDBMS say SQL Server or Oracle as it maybe database related
ASKER CERTIFIED SOLUTION
Avatar of gbzhhu
gbzhhu
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sabev

ASKER

The database is Informix on a UNIX server.

Fun times.

I do get a connection to it.  Just does not like to open the recordset on the one PC.
Avatar of sabev

ASKER

Problem has been fixed.  The informix connections, and ODBC driver.  Reinstalled a different version of the informix conection, and it works.

Odd, I had tried that before with no luck.
Nice 1.

I suggest that you close your question saving cleanup staff some trouble.  My suggestion would be to NOT delete the question as it contains some usufel info.  Whether you award the points or ask for a refund is up to you
Avatar of sabev

ASKER

I'll award the points.  Thanks.  I did get some usefull info as well.

Doug
Thanks Doug