A VB6 program that I created has been installed on a wide range of computers
and networks without any problems. Win 95, Win 98 and XP so far..
Occasionally, however, the function refuses to start on some systems, with
the only response being a critical error: 'Unexpected Error!', without even
trying to run.
Well! I didn't expect it, either!
Re-compiling and re-installing doesn't change anything. The program is
nothing really special. Reading, modifying and rewriting files is all it
does and all the files it needs to read are pre-written during install..
Does anyone have any idea what sort of problems commonly produce such a
message? Is the range of suspects far too great to even guess? Why does
it start OK on most computers but refuses on one or two?
Frustrating!!! A meaningful error message would help.
Don 8 12512
D & J G wrote: A VB6 program that I created has been installed on a wide range of computers and networks without any problems. Win 95, Win 98 and XP so far.. Occasionally, however, the function refuses to start on some systems, with the only response being a critical error: 'Unexpected Error!', without even trying to run.
Well! I didn't expect it, either!
I suggest you put some logging in your code to see how far it gets if
anywhere.
Does it ever run on a machine its failed on?
Are you using any custom controls?
--
Dean Earley (de*********@icode.co.uk)
i-Catcher Development Team
iCode Systems
** Responses interspersed..
"Dean Earley" <de*********@icode.co.uk> wrote in message
news:44***********************@news.zen.co.uk... D & J G wrote: A VB6 program that I created has been installed on a wide range of computers and networks without any problems. Win 95, Win 98 and XP so far.. Occasionally, however, the function refuses to start on some systems, with the only response being a critical error: 'Unexpected Error!', without even trying to run.
Well! I didn't expect it, either! I suggest you put some logging in your code to see how far it gets if anywhere.
** Not sure how to do this. I'm somewhat a newbie :O(
Does it ever run on a machine its failed on?
** No. Refuses to start.
Are you using any custom controls?
** No
** Thanks for your input. -- Dean Earley (de*********@icode.co.uk) i-Catcher Development Team
iCode Systems
D & J G wrote: ** Responses interspersed..
"Dean Earley" <de*********@icode.co.uk> wrote in message news:44***********************@news.zen.co.uk... D & J G wrote: A VB6 program that I created has been installed on a wide range of computers and networks without any problems. Win 95, Win 98 and XP so far.. Occasionally, however, the function refuses to start on some systems, with the only response being a critical error: 'Unexpected Error!', without even trying to run.
Well! I didn't expect it, either! I suggest you put some logging in your code to see how far it gets if anywhere.
** Not sure how to do this. I'm somewhat a newbie :O(
Either open a file for append and "print" to it, or msgboxes in key
places in the code.
--
Dean Earley (de*********@icode.co.uk)
i-Catcher Development Team
iCode Systems
"D & J G" <do********@optusnet.com.au> wrote in message
news:44**********************@news.optusnet.com.au ... A VB6 program that I created has been installed on a wide range of computers and networks without any problems. Win 95, Win 98 and XP so far.. Occasionally, however, the function refuses to start on some systems, with the only response being a critical error: 'Unexpected Error!', without even trying to run.
Well! I didn't expect it, either!
Re-compiling and re-installing doesn't change anything. The program is nothing really special. Reading, modifying and rewriting files is all it does and all the files it needs to read are pre-written during install..
Does anyone have any idea what sort of problems commonly produce such a message? Is the range of suspects far too great to even guess? Why does it start OK on most computers but refuses on one or two?
No two computers are exactly alike. Stuff happens. If it's weird, don't ask the
why question :)
Some things you might check:
Which OS does it sometimes fail on? (I'm guessing XP...)
Where did you put those files "pre-written during install"? (I'm guessing
Program Files...)
Did you run a setup for the program? Look at the list of files in the setup
(setup.lst). Is every one of those files on the pesky machine? Is each one at
least as new as the version in your setup? Are your "pre-written" files present?
One possible scenario is that while many XP users are set up as machine
administrators, you have encountered someone who is not. They may be denied
permission to install some dlls, or may not have read/write permissions on files
located in Program Files. If your program tries something very early in startup
that is denied, the program might not be perceived by the OS to have even loaded
up and started, hence the "unexpected" error. The most common cause is probably
file permissions.
"D & J G" <do********@optusnet.com.au> wrote in message
news:44**********************@news.optusnet.com.au ... ** Responses interspersed.. ... I suggest you put some logging in your code to see how far it gets if anywhere.
** Not sure how to do this. I'm somewhat a newbie :O(
You can create a sub such as..
Sub myDebug(mystr$)
dim f$
f$ = App.Path & "\debug.txt"
Open f$ for append as # 1
print #1, mystr$
Close
End Sub
And call this routine to write out "markers where you're at in the program.
For example
Call myDebug("In sub MAIN getting preferences")
Call myDebug("Getting user network ID..")
Reading user settings..
etc.. etc..
Examining the file will give you an idea how far you get and where the
program may have issues..
"Raoul Watson" <Wa*****@IntelligenCIA.com> wrote in message
news:tLbQf.19671$6h1.18785@trndny09... "D & J G" <do********@optusnet.com.au> wrote in message news:44**********************@news.optusnet.com.au ... ** Responses interspersed.. > ... > I suggest you put some logging in your code to see how far it gets if > anywhere.
** Not sure how to do this. I'm somewhat a newbie :O(
You can create a sub such as..
Sub myDebug(mystr$) dim f$ f$ = App.Path & "\debug.txt" Open f$ for append as # 1 print #1, mystr$ Close End Sub
And call this routine to write out "markers where you're at in the program. For example
Call myDebug("In sub MAIN getting preferences") Call myDebug("Getting user network ID..")
Reading user settings.. etc.. etc..
Examining the file will give you an idea how far you get and where the program may have issues..
When running, as soon as the code gets to
myDebug
I get the message
Compile Error:
"Argument not optional"
Huh! Am I too green for this?
Don
"D & J G" <do********@optusnet.com.au> wrote in message
news:44***********************@news.optusnet.com.a u...
When running, as soon as the code gets to myDebug I get the message
Compile Error: "Argument not optional"
the routine expect a string to be passed. If you omit it, you will get an
error.
If you use a variable, make sure the variable is declared as a string, e.g
Dim mystr as String
....
mystr = "Getting user network ID."
call myDebug(mystr)
if not, you'll get a byref argument type mismatch. test out the routine by
itself
Just create a form with a button:
Private Sub Command1_Click()
Dim mystr As String
mystr = "Cmd 1 Pressed"
Call myDebug(mystr)
End Sub
Sub myDebug(mystr$)
Dim f$
f$ = App.Path & "\debug.txt"
Open f$ For Append As #1
Print #1, mystr$
Close
End Sub
"Raoul Watson" <Wa*****@IntelligenCIA.com> wrote in message
news:%IzQf.3$Vb.2@trndny01... "D & J G" <do********@optusnet.com.au> wrote in message news:44***********************@news.optusnet.com.a u...
When running, as soon as the code gets to myDebug I get the message
Compile Error: "Argument not optional"
the routine expect a string to be passed. If you omit it, you will get an error. If you use a variable, make sure the variable is declared as a string, e.g
Dim mystr as String ... mystr = "Getting user network ID." call myDebug(mystr)
if not, you'll get a byref argument type mismatch. test out the routine by itself Just create a form with a button:
Private Sub Command1_Click() Dim mystr As String mystr = "Cmd 1 Pressed" Call myDebug(mystr) End Sub
Sub myDebug(mystr$) Dim f$ f$ = App.Path & "\debug.txt" Open f$ For Append As #1 Print #1, mystr$ Close End Sub
Thank you so much, Raoul. How dumb I feel! All was OK except that I hadn't
declared the variable (Duh).
All is well now. Just have to test it in my program.
Don This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: user_5701 |
last post by:
Hello, I'm getting an error with a Docmd.Transferspreadsheet line of
code:
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel2000,
"tblTest", pathAndFilename, True
The above line...
|
by: Angel |
last post by:
I'm trying to connect to a fixed IP address (eg. http://10.60.903.50/TempFile) in order to retrieve one accii line of text in TempFile.
I try to read the information with this code:
string...
|
by: Fredrik L |
last post by:
Hi,
We have an application outside the firewall who talks to a webservice inside
the firewall. 9 times of 10 this works, but sometimes we got the error "The
underlying connection was closed: An...
|
by: Vijayakrishna Pondala |
last post by:
Hi,
We are using the following error randomly, when accessing a webservice
method/servlet hosted on JBoss application server:
The underlying connection was closed: An unexpected error occurred...
|
by: tharika |
last post by:
Hi,
We have an ASP.NET web application hosted on a development server, that
invokes web services hosted on an offshore server in India, both being
on the same intranet domain.
The default...
| |
by: Matthew.DelVecchio |
last post by:
hello,
i am developing an ASP.NET web app that consumes a 3rd party vendor
webservice. it is my first one so while ive done my homework, im not an
expert on the matter.
our partner's...
|
by: MLH |
last post by:
Private Sub ButtonP_Click()
On Error GoTo Err_ButtonP_Click
Dim ThisForm As String
ThisForm = Me.Name
Exit_ButtonP_Click:
Exit Sub
Err_ButtonP_Click:
Dim r As String, k As String, Message3...
|
by: pct |
last post by:
Please help !!!!
while preparing visual basic 6.0 setup with crystal reports 8.5, once I clicked on Finish I got mesage 'unexpected error 28 : out of stack space', on the net I found the...
|
by: Mrozik |
last post by:
Hi!
I have a problem - after deploying application in client
environment, on some client machines occured error.
Environment:
App server: ASP.NET WebService/Win 2003/ secured SSL (.NET 2.0)...
|
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...
|
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,...
| |
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...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
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...
|
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,...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |