|
|
|
Go back to the article, and send the author a message there - use new message at the end of the article. That way they get an email to say you need help, rather than relying on them dropping in here and spotting your request.
All those who believe in psycho kinesis, raise my hand.
My 's gonna unleash hell on your ass. tastic!
|
|
|
|
|
Hi folks,
I am entering data into the db from a winform. The save button handles the insertion of the form data into the db. The form has
all fields for insertion into the table. Some field of the table are set to database defaults like getdate() and suser_sname .
When I hit the save button .... the default values are not getting interted into the db they are NULL when i query the db.
please provide you suggestions to relove this issue . thanks
|
|
|
|
|
I think we will need to see the code for the save button - please use the "code block" widget when you post it.
All those who believe in psycho kinesis, raise my hand.
My 's gonna unleash hell on your ass. tastic!
|
|
|
|
|
{
tbSystem tb = new tbSystem();
tb.System_DeliveryDate = System_DeliveryDateDateTimePicker.Value;
tb.System_Description = System_DescriptionRichTextBox.Text;
tb.System_Name = System_NameTextBox.Text;
tb.System_Priority = (int)System_PriorityComboBox.SelectedValue;
tb.System_Status = (int)System_StatusComboBox.SelectedValue;
try
{
tmx.tbSystem.InsertOnSubmit(tb);
tmx.SubmitChanges();
}
catch (Exception ex)
{
throw new Exception(ex.Message);
}
MessageBox.Show("Date is Validated and saved");
}
|
|
|
|
|
Check ur query otherwise it is not possible to face this type of problem.
(And past code also, For more exact answer)
Syed Shahid Hussain
|
|
|
|
|
Just pasted code in the reply above
|
|
|
|
|
i dont know if there is a way but when i face like this problem i did for loop to check if there is a null value and replace it with 0.
i hope that will help
|
|
|
|
|
Hi All,
I want to add description to already installed service.
Help Please
Regards,
Sunil G.
|
|
|
|
|
On the registry, change the "Description" key under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\yourservice
|
|
|
|
|
Just a simple question
Is System.Array a collection ?
If it is, then why doesnt it come in the System.Collections namespace ??
The name is Sandeep
|
|
|
|
|
System.Array is a collection, it also implements System.Collections.ICollection .
Xandip wrote: If it is, then why doesnt it come in the System.Collections namespace ??
Because somone in Microsoft decided it would be best sitted in the System namespace! Possibly this is because it has a close natural affinity with the primative (object[] type) arrays.
CCC solved so far: 2 (including a Hard One!)
37!?!! - Randall, Clerks
|
|
|
|
|
If you create your own collection, would you put it there?
|
|
|
|
|
How to get exception Code in C#?
This Code just Show Error Message :
try
{
}
catch(Exception ex)
{
messagebox.show(ex.Message);
}
|
|
|
|
|
Hi,
exception is a way to provide information about an unusual behavior in a method. Sometimes this behavior is caused by an error. What you want is the error code. So the "default" Exception class you are catching does not provide an error code
http://msdn.microsoft.com/en-us/library/system.exception.aspx[^]
But if the specific class of the exception thrown by the called method contains a code, than you can receive this code by accessing the property from the exception (you have to cast before or catch a more specific type).
If you need further help I recommend to post the code also, causing the exception.
Regards
Sebastian
|
|
|
|
|
1) for example : System.FormatException
try
{
int i = int.Parse("Hi Thanks for your Help!");
}
catch (Exception ex)
{
Type tp= ex.GetType();
}
catch (FormatException Fex)
{
Type tp= ex.GetType();
}
2) where we can get all Exception types?
|
|
|
|
|
1) you have to catch the FormatException first. And as second one the common Exception. When not, the FormatException will never be catched, because a FormatException is an Exception.
2) Nowhere, because Exception are classes which can be derived from. So there are thousands of Exception types out there (waiting to be catched ) (For all framework exceptions you can browse through msdn...)
3) Maybe you can explain what you want to achieve? To get an idea for exception handlung start reading this msdn article:
http://msdn.microsoft.com/en-us/library/ms173160.aspx[^]
Regards
Sebastian
|
|
|
|
|
Before all Thanks for your attention and Help !
I want to translate Exception to my Language (Persian,Farsi) then show the translate exception.(Note: I dont want to write down the error in catch like bellow:
try
{
}
catch
{
messagebox.show("Not like this");
}
OR
try
{
}
catch(Exception ex)
{
messagebox.show("Not like this");
}
OR
try
{
}
catch(FormatException ex)
{
messagebox.show("Not like this");
}
|
|
|
|
|
Isn't this exactly the same question that you posted three hours ago under the title ERROR?
It is generally considered bad form to post the same question multiple times.
|
|
|
|
|
You have been give the answer to this already; try reading the MSDN documentation on C# exceptions.
MVP 2010 - are they mad?
|
|
|
|
|
U can open a dialog by following way(Win7 OS):
Control Panel\All Control Panel Items--Network and Sharing Center
bellow View your active networks
CLICK Connections:local area connection ,you can see a window about local area connection status.
I want to get information on this window,such as
General-Connection-
IPV4 Connectivity : Internet
IPV6 Connectivity : No network access
Thanks very much!
-------------------------------------------------------------
i find that IPV4 Connectivity value is a best way to detect the availability of Internet.Using Ping Ip or get request from server is NOT a reliable way.
modified on Thursday, January 28, 2010 8:36 PM
|
|
|
|
|
|
I've used wmi ever ,but the API called Win32_NetworkConnection don't fit my requirement.
or
[DllImport("wininet.dll", ExactSpelling=true, CharSet=CharSet.Ansi, SetLastError=true)]
private static extern bool InternetGetConnectedState(ref int lpSFlags, int dwReserved);
I only want to get the status the same as I mentioned from my question.
|
|
|
|
|