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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

vbp file runs ok exe does not

Status
Not open for further replies.

qureshi

Programmer
Mar 17, 2002
104
AU
Hi,
The database sits on the server (Windows 2003 configured as a terminal server whatever that means). I have a vb6 program which works with that database. When I run this program theough the VB interface all goes fine. I made an exe file and put it on the server. Now when I run the program through the exe file I get an error. The error is from microsoft saying that an error report has been created do you want to send it.

can anyone please help me in this regard. I dont know if I should be posting this in the OS forum.

Thanks in advance.
 
Most likely you're missing some required dll files that access the database. Are you using ADO? Make sure the correct version is on the server.

"I think we're all Bozos on this bus!" - Firesign Theatre [jester]
 

You put it on the server!!! That sounds to me like you did not make an install but just copied the exe. You need to make an install with at least the packaging wizard and install the program on the server.

Good Luck

 
A bit more detail.
Our company was using windows NT4 server and office 97. This program was originally developed for that system and it worked fine. Recently we have upgraded to Windows 2003 and office 2003.

Before when I was trying to modify the program the error was "Couldnt find Installable ISAM". Finally that error has gone. The program works fine in VB^6 mode.

I am using DAO as this is what the orignal program was using.
I have tried to package the project. No progress same error.

The server does not have VB installed on it. How can I check the version of DAO? Please help.

One more thing that I have noted is that when I run the exe file directly on the server. The program quits about half way without any error messages.

Thanks
 

>..."Couldnt Find Installable ISAM"...

Are you using DAO ODBC Direct by any chance???

Did you create your DSN???

Did you switch databases from 97 to 2k2 or higher? I belive you need at least dao 3.6 installed then(?). You can find out by settings>control panel>administrative tools>odbc data sources and just click on the add button and check out which access driver you have. Should be 4.00.53 something something something I belive.

More help at MS can be found by searching MDAC.

Good Luck

 
Wow,vb5prgemr, that high tech for me.
The ISAM error has been fixed.
Yes we did upgrade from office 97 to office 2003.

Yes DAo 3.6 is installed
This is how the program is connecting to the database

No DSN has been created.

Set db = OpenDatabase("\\Rtssvr1\data\Backorder\Back Orders")
then setting the recordset.
Set rscode = dbs.OpenRecordset("pastelcodes", dbOpenDynaset)

The point is that the vb file works fine. Why wouldnt the exe file not work. What is different?

 

ODBC = Open DataBase Connectivity
DSN = Data Source Name
MDAC = Microsoft Data Access Components

Try changing the opendatabase to include the .mdb ... but first make sure you can browse to the location. You may not have permission with the login you are using.

Good Luck

 
Same error.
The program is connecting to the database fine. Same error with or without the mdb extension. The program would not work in vb mode if it could not connect to the database.

I have run out of options. What else can I check?
 

Did you try to access the folder and file from the server, the destination machine? Did you check the logon rights to that file (no read write only etc.)? Are the logon rights different from the development machine? If they are then that may be your problem. Also check for create new as part of the rights because access/jet attempts to create a lock file in the same directory and if it cannot create it then you can get all sorts of weird errors.

Just trying to eliminate possibilities...

Good Luck

 
I had a very similar problem after I upgraded to office 2003. I eventually removed access 2003 and re installed access 2000.

I think the problem was that vb did not like the access database after I had opened it in access 2003, or access 2003 installed something that vb did not like. I re-installed access 2000 and saved the database in 2000 and every thing seemed to work fine again.

by the way, do you have sp 5 or 6 installed ?

 
The vbp file runs fine. When I run the vbb file on the development machine, it accesses the files on the server fine which, I think, implies that all permissions are OK. This problem starts after converting to an EXE file. I think something is gone missing during that conversion.

SP6 is installed on the machine. Our previous version was access 97. When I use that version the message that pops up is something like "Cannot make changes to the database as it is using access 97 format". So I cant use the old version.
Thanks
 
Let's just go back to the beginning.

On the {b]development[/b] machine the project runs fine against the database

You then compile it into an EXE and put the EXE onto the server that the database is on

You then run the EXE (on the server), and you get an error?

If this is indeed the scenario, then ArtieChoke and vb5prgrmr had it right at the beginning - you are missing necessary files because you have not packaged up and distributed the application properly.

VB programs are reliant on a large number of supporting files. These files are all correctly installed on a machine that has the VB6 development environment installed. They will not be on a machine that has never had VB6 or a VB6 application properly installed on it
 
I packaged the program (made the setup file) and installed on the server. After installation the server needed a reboot which I could not do at that time. I rebooted the server after office hours and ran the program again. The same error is still there.

Next I checked the event view. There were a number of them regarding my application and the fault is at dao360.dll
How do I fix that?
 
Do you get a normal VB error or does the program just go belly up?

If you don't have an error trap, in the main routine or form that starts up, put this code:

Code:
on error goto errortrap

<your code here>

exit sub

errortrap:
msgbox "An error occurred" + vbnewline + cstr(err.number) + " " + err.description

and see what comes back.

Also, does the exe file run okay on your development machine? Make sure the exe file is not corrupt.



"I think we're all Bozos on this bus!" - Firesign Theatre [jester]
 
First of all I thank you all for taking the time to help me. Thanks.

No the exe does not run on the development machine. The error generated is in a dialog box with the following message.

"Border has encountered a problem and needs to close. We are sorry for the inconviencence.
Please tell Microsoft about this problem"
and then we have the option of sending the report.

I am tried to create the exe file several times so I dont think that every time it creates a corrupt file.

In the program I have seen "On error resume next" sytatement occuring a number of times. I really dont know where to fits the "Exit sub" in the code ArtieChoke has provided.

I think I'll quit this job. I am so frustrated.
 
It's possible the resume next is hiding a problem that somehow doesn't break in the IDE. If you can, comment all of them out. Then in the main routine (the one that's set as the start-up routine for the project), add the on error goto as the first executable statement. Just before the main routine end sub statement, add the rest of the code.

One other thing to try: in the IDE, set break on all errors. This will ignore your resume next statements. Then run the program and see if it bombs.

It's tough inheriting bad code - I've got one such system right now and it sucks bigtime! The guy who wrote it was director of IT before he left. He knew a lot of system stuff, but his coding was for sh*t! Fortunately, we're about to replace it so I can say goodbye and good riddance real soon now! :)

Good luck.

"I think we're all Bozos on this bus!" - Firesign Theatre [jester]
 
One other thing to check that I've seen mentioned when these kind of problems have shown up. What SP version are you using?

"I think we're all Bozos on this bus!" - Firesign Theatre [jester]
 
Sp version is 6.
I will try to put the errortrap and let u know by Monday. Friday is finishing up. Time to enjoy the weekend.
cya
 
I put the errortrap as suggested. The vbp file ran OK while the EXE file had the same error. The exact words of the error are:

Border has encountered a problem and needs to close. We are sorry for the inconvience.
If you were in the middle of something, the information you were working on might be lost.
Please tell microsoft about this problem.
We have created an error report that you can send to us. We will treat this report as confidential and anonymous.
To see what data this error report contains click here.

Debug Send Error Report Dont Send


Note: Border is the name of my EXE file.

Thanks
 
Old Thread I know but might help someone googling for the same issue...
Just encountered almost exactly the same thing with code I have inherited that needs updating. The problem turned out to be related to how fields in a recordset were referenced (this was possibly to do with the fact that the table name and column name in question had a space in them, but not positive).
The field reference in the SQL was [table name].[Column name].
Referencing the field in the recordset as follows:
RecordSet("[Column name]") caused the above problem. Changing this to:
Recordset.Fields("Column name") solved the issue.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top