|
Hello,
You are wellcome!
But let me say, that I'm sure you would have finished this task much faster by using google.
All the best,
Martin
|
|
|
|
|
Sonia Gupta wrote: Reason is , i have to take the backup of the database , at regular intervals.
You should be using SQL Server's built-in backup facilities rather than trying to back up the data and log files as files. Use SQL Agent to schedule backups of the database and (if applicable) transaction logs.
Many backup products (e.g. Backup Exec) include support for backing up SQL Server through SQL Server's backup API.
If you're running SQL Server 2005 on Windows Server 2003, backups of the files through Volume Shadow Copy services are possible. However, you should prefer to use SQL Server's own backup facilities where possible.
If you want to perform a backup under programmatic control, rather than scheduling a job, you can use the BACKUP DATABASE command.
If you don't fully understand the transaction log, you should set the database to use the Simple recovery model. This will allow you only to restore the last full backup - any operations performed after the backup was started will be lost. If you leave it using the Full or Bulk-Logged recovery models, after performing a full backup through the SQL Server API, the transaction log will retain records of all operations performed in order to allow recovery to the point of failure.
These records are only cleared when the transaction log is backed up through SQL Server's backup API or the BACKUP LOG command. The log is not cleared after performing a full backup. Typically this means that the log file will keep growing, depending on the log growth configuration. If the log cannot grow any more due to hitting the limit configured, having autogrow disabled, or running out of disk space, the server will fail the operation.
DoEvents: Generating unexpected recursion since 1991
|
|
|
|
|
I am displaying an image in picture box in stretched mode.
I want to draw line on the image on mouse click.
As the image is stretched, the line is not getting drawn exactly between point selected.
How can we draw a line so that it is exactly drawn according to the pictureBox clicked points?
Thanks in advance
|
|
|
|
|
Hello,
If you are painting on the pictureBox Graphics object, the "SizeMode" should not make any difference.
In this test project I placed a PictureBox on a Form handelt the Events:
MouseDown
MouseMove
MouseLeave
MouseUp
Paint
bool downok = false;
bool draw = false;
bool end = false;
Point startPoint = Point.Empty;
Point endPoint = Point.Empty;
Pen linePen = new Pen(Color.Red);
private void pictureBox1_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
{
draw= false;
downok = true;
end = false;
startPoint = new Point(e.X,e.Y);
}
private void pictureBox1_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e)
{
if(!end)
{
if(downok)
{
draw = true;
downok = false;
}
endPoint = new Point(e.X,e.Y);
pictureBox1.Invalidate();
}
}
private void pictureBox1_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e)
{
if(!end)
{
endPoint = new Point(e.X,e.Y);
pictureBox1.Invalidate();
end = true;
}
}
private void pictureBox1_MouseLeave(object sender, System.EventArgs e)
{
if(!end)
{
pictureBox1.Invalidate();
end = true;
}
}
private void pictureBox1_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
{
if(draw)
{
e.Graphics.DrawLine(linePen,startPoint, endPoint);
}
}
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
if(linePen!=null)
{
linePen.Dispose();
linePen=null;
}
}
base.Dispose( disposing );
}
All the best,
Martin
|
|
|
|
|
Your best bet is to forget about the picturebox, draw the image onto your screen, and then draw the lines on top, using code similar to the code someone gave you. The key point is that the picturebox becomes a waste of time, just draw direct onto your form in your paint event.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi All,
As my subject says all that I have been struggling with the same exception as "A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond".
The scenario is I am using socket programming to send some data to the client machine from my server using a web service. I have tested around 50 odd cases in which the same exception is raised in around 10 cases and rest is delivered successfully.
Can anybody help me out with this exception? Exception details are pasted below -
System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
at System.Net.Sockets.TcpClient.Connect(IPEndPoint remoteEP)
As far as fire wall and antivirus is concern, as mentioned before few cases are reaching to the client machine and few are not. So can anybody help me out of this problem.
Thanks in Advance....
Ankur
|
|
|
|
|
It seems that your connection timed out
SkyWalker
|
|
|
|
|
hi everyone,
can i fix the column width of the listview? example: i have Column1 width=100, Column2 width=200. i don't wan't the user resize the column? because i have some column hidden. hehe. is there any property of listview no resize column?
Thank You.
if(you type your code here) {
Messagebox.Show("You help me a lot!");
}
else {
You help me = null;
}
|
|
|
|
|
I can't remember if there is such property but if there is not, you can handle ColumnWidthChanging event of the listview class and cancel the event
|
|
|
|
|
Hi,
I would like to customize the display i receive from datetime time picker into a message box.
That is my motive is to display the date in a message box in 0131 format ie mmdd.
But right now it is displaying as 01/31.
Am working in C#.
Is there any way to do this and how.
I have treid these but its no good.
string str1 = string.Format("{0:mmddyy}",dateTimePicker1);//string.Format("{0: mm}",str);
//MessageBox.Show("The Name of the Database is CustList_PGE_" + dateTimePicker1.Text);
//MessageBox.Show("The Name of the Database Table is CustList_PGE" + dateTimePicker1.Text+08);
Thanking you
|
|
|
|
|
use the following:
YourDateTimePicker.Format = DateTimePickerFormat.Custom;
YourDateTimePicker.CustomFormat = "MMdd";
SkyWalker
|
|
|
|
|
Awesome.i got it.
Thanks a lot
|
|
|
|
|
Hi, I was wondering if anyone could explain how to implement this in c# ,could point me towards any tutorials or tell me if its even possible.
Is it possible to play sounds through my microphone input not recorded through the microphone but from a pc sound source.
e.g. play an mp3 on my computer so it plays to my pcs microphone input on say msn messenger . (please dont reply with just put ure speaker by the microphone )
thanks for any help.
|
|
|
|
|
I don't believe you can make this happen without connecting the two via a cable ( the output and the input )
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Does anybody have sample code for creating transparent textbox?
I got some sample code in this site (AlphaBlendedTextBox) but it has some problems related to memory leaks and invalidating controls.
Thanks
|
|
|
|
|
Your best bet is probably to write your own. The textbox control wraps the C++ textbox, which is the nastiest control of them all, especially for custom painting.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
It is 0448hrs and I have just written the following...
public class LifePanel
{
public LifePanel(string UserID , string CssClass)
:this(UserID , CssClass , false)
{
}
public LifePanel(string UserID, string CssClass, bool forceImage)
:this(UserID, CssClass)
{
}
}
G'nite....
so you answer don't be scared of failure
The only failure is never to try
Things You've Never Done - Passenger -2008
|
|
|
|
|
This should really be in the Coding horrors forum. Go on - you know you want to.
|
|
|
|
|
My Web App want to access a share folder //IP/share/detail. The folder "detail" was shared to everyone.
in Web.Config
identity impersonate="true"
was added.
in machine.config
processModel userName="SYSTEM" password="AutoGenerate"
userName was changed.
In code
File.Exists("//IP/share/detail/"+fileName)
It return false although the file exist in the folder. Do you have any idea why the file cannot be access?
|
|
|
|
|
Are you sure the process is using impersonation and not the built in ASP.NET account? Change your IIS settings to force Windows Authentication and try again, if it works then you know it is an impersonation failure of some sorts.
Need a C# Consultant? I'm available.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
|
|
|
|
|
My goal is to make a web service that does NOT need to be restarted anytime an enumeration (and therefore, a dll) changes. Enumerations are changed from my code periodically using System.Reflection.Emit to make them match a database where a second application may update those values at some unknown interval. Therefore, I am dynamically updating a referenced dll using System.Reflection.Emit from within my web service, and I would like to reload the dll reference after the update so my application can use the latest version of the enumerations. Is there a way to do such a thing? Any help is greatly appreciated,
Sounds like somebody's got a case of the Mondays
-Jeff
|
|
|
|
|
Yes, you can reload the page, but that will make IIS restart the appication to recompile, just the nature of the beast.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
I am trying to load a Korean string resource from a DLL.
I use LoadStringW, after setting Thread.CurrentThread.CurrentCulture to Korean, using PInvoke from C#.
The string I'm trying to receive should be comprised of the following 5 characters:
0xc6a9 0xc9c0 0x002f 0xd488 0xc9c8
however what I get is:
0x00a9 0x00c6 0x00c0 0x00c9 0x002f
Note the relationship between what I expected and what I received.
Anyone have ideas on what I'm doing wrong?
(I hope this is the most appropriate forum, I checked and did not find one API or Internationalization specific)
Thanks,
Don
donrau@hotmail.com
|
|
|
|
|
What does your PInvoke signiture look like? I would declare that method as follows:
[DllImport("user32.dll", CharSet = CharSet.Unicode, EntryPoint = "LoadStringW", SetLastError = true]
public static extern int LoadString(IntPtr hInstance, uint uID, StringBuilder lpBuffer, int nBufferMax); Does this match your declaration? Hope this helps,
Sounds like somebody's got a case of the Mondays
-Jeff
|
|
|
|
|
Thank you so much! It works now. You've made my week!
I've burnt many hours on this. I did not have the CharSet attribute. None of my research mentioned it and PInvoke.Com did not include it in any of the declarations found there. I'm not sure why the compiler needs the clarification of this attribute to do the correct thing, or what it was doing in it's absence.
Thanks again, your a life saver.
Don Rau
|
|
|
|