List Info

Thread: RE: Problem Running on Some Computers




RE: Problem Running on Some Computers
country flaguser name
United States
2007-03-03 13:29:22
Put your added lines in a form load sub and you can also
wrap your 2 lines in a try statement like this
 
form1_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
try
Dim rs As ADODB.Recordsetrs = New ADODB.Recordset 
Catch ex As Exception
 
End Try
 
the try statement provides error handling and if the code
thats wrapped in a try statement generates an error the
compiler will just ignore it. or if you add some custom
error handling code under the catch ex as exception line you
can provide a error message to the user.if you need rs to be
a global variable place the dim statement just outside the
form load sub. its best not to edit the code that visual
studio automatically generates when you create a form. in
fact in vs.net 2005 hides this from you. when i use vs.net
2003 i just collapse the windows generated code and ignore
it for the most part. hope this helps if you have any other
questions let me konw.


To: VisualBasic_Official@yahoogroups.comFrom:
no_reply@yahoogroups.comDate: Sat, 3 Mar 2007 01:17:43
+0000Subject: [Visual Basic] Problem Running on Some
Computers




I'm hoping that someone will be able to quickly see what I'm
doing wrong.I perform the following steps:1. I create a
Windows application in Visual Basic .NET 2003 using the
wizard. This automatically creates the default Form1.2. I
add a reference to the project to include .NET adodb.3. I
then edit the Form1 code by inserting two lines after line
twelve as
follows...============================================Public
Class Form1Inherits System.Windows.Forms.Form#Region "
Windows Form Designer generated code "Public Sub
New()MyBase.New()'This call is required by the Windows Form
Designer.InitializeComponent()'Add any initialization after
the InitializeComponent() callDim rs As ADODB.Recordset
<-- inserted liners = New ADODB.Recordset <-- inserted
lineEnd Sub====== <remainder of code omitted but
unchanged from the default>4. I compile.The resulting
executable runs fine on my development Windows XP SP2
computer. However, this executable crashes on all but one
other Windows XP SP2 
 computer. I have made sure that all of these computers have
the .NET framework installed.The error dialog simply says
that the "application has generated an exception that
could not be handled."I would greatly appreciate any
suggestions.Thank you,Eric 


____________________________________________________________
_____
Invite your mail contacts to join your friends list with
Windows Live Spaces. It's easy! 
http://spaces.live.
com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx
&mkt=en-us

[Non-text portions of this message have been removed]



------------------------ Yahoo! Groups Sponsor
--------------------~--> 
Check out the new improvements in Yahoo! Groups email.
http://us.click.yahoo.com/4It09A/fOaOAA/yQLSAA/k7folB/TM

------------------------------------------------------------
--------~-> 

Visit http://aiaiai.com for
more groups to join 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    h
ttp://groups.yahoo.com/group/VisualBasic_Official/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/VisualBasic_Official/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:VisualBasic_Official-digest@yahoogroups.com 
   
mailto:VisualBasic_Official-fullfeatured@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
    VisualBasic_Official-unsubscribe@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.c
om/info/terms/
 

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )