I'm sorry this is a custom DB much like SQLite, with even more limited types
cnich23
Posts
-
using (DataReader) inside loop -
using (DataReader) inside loopThe engine does not support date type
-
using (DataReader) inside loopBTW this is just an example there is actually a few more variables to read so ExecuteScalar does not apply
-
using (DataReader) inside loopAs far as performance issues are concerned I have a question .... I have to make multiple selects based on date inside of a loop. Is it wise to use the USING statement for the datareader inside of the loop or does something need to be done outside the loop. Here is my current code.
using (SQLCommand selectAnnv = new SQLCommand(_database)) { //create paramater date for variable select SQLParameter paramDate = new SQLParameter("@DATE"); // create parement query @DATE is variable selectAnnv.CommandText = "SELECT id FROM " + TMEMBERS + " WHERE registered = '(@DATE)'"; selectAnnv.Parameters.Add(paramDate); // loop through each day missed to current day for (DateTime anniversary = lastHandled.AddDays(1); anniversary <= now; anniversary = anniversary.AddDays(1)) { paramDate.Value = GStatic.GetISO8601(anniversary); _**//add ids to list // Data reader intialized outside loop using (SQLDataReader readerAnnv = selectAnnv.ExecuteReader()) { while (readerAnnv.Read()) ids.Add(readerAnnv.GetInt32(0)); }**_ } }
Should the bolded/italic part be decalered outside of the loop? -
ToolTip Bubble Incorrect location!.NET 2.0 I am using the Tooltip control to notify user's of input error. The tooltip is set as a bubble tip. When a call the the Show method, the tooptip bubble does not display correctly. The buble pointer will be offset from the control. Now if I call the show method twice in a row with the same control passed then it will display correcty. What is causing the tooltip to not be displayed correctly when in bubble form?
-
How to remove Panel Border?Nm my dumbness just need to add a desingner and override onpaintadorments
-
How to remove Panel Border?The border only shows up in design-time. I created a control that inhertied from the panel though I do not want the dotted border in design time.
-
How to remove Panel Border?I have a user control that inherited from Panel. I want to remove the dotted boder that the panel paints. The base.OnPaint is not called so how exaclty do I remove the Panel border? Thanks
-
CollectionEditor SerializationI have made a custom TabControl derived from Panel, custom TabPage derived form Panel, and TabPageCollection dervived from CollectionBase class. The CollectionEditor will successfully serialize the custom TabPages that are added. However when the custom TabControl is removed/deleted from a form the custom TabPage code that was added by the CollectionEditor is not removed from the forms InitalizeComponent(). When the CollectionEditor Remove button is used the serialized code is removed from InitializeCompnent() so I don't understand why it would not be removed when the custom TabControl is deleted. I also found out that if the custom TabPage does not derive from anything then the code will be removed when the control is deleted. So this is my situation, I am very confused and have asked this question on several forums with not effective responses. Do I need to implement some type of TypeConverter or override some method that is derived from a WindowsForm control? Any help or lead way will be greatly appreciated! I have been having no luck for the past week. :sigh: Thank you very much for any help. :)
-
Deleting my control from form does not remove codeI created a custom tab control and tab pages are added with a CollectionEditor. The CollectionEditor will add code and remove code when the add and remove buttons are used, but if the control is deleted on the form then the source code for the tab pages does not get removed. What needs to be done in order to remove the collections when the control is destroyed?
-
Supressing a MessageBoxThere is no real easy way to explain this. Either you need to know your machine ASM or if the control is .NET you need to know IL. There are several .NET Dissasmblers some even let you edit the IL code directly. Which in your case you can search for MessageBox and remove them. But there is no easyway to explain this, and most likely it will involve a lot mroe research then waht your trying to accomplish. Best bet is to have the dev's fix it or learn .NET reversing.
-
Supressing a MessageBoxAsking them devs to fix it would be best but Luis hooking will work or you can remove the message box dialogs completly by debugging the control and noping the calls to the dialog.
-
CollectionEditor Code Clean UpI have implemeted a CollectionEditor is my custom control. It now sucessfully serializes and adds my items into the collection. Add/Remove succesully add or remove source code. However is there somthing special that needs to be done in order for VS to clean up the ColledtionEditor item code when the object is deleted by the user? Thanks.
-
Design Time Events?Thanks for all your information ... I am playing with this I have not found any good example code ... I will be excitinly waiting for your article!
-
Design Time Events?I recently developed my first full custom control. It is a is a simple tab control that mimics VS.NET 2005 look and functions. What I am trying to accomplish next is adding design time support. I have read tutorials and articles on this, but I am try to figure out how to add certain events to the control once it is added to a form. For eaxmple I want the developer to be able to switch tabs in design time. What has to be done in order to accomplish this? Thanks in advance. CBN