|
|
Can somebody tells me how long the connection to the database stays open if the connetion is not closed in the function.
If connetion stays open, meanwhile can we do the database restore or backup. Will that cause a problem.
Thanks
|
|
|
|
|
i am not sure but as the expierience says open connections will be closed automatically after sometime that is being idle,
for backing up and restore u should close all open connections(u can simply drop the database) ,otherwise u'll recieve error
|
|
|
|
|
I am not convinced why one need to have database connection closed while performing the database backup. However, database restore make sense.
Can you elaborate little more or perhaps a resource that may help me out.
|
|
|
|
|
A couple of the most obvious reason for me would be, a database may not flush data to disk until a connection is closed, or a connection could be in the middle of a long running operation, possibbly in a transation or not, backing up the database when this long running operation is in the middle of doing what it needs to.... Your data if you restore it in the backed up state you'll have data corruption.
|
|
|
|
|
inner code {
Public class thePatient
{
public class theName
{
public string use;
public string prefix;
public string FirstName;
public string Middle;
public string LastName;
public string Suffix;
}
public theName[] Name;
public thePatient()
{
Name = new theName[1]; <-- How do I properly declare this
}
}
public CN()
{
Patient = new thePatient();
}
}
I don't want set the number values in the array in the class... How do I declare that value properly... and yet be able to have multiple name objects when referencing this nested class.
It would be even better if I could use an 'Add' and 'Remove' concept.
modified on Wednesday, March 25, 2009 3:19 PM
|
|
|
|
|
Go for list instead of array if you are not sure of the size at design time. It will also give some useful complimentary methods which are not there in array.
जय हिंद
|
|
|
|
|
plus I like it too
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKQUFK[M`UKs*$GwU#QDXBER@CBN%
R0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
-----------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Why not use a generic list?
public class Patient
{
public Patient()
{
_Names = new List<Name>();
}
private List<Name> _Names;
public Name[] Names
{
get { return _Names.ToArray(); }
}
public void AddName(Name name)
{
_Names.Add(name);
}
public void RemoveName(Name name)
{
_Names.Remove(name);
}
public class Name
{
}
}
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
Hi,
I am fighting with COM again , ow I'm struggling with following problem:
Let's say we have COM interfaces defined as:
IA : IUnknown
IB : IA
IC : IB
What I've tried to do is creating C# interfaces:
[ComImport, System.Security.SuppressUnmanagedCodeSecurity,
Guid("00-this-is-valid-guid-000"),
InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
interface IA
{
method1();
}
The same for IB, with following difference:
interface IB : IA
IB does not duplicate IA's methods. The same for IC.
Now, when I try to create instance of IC using other COM method (from another interface) I receive error (Exception from HRESULT: 0x88990012 to be exact - but I guess that wont be helpful).
When I copy-paste method1() from IA to IB, and remove inheritance, but leave inheritance between IB and IC the code seems to work. What is even more surprising, I have pretty the same situation with other "inheritance tree" (IA -> IE -> IF) and I don't have problems with them, what is even funnier, when i completely remove IA, interfaces IE and IF are working properly. Does anyone have an idea what is exactly going on, or have any references that could help me solve that one? (I've read tons about marshalling and COM on msdn, but I haven't found answer for this one).
To be exact: All methods from interfaces are defined in correct order (the same order as in *.h file), but some methods has invalid argument (no arguments, even though they should take some, this seems to not break anything, as long as those methods are not invoked of course, and make developing easier (I start with blank ones, and fill the ones I need).
|
|
|
|
|
hi
how can insert a button into textbox left such as component one or dat net bar with object oriented programing
i mean inherit from textbox and button
thanks every one
|
|
|
|
|
1. Create a panel with same background color as that of your textbox.
2. Place your textbox in the panel with border set to none.
3. Add a button to the panel.
4. Set the size for each of them such that it looks like a textbox with button in it.
5. Use proper anchoring and dock to make sure the appearance is same regardless of size of the form.
If you need to use this in many places, make this a user control. Or else you can do this directly on your form if you are using this only in one form.
जय हिंद
|
|
|
|
|
yes i need many times but i have some problems
i must create a class library project or windows control library project?
thanks
|
|
|
|
|
IMO WindowsControlLibrary project or
In your project, right click and select Add -> User Control
जय हिंद
|
|
|
|
|
It really is about time microsoft gave us a more flexible text box. The one we have is the Win32 one that's been around forever and doing anything imaginative with it really is an uphill struggle. It's probably the most used control, but the least adaptable IMO.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
Maybe you could try out WPF controls. Provides a lot of amazing functionalities for all the controls including text boxes.
|
|
|
|
|
They want us to use WPF to do anything like that. Although the textbox is not that adaptable, we can always accomplish things using border styles, colors and containers.
जय हिंद
|
|
|
|
|
Take a look at this article[^].
The section entitled 'The XMLEditorChooser Dialog' shows a dialogue with a control similar to the one you are describing. THe source is in the source code for the article. Why not use it as a base for your own control.
If you improve on it, significantly, write an article and let us all have the benefit.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
hey is there any control to show data graphically in winforms. if yes then from where i can get learning vedio of that control.
thanks in advance
|
|
|
|
|
I've answered your original question a few posts down
|
|
|
|
|
Hello,
I developed an application that uses Word for word processing, I used this example
http://www.codeproject.com/csharp/wordml_template.asp
but I met a problem when I put my window in topmost = true
other windows displayed in Ms WORD background.
how can i do to resolve the problemes.
Thanx
|
|
|
|
|
hey is there any control to show data graphically in winforms. if yes then from where i can get learning vedio of that control.
thanks in advance
|
|
|
|
|
First of all, thank you. It's been far too long since I saw a new member ask a question without expecting the full source code. With regard to your question, what form of graphical data? Images are displayed in the System.Windows.Forms.PictureBox, while graphs are usually custom-made
|
|
|
|
|
costum made!
any idea how to make?
i want it just like task manager performance graph
|
|
|
|
|
There are lots of 3rd party softwares available for this. In case you do not need to use them, them you can create excel charts through code.
जय हिंद
|
|
|
|