Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Porttability of VB programs

Status
Not open for further replies.

nagyf

Programmer
May 9, 2001
74
HU
Yesterday I wrote a Visual Basic program which called an Access database.

I have had strange experiences
A.
dim rst as recordset
...
set rst = dbs.OpenRecordset("USER",dbopendynaset)

caused an execution error.
I had to change the type:
dim rst as object
...
set rst = dbs.OpenRecordset("USER",dbopendynaset)

Why?

B. I have tested in within the VB 6.0 environment and as standalone exe on my PC1 then I tried to run it from the server where neither Access nor VB are installed.
I have got a message that a DLL is missing. I copied it to the forled of the exe file. I got a message that the version of another DLL (OLEAUT32) is not the proper.

Question: I have to develop an installation process working on different remote computers. How can can avoid DLL version incompatibilities? In other words:
User uses Version A of X.DLL in program OTHER.EXE, MY.EXE program uses version B of it. If I simply replace his/her X.DLL with my version then MY.EXE will work but OTHER.EXE won't.

My preliminary idea: What if I rename Version A of X.DLL to XA.DLL, and incude it on the installation disk? XA must not be installed to the system folder but rather the folder wher MY.EXE should be.

C.
I have used the same references as the VISDATA demo.
Maybe I need not all of them?
Any help would be appreciated.
Ferenc Nagy
|\ /~ ~~|~~~ nagyf@alpha0.iki.kfki.hu Fax: (36-1)-392-2529 New!
| \ | | Institute of Isotope and Surface Chemistry
| \ | -+- 1525 Bp. POB 77. Tel. :(36-1)-392-2550
| \| | `-' ' `-' "The goal of the life is the struggle itself"
 
Here's a little help.

A. Check your references. Then I would be more specific when declaring your connection and recordset types. i.e. dim rs as ADODB.recordset. (or DAO, or whatever it is that you are using.)

B. This is commonly known as .dll hell. I don't have any good solutions for you there. Moving to a *nix platform wont help your vb programs.

C. You may not. You could try removing them one at a time and see what happens. A slow process but you might learn some good things about what your code is doing.
 
New Subject: DLL hell
What are the differences between recordsets?
Where can I learn these subtypes like ABODB.Recordset?

How can I know which DLL are used in a Visual Basic EXE?
Is it possible to make a map by the linker?
Can you draw a tree of DLL-s?

How can I list the procedures included in a DLL?
Ferenc Nagy
|\ /~ ~~|~~~ nagyf@alpha0.iki.kfki.hu Fax: (36-1)-392-2529 New!
| \ | | Institute of Isotope and Surface Chemistry
| \ | -+- 1525 Bp. POB 77. Tel. :(36-1)-392-2550
| \| | `-' ' `-' "The goal of the life is the struggle itself"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top