473,804 Members | 3,742 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Dirty User Control in Toolbox causes ConnectionStrin g Failure?

Hello Everyone:

I used VB.NET 2003 Standard to create a User Control which I named
PersonControl and then overrode its OnLoad routine to use SQL commands to
populate its sub-controls.

When I tried to use the Form Designer to add my PersonControl to a form in
my application, I got the following error dialog box:
Title: Microsoft Development Environment
Text: The ConnectionStrin g property has not been initialized.
Buttons: OK

After viewing the error dialog, I made two assumptions:
1) My DB connection didn’t go active until my application was running
2) The forms designer was, for some odd reason, invoking the OnLoad override
of my PersonControl which was doomed to fail since my DB connection was in
fact not initialized.

After making the two assumptions, I commented out the OnLoad override of my
PersonControl and tried adding it to my form via the toolbox once again as a
test, but I still got the error. With the OnLoad override commented out for
the PersonControl, I could not see any reason why adding it to a form would
cause the above mentioned dialog error.

It appears that a dirty/old copy of the PersonControl is presently lurking
around in my Toolbox and that I can’t replace it with a new one.

Can someone help answer the following questions for me?
1) Does the VB.NET forms designer automatically call the OnLoad function for
all controls when they are placed in a form being designed even though the
application is not yet running?
2) After you manage to populate your toolbox with a custom User Control, how
do you ensure that the control instance residing in your toolbox updates its
behavior whenever you change the source code used to generate that control?

Respectfully,

Shawn Eary
--
“And whatever you do, whether in word or deed, do it all in the name of the
Lord Jesus, giving thanks to God the Father through him.”
Colossians 3:17 (NIV)
Nov 21 '05 #1
1 1653
Shawn,

In a good design there is in the UI no database "system.dat a" action.

You create it even in a user control.
Do you think that you are on the right track?

Why I tell this.
It is never interresting to spend time to help for a bad designs.

Cor
Nov 21 '05 #2

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

Similar topics

5
2019
by: Henke | last post by:
I added a project to my solution that contains a user control. Now I 'd like to add the user control from that project to a form in my solution. The problem is that the control doesn't gets added to the My User Control tab. Any ideas? Thanks in advance, Henke!
6
6872
by: Sean C. | last post by:
Helpful folks, I am having a hard time figuring out how to reduce my percentage of dirty page steal activity. Below are statistics for three fairly normal days, with the bufferpool hit ratios and page clean percentages, as well as an average of transaction rate for the entire days work. The ORDERST_BP was created to service our most active table, and I've been assuming that the low hit ratio for this BP is what is
15
24886
by: Rey | last post by:
Howdy all. Appreciate your help with several problems I'm having: I'm trying to determine if the Visit subform (subformVisits) has a new record or been changed, i.e. dirty. The form that contains the subform is named Clients. I have this code in the Add Client btn: If Forms!Clients.subformVisits!VisitDirty = True Then MsgBox "Visit subform is dirty!"
4
6076
by: Paradox | last post by:
Hey, I'm trying to figure out what situations call for the use of a derived form control such as: public class myListBox : System.Windows.Forms.ListBox and what situations call for the use of a Custom User Control, generated by adding a new Custom User Control to a project with VS.NET.
1
1324
by: steve bull | last post by:
I created a control and added to my toolbox and it worked fine including the controls icon until I decided to merge the project that contains the control into an existing project. I have included the Toolbox statements in the code, it is an embedded resource and the bmp location is set right. I have recompiled the control but even though the control appears in the toolbox the icon stubbornly refuses to appear. I just get the default cog. ...
0
8584
by: Philippe Meunier | last post by:
Hi, I am building a solution in VB.NET, and one of the project in the solution contains my user controls (and inherited controls), Everything is ok when I just came to add the user control and compile it, it appears in the Form Designer Toolbox. But after some time, when I open back the solution and work on other things, the user controls disappear from the toolbox, so that I have 10 user controls, and none of them appears in My User...
1
1625
by: Philippe Meunier | last post by:
Ok, I already asked a question similar to this one but didn't found any answer ! I've a solution with 2 projects in it. One of the project contains Usercontrols and Inherited Controls. I work actively on both project, changing the usercontrols and the second project (forms that uses the usercontrols). When I build my solutuion, my user controls become available in the Toolbox under "My user controls", with an icon of a user control, but...
4
1691
by: Tony Johansson | last post by:
Hello! I have one solution file that consist of three project. One project that build the exe file called A One project that build a user control dll. Here we have a class called B One project that build a class library dll. Here we have a class called C We have one dependency and that is from the user control to the class library because in the constructor for class B in the user control we have a call to
5
1947
by: Tony Johansson | last post by:
Hello! I have one solution file that consist of three project. One project that build the exe file called A One project that build a user control dll. Here we have a class called B One project that build a class library dll. Here we have a class called C We have one dependency and that is from the user control to the class library because in the constructor for class B in the user control we have a call to
0
9704
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, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
9571
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
10561
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
10318
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
10069
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...
1
7608
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
6845
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
3803
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2976
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.