|
How do I log exceptions to SQL Server database using Enterprise Library Exception Blocks.
Any code samples available??
|
|
|
|
|
Greets all,
I want to access task data from Microsoft project 2003. I'm finding it hard to find information on how to do this on the web and was wondering if anyone has any experience doing this.
I'm looking for a starting point I guess. So far I have just seen that I can do a plug-in for excel or another Microsoft product, but I want to access Project data from my own custom application.
Would appreciate any insight you guys could give.
.:. Keno .:.
|
|
|
|
|
i need to print array datas within a schema i want. is it possible?
|
|
|
|
|
Why shouldn't it be?
modified 12-Sep-18 21:01pm.
|
|
|
|
|
is but how can i do that?
|
|
|
|
|
i need to save the data of a structure inside a textfile and read it again to get back that datas.
struct mystruct{
int num;
string name;
bitmap mybmp;
}
how could i do?
|
|
|
|
|
Use serialization. Look for the System.Runtime.Serialization namespace. There you'll find BinaryFormatter and SoapFormatter classes. Serializing and deserializing is very simple
mystruct s = new mystruct();
using (FileStream f = new FileStream("Test.bin", FileMode.Create))
{
new BinaryFormatter(f).Serialize(s);
}
using (FileStream f = new FileStream("Test.bin", FileMode.Open))
{
mystruct m = (mystruct)new BinaryFormatter(f).Deserialize(s);
}
Just make sure that the struct and all its members have the [Serializable] attribute set.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
what is [Serializable] field?
How can i create that for my own structure?
|
|
|
|
|
Just replace this
<br />
struct mystruct{<br />
int num;<br />
string name;<br />
bitmap mybmp;<br />
};<br />
with this:
<br />
[Serializable]<br />
struct mystruct{<br />
int num;<br />
string name;<br />
bitmap mybmp;<br />
};<br />
|
|
|
|
|
Hai is there anybody who can Help me?????
I want to create a window service programme which should include a user interface.
If you know please give me a help?
thank you.
|
|
|
|
|
Windows Services do not have a user interface and are often run without a user logged on. To create a Windows Service derive from the System.ServiceProcess.ServiceBase class. To write a controller for your Windows Service create a WinForms application and use the System.ServiceProcess.ServiceController class. A little searching on those classes and you should be able to find plenty of samples.
|
|
|
|
|
Hello All,
How can i dispaly the first recorde in the combobox blank when it is binded with the datasource
Regards
Hay
|
|
|
|
|
Change the dropdownstyle property to dropdownlist.
|
|
|
|
|
Yes i changed it but no impact it still dispaly the first record.
Thanks
|
|
|
|
|
|
ComboBox1.Items.Add("Washtington DC");
ComboBox1.Items.Add("second values");
ComboBox1.Items.Add("third value");
the ComboBox1.Items.Add("Washtington DC"); will be the first value in combobox when u run ur project.
But u have to fill ComboBOx in Form1_Load Event otherwise it will not works
|
|
|
|
|
Thanks for your reply
but the add method dosnt work when the combobox binded with datasource.
Hay
|
|
|
|
|
U have to fill it from DataBase or u trying to fill it manyally by filling urself.
if u not using dataBase the method Add have no way to do not work.
Or I suggeset you to open new C# Windows Application then drop one ComboBox and begin filling using Add method.
I hope this heslps you...
|
|
|
|
|
Thanks so much about your help.
The problem that i fill the combobox from the database and the add method dosnt work when the datasource work.
Thanks
Hay
|
|
|
|
|
i hope this helps u now
comboBoxState.DataBindings.Add("SelectedValue", customersDataSet1, "Customers.Region");
|
|
|
|
|
hi,
When i am filling a dataset from oracle table, I am getting an error 'Overflow OCI-22053'. This caused by the numeric field. There is the solution available in microsoft site also. But I just can't understand.
Please help me.
VS 2003
Uday Shetty
|
|
|
|
|
It sounds like the number you are passing in is just too big. If the numeric field only supports a max value of say 65535 and you pass it in a long value that's say 1234567, then it will throw an overflow exception. I guess a way to fix it would be either to change the size of the numeric field in the database, or if that's not possible you can return an error to the user or just set it to the max size and ignore the rest of the number.
-- Rocky Dean Pulley
|
|
|
|
|
Is there an elegant approach to specifying an argument list for a method at run time? I'm working on an app that makes a set of analysis of a data set. Which analysis and to make and in which order order is specified at run time. I'd like the class to be able to inform a class that calls it what arguments are needed.
Using a params object [] array in the argument will of course give me complete freedom for consuming what ever is submitted, but doesn't provide a mechanism for telling the program what to put into the array.
class MyData{}
class DataStudy{
MyData InputData;
}
class DataAnalysis{
static float Average(MyData InputData){}
static float WeightedAverage(MyData InputData, float weightfactor){}
static float WeightedMomentAverage(MyData InputData, float weightfactor, float momentfactor){}
}
Thanks.
cmayo
|
|
|
|
|
Have a look at the System.Reflection namespace.
If you have a Type object (can be got via object.GetType() ) try the GetMethods and GetProperties functions. They will give you objects describing the methods with all their arguments.
|
|
|
|
|
Hi,
I am trying to pInvoke a vc++ dll from c#, the c# code
try to pass an integer into the dll and change
the global variable declared in the c++ dll, but it failed.
The global variable (int) changed inside the c++ procedure called by
the c#, but once the program run outside the procedure, the global
variable restore to its original value, why ?
And how can I change the global variable declared in the c++ dll when pinvoke by c# ?
Thanks
|
|
|
|