|
Perhaps this would be more soapbox / lounge material, don't you think??
|
|
|
|
|
You are just not my type.
CCC solved so far: 2 (including a Hard One!)
37!?!! - Randall, Clerks
|
|
|
|
|
|
And that is why you provide an e-mail link?
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|
|
I was new and uneducated! Now I have to block his emails (8 so far in 10 minutes) and remove the link.
|
|
|
|
|
We have a flood of unusually clueless people right now. I suspect they are mostly CSS.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
hi
i developed an application that used a datagridview to show the records and it will frequently update (insert a record or delete a record)
some times datagridview will crash and show me a big red sign (like a big "x") on the full client rectangle of itself!
i do not know what is going on and what statement cause this problem and how can i prevent the problem?
what should i do ?
thanks in advance...
|
|
|
|
|
I'd suggest debugging.
PS Liquid Nitrogen will do also.
|
|
|
|
|
i have done that with simple debugging but the problem still persists and i do not know what should i do and what cause this problem
please explain me more
|
|
|
|
|
I have the same problem
|
|
|
|
|
and at last i get the answer:
in fact , there is a malicious thread that want to access my DataGridView !
some thing like a high frequently repeatable time tick or ...
in fact i had to use this.Invoke() with parameters that will rise the update DataGridView Method!
i used the fallowing solution!
delegate void AddDatevalueHandler(object[] newRow);
delegate void DeleteDatevalueHandler(string deletedRow);
.
.
.
private AddDatevalueHandler AddHandler;
private DeleteDatevalueHandler deleteHandler;
.
.
.
AddHandler = new AddDatevalueHandler(AddData);
deleteHandler = new DeleteDatevalueHandler(DeleteData);
.
.
.
object[] param ={ NewRow };
this.Invoke(AddHandler, param);
.
.
.
private void AddData(object[] NewRow)
{
dataGridAlarms.SuspendLayout();
ds_main.Tables[0].Rows.Add(NewRow);
dataGridAlarms.ResumeLayout(true);
}
private void DeleteRow(string ID)
{
dataGridAlarms.SuspendLayout();
this.Invoke(deleteHandler, parameter);
dataGridAlarms.ResumeLayout(true);
}
good luck
|
|
|
|
|
I have a question about GUID. I created a calender admin program that stores event data in an xml file. The xml file consist of an element called call ID. I am using ID as a key. Each event has a unique id.
My code generates a GUID for each new event. Currently I set up a method in my code behind to see if the GUID exist before I except the value of the new GUID. My understanding the sytem should generate a unique GUID each time you create one. I am thinking it is possible to get a duplicate GUID value, for example if I move the application to a new server.
Is this good practice or just a waste of resources?
Thanks,
David
|
|
|
|
|
Better safe than sorry.
I generally use a database, so the GUIDs I generate as primary keys gets checked by the database engine. But, yes, they do get checked and an Exception will be thrown if a duplicate is ever detected.
If you are creating your own database, you should perform the check.
|
|
|
|
|
According to MSDN (Remarks)[^], GUIDs are as globally unique as possible. The probability of seeing two the same in the world (universe?) is very low. The probability of seeing two the same on a single PC is infinitesimal. Your process looks fine, if you hit a duplicate then just generate a new one and continue. Alternatively you may like to consider a simpler key, such as time and date, sequence number, combination of the two etc. It all depends on how many items you expect to be storing.
|
|
|
|
|
I ended up rewriting an old calendar app because of the duplicate key problem. I will leave the duplicate check code in thier just in case, it seems like the fastest solution.
The amount of data depends on the client, I have some clients who enter large amounts of event, in those cases I push them to using sql server.
|
|
|
|
|
I once managed to get SQL 2005 to generate duplicate GUIDs. My insert statement managed to generate set of three identical GUIDs pretty consistently. Unfortunately we could never replicate this outside of our, rather large, application and so ended up just doing it differently. It was probably to do with the records being generated within the same millisecond, and so not that likely in most applications.
So, yes you should definitely check. While in theory you should never get duplicates I have had them to often.
If you have knowledge, let others light their candles at it.
Margaret Fuller (1810 - 1850)
www.JacksonSoft.co.uk
|
|
|
|
|
Hi,
How to Browse my Basic .aspx file with HTTPS instead HTTP, I come to know that it is possible through SSL, Is it any other way I can browse Page with Https.
I want to transfer a page which is cxml file with http how can i do it.
|
|
|
|
|
The only way to view any web page over https is to enable ssl connections to your webserver. That is what https means. However the resulting webpage will look the same either way so I would not bother to enable https connections on a development server, only on your live web server.
For details on how to set this up check out some of these sites[^].
If you have knowledge, let others light their candles at it.
Margaret Fuller (1810 - 1850)
www.JacksonSoft.co.uk
|
|
|
|
|
|
that's three filled circles: big black, medium white, small black.
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|
|
Thanks.
Couldn't we draw it with a circle command ?
|
|
|
|
|
what's a "circle command"?
I'd use Graphics.FillEllipse()
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|
|
I suppose you could just use simple clipping when drawing these circles.
Life is a stage and we are all actors!
|
|
|
|
|
hi,
can anyone tell me that is it possible to generate report with crystal report from windows service.
thanks
tbhattacharjee
|
|
|
|
|
Hi,
I have to read an xlsx file in which there are multiple columns. One of it is a 'Date' column type. I am using OLEDB with Microsoft.ACE.OLEDB.12.0 as the provider. The problem is, suppose if there is a non date value (Error data) in the column the oledb is replacing the error data with null. I have a requirement to show the all data (good data as well as the error) to user who is reading the excel file into our database.i.e. i dont wnt the engine to convert the value to null
When reading xls file,which can be done by using Microsoft.Jet.4.0 provider, we can overcome this by changing property of IMEX=1 and changing the 'Typeguessrows=1' in the registry. But unfortunately this provider cannot be used for reading an xlsx file.
Can anyone help me how to overcome this problem??? I have also listed down the code below which i am using for reading the file
DataSet ds = new DataSet();
OleDbConnection con = new OleDbConnection(@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + FileName + ";Extended Properties=\"Excel 12.0;HDR=YES;IMEX=1;MAXSCANROWS=0\"");
con.Open();
try
{
DataTable dt = con.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);
string sheetname = dt.Rows[0]["TABLE_NAME"].ToString();
OleDbDataAdapter myCommand = new OleDbDataAdapter(" SELECT * FROM [" + sheetname + "]", con);
myCommand.Fill(ds);
}
catch (Exception ex)
{
string exce = ex.Message;
}
finally
{
con.Close();
}
return ds;
|
|
|
|