473,770 Members | 6,515 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Errors only arise in the compiled exe file when accessing Access database

2 New Member
I have a program that interrogates and modifies an Access database. When I run this program from the VB editor it runs fine. When I make the exe file and run that it crashes saying that the "Object invalid or no longer set". Whilst the exe file is in a diferent folder to that of the source, I have made sure I give the full path names to all files I access. Has anyone else had this problem and got any ideas how to fix it. The crash always occurs at a point when it is trying to acces the database (or so it seems).

I have been trying to fix this for months now but cannot see what he problem is. Like I say it works perfectly until I make the exe file and run that. The section of code which I think is responsible is as follows:
Expand|Select|Wrap|Line Numbers
  1. Sub CashUp_Click()
  2. isoutofstock = False
  3. For n = 1 To MSFlexGrid2.Rows - 1
  4.     If ProdDetails(n).ProdStock = 0 Then isoutofstock = True
  5. Next
  6. If isoutofstock Then Call POrderRaise
  7. If POraised And MSFlexGrid2.Rows = 1 Then Cancel_Click: Exit Sub
  8. nextReceiptNumber = GetNextNo(1)
  9. Set pdb = OpenDatabase(dbName)
  10. Set p_rec = pdb.OpenRecordset("TillReceipts")
  11. ...
  12.  
I am running VB6 on Windows XP Professional. The database is an Access 2000 database.
Apr 20 '07 #1
3 1327
Killer42
8,435 Recognized Expert Expert
That is a bit of an odd one.

Are you sure you're specifying full paths and not partial ones? If you're using a partial (or "relative") path, then it will be dependent on the current path, which could change during execution.
Apr 21 '07 #2
watson128
2 New Member
That is a bit of an odd one.

Are you sure you're specifying full paths and not partial ones? If you're using a partial (or "relative") path, then it will be dependent on the current path, which could change during execution.
Hi Killer42

Thanks for your comment. It is an odd one. However, no I have not fallen for that one. I store a full path name with drive ina global variable. I have even ensured that the exe file is in the same folder as the source files so they are both (the compiled and uncompiled forms) run from the same location.

Any other ideas?
Steve
Apr 25 '07 #3
Killer42
8,435 Recognized Expert Expert
Thanks for your comment. It is an odd one. However, no I have not fallen for that one. I store a full path name with drive ina global variable. I have even ensured that the exe file is in the same folder as the source files so they are both (the compiled and uncompiled forms) run from the same location.
Um...

Not really. It sounds like something related to an ActiveX control, but beyond that I'm stumped.

You might put in some logging and/or error handling to track down exactly where it's happening. Also, as a debugging thing, I guess you could try switching around your compile options such as P-Code/native, optimisations, upgrade ActiveX, remove info about unused ActiveX, and so on.
Apr 25 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
4396
by: Mike S. Nowostawsky | last post by:
I am getting this error when I try to run a program in my cgi-bin directory (don't know what I'm still missing to make it work): *** Authentication required! This server could not verify that you are authorized to access the URL "/~group3/cgi-bin/ack.cgi". You either supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required.
7
2783
by: Brian Sabolik | last post by:
I'm not sure if I've broken any Object Oriented rules or not, but ... I have projects in 2 different solutions that need to use each other's methods. Therefore I may have an "update" method in project 1-solution A accessing a "save" method in project 2-solution B as well as "getinfo" method in project 2 accessing a "read" method in project A. Is this permitted? I am getting the "dependency file in project cannot be copied... conflict...
1
3191
by: Hafeez | last post by:
I am having real trouble compiling this code http://www.cs.wisc.edu/~vganti/birchcode/codeHier/AttrProj.tgz The attachment shows errors when compiled using the current version of g++ in a i386-pc-solaris2.9. Seeing reference to gcc-2.7.2 in the Makefile of the code, I downloaded it and compiled in my home directory. Then changed the referenes of LIBDIR and INCLUDES to this installation .and ran with g++ for 2.7.2 then there are still...
12
2553
by: Russ | last post by:
Hello. My new dev machine is running XP Pro. In the past all equipment has only used Windows 2000. I have had a lot of problems getting my projects up and running on the new machine. The current one is a permission error. The project is a VC++ Web Service. It works fine when the service is hosted on the old W2K dev machine, but on the new XP machine I get a permission error when the service tries to open a text file on the Windows...
4
6753
by: Alex | last post by:
Is there any way to link a table to a front end for reference only (no requirement to edit data) so that the LDB file is not created. I use a number of tables for reference and do not need to edit them. I read some of the table values. The form that is displayed does not use any of the data in the reference tables. Alex
0
3169
by: Andrew Dowding | last post by:
Hi Everybody, I have been looking at problems with my Windows Forms C# application and it's little Jet 4 (Access) database for the last few days. The Windows Forms app implements a facade and implementation, data abstraction layer. But because each data adapter in the implementation layer has a connection object that opens and closes as needed, I found I got several errors from the Jet engine when there were simultaneous connections to...
2
6746
by: Don Isgitt | last post by:
Environment: Server running Redhat 3.2.3-20 on quad Xeon 2.4 Postgresql 7.4 compiled from source (gcc 3.2.3) Application written in Perl (5.8.0) using Tk, DBI and DBD Client accessing DB using ODBC (7.03.02) from Win XP box Sample of errors follows: 2004-04-26 10:15:38 LOG: 00000: connection authorized: user=djisgitt database=gds2
4
7354
by: Praveen_db2 | last post by:
Hi All I am getting strange errors in my db2diag.log can any one tell me what these errors mean?? Following is the code from my db2diag.log ********************************************************************************************* 2006-02-23-17.53.12.253000 Instance:DB2 Node:000 PID:1600(db2syscs.exe) TID:440 Appid:AC10E010.J70A.00E883122250 base sys utilities sqleagnt_sigsegvh Probe:1 Database:DEVM_DB Error in agent...
13
2688
by: kolmogolov | last post by:
/* Hi, I have removed things irrelevant to reproducing the problem. What's wrong with my code? Thanks in advance for any hint! 1166425362 */ #include <stdio.h> #include <stdlib.h> #include <string.h>
0
9592
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9425
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10230
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10058
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9870
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8886
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7416
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5313
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
2817
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.