473,508 Members | 2,202 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Program Loading

I have a project that I need help with. The program relies on info from a
remote server. The problem that I have is when the program loads I have a
module with some public variables that are being declared which require
access to the server in order to execute. How can I make logging on to the
server the first thing that happens when the program is loaded?

Thanks,
DCS Tech
Nov 21 '05 #1
2 963
Are you talking about logging onto a database server?
If so, during the form load event, your dataadapter connections will connect and retrieve
data during their .fill operations.

You can also declare a sub main in some object as a startup. Look for this feature by
right clicking on the project name in the solution explorer, selecting 'properties' and
then change the startup object.

In a windows form, look for the area that looks like this:
#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() call

End Sub

Hope this helps.

"dcstech" <dc*****@discussions.microsoft.com> wrote in message
news:B3**********************************@microsof t.com...
I have a project that I need help with. The program relies on info from a
remote server. The problem that I have is when the program loads I have a
module with some public variables that are being declared which require
access to the server in order to execute. How can I make logging on to the
server the first thing that happens when the program is loaded?

Thanks,
DCS Tech

Nov 21 '05 #2
Thanks for the help. I am not using a dataadapter but the sub main idea works.

"Mark Jones" wrote:
Are you talking about logging onto a database server?
If so, during the form load event, your dataadapter connections will connect and retrieve
data during their .fill operations.

You can also declare a sub main in some object as a startup. Look for this feature by
right clicking on the project name in the solution explorer, selecting 'properties' and
then change the startup object.

In a windows form, look for the area that looks like this:
#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() call

End Sub

Hope this helps.

"dcstech" <dc*****@discussions.microsoft.com> wrote in message
news:B3**********************************@microsof t.com...
I have a project that I need help with. The program relies on info from a
remote server. The problem that I have is when the program loads I have a
module with some public variables that are being declared which require
access to the server in order to execute. How can I make logging on to the
server the first thing that happens when the program is loaded?

Thanks,
DCS Tech


Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1434
by: Tim Fuehner | last post by:
Dear Newsgroup, I have a problem that is somewhat related to Alexandre Gillet's ones: "build a static python executable". I would like to make a C program scriptable. Therefor, I have included...
2
2439
by: Milk | last post by:
Hi, i got a program working half part and my program is suppose to do 4*4 matrix can any one help me to check it? i dunno whic part i did wrong thx~~ Here is the program ::::: .data arrayA:...
11
1345
by: Strix Nihildom | last post by:
The end product of this program is an application that permits pilots to perform the required weight and balance calculations prior to flight. The User should be presented with a list of aircraft...
4
2040
by: Stuart | last post by:
I have a small class of data values made up of ints and bools totalling 25 bytes. Each of these 25 byte nodes is stored in another class as an ArrayList with a few more ints. Typically there are...
14
1651
by: noridotjabi | last post by:
Two questions. 1)Is there any way that I can read from an executable and then execute what I have read. EXAMPLE: text text this is more text
8
2082
by: hazmaz | last post by:
I am writing a program will have a function where it opens a text file, and fills a list box line by line from the text file. It works fine, except for when I tried to load a dictionary which is ~...
14
2453
by: spamtrap | last post by:
Mostly for testing reasons I'd like to see if it makes sense to chose the following approach for just-in-time compilation of shaders for a renderer: Seeing as the shaders themsefs consist mostly...
5
1568
by: crusson | last post by:
I installed a third party piece of software designed to add mroe user control to the datagridviewer control and then uninstalled it. I found that it has somehow corrupted a Program I'm working on,...
4
6171
by: Quill_Patricia | last post by:
I have a Python script which is used to load data into a database. Up to now this script has been run by customers from the Windows command prompt using "python edg_loader.pyc". Any error messages...
2
2158
by: blackbiscuit | last post by:
Dear All, Now in my current developing project, I have defined a global object in the main program . In dlls, there are also some static object whose constructor will use the global object in...
0
7227
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,...
0
7127
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...
0
7391
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...
1
7054
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...
1
5056
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...
0
3188
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1564
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
768
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
424
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...

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.