|
Hi leppie,
MSDN has tens of sub-forums, and not dedicated debug or WinDbg forum. Which sub-forum in MSDN forum do you mean?
regards,
George
|
|
|
|
|
Just a thought, in case you haven't got an answer. You are aware that Program.Foo from your debugger command and Program.foo which you've declared in the class aren't the same name, as C# is case sensitive.
|
|
|
|
|
Thanks trichards57,
You are correct, cool!
regards,
George
|
|
|
|
|
Hello
I need to execute oracle procedure in c# code. Also I need to add all retrieved records in list of objects and display in data grid. How to do this?
Regards,
Leena
|
|
|
|
|
|
hi,
how do i count the opened mdiChild Forms in Parent Form?
|
|
|
|
|
this.MdiChildren.Length; if in parent or this.MdiParent.MdiChildren.Length; if from a child.
Dave
|
|
|
|
|
|
Hi,
I have more than 10 users inserting records at the same in one table throughout the day and most of the time I have problem mixing data. I have a header/detail entry form web page.
My insert occurs when the users click the Submit button, it will SELECT the next available number from DB and use it as my Primary key to insert record (header/detail).
Most of the time 2 users get the primary key at the same time.
If you could redirect me to the site with has the solution in locking or help me in my problem
My Solution but sometimes it failed.
bool blnExist = false;
while (!blnExist)
{
string sKdey = PopulateDraftNumber();
if (IfKeyExists(sKdey))
{
blnExist = false;
}
else
{
blnExist = true;
lblRequestNo.Text = sKdey;
INSERT RECORD INTO TABLE
}
}
Dabsukol
|
|
|
|
|
Generating the Key while inserting should be the responsibility of the server at the insertion time. I mean what you do is:
1- Ask the server for a key -In a very poor performance way by the way!-
2- Attach that key to my Record
3- Send record to server
So between step 2 & 3 another clients gets the same record. The right thing to do is
1- Send data to server without a key
2- The server generates a key for the new record
3- The server locks the table for update
4- The server inserts the record in the table
5- The server unlocks the table
If you're using ADO/SQL, Then define your key comlumn type as IDENTITY. It will auto increment by itself upon insertion of new records. Otherwise you'd have to do it manually.
Regards
|
|
|
|
|
Thanks,
I have existing table with more than 50K records and it is running live at the moment.
For now, I can't modify the table to have another columns with type IDENTITY.
I have two step in inserting records.
First is where I have the problem to get the TMP key, once everything is finalized I users will click the SUBMIT button. it goes to step two.
Second step is to update the key to its original format "yymm-sequence" and I am already using your recommendations.
What I want is a locked statement.
1- Ask the server for a key -In a very poor performance way by the way!-
(What is your recommendation, I generate akey on my own? without connecting to the DB?)
2- Attach that key to my Record
-- I WANT SOME SORT OF LOCKING HERE ON THIS PART BEFORE STEP 3 ---
3- Send record to server
Thanks.
Dabsukol
|
|
|
|
|
Nader Elshehabi wrote:
3- The server locks the table for update
It's the server's problem, not the disconnected client to generate & implement the key. That's what is making you problems. You should re-layer you design.
If your DB is on a local network, I suggest upgrading it to another level. You're talking about 10 persons currently, but I believe you should think of the right way to do it. You already go 50K records we don't want to lose that if things got nasty!!
My suggestions:-
1- Take another look at your software design -Client/Server layers-
2- At least upgrade your table be calling an ALTER TABLE ADD COLUMN NewIndex IDENTITY(1,1) , & shut down the work for upgrading at least an hour. You can do it like this:
1- Make a test local database
2- Fill it with sample data
3- Upgrade the code of the client & the database to handle the new key
4- Try the upgrade
5- Shut down the original DB for 10 mins for maintenance, and Upgrade both DB & all clients.
6- Everyone ishappy = true; & no more bugs
Regards
|
|
|
|
|
If you can't use an identity column, a common pattern is to have a sequence table that contains the next sequence number for your table. Then, your code creates a transaction, updates the table to add 1 to the sequence number and then select from the table. The trick here is that the transactional update will lock the sequence row and then you select the record to retrieve this value - the beauty here is that the update lock prevents anybody else getting to the record until you commit the transaction.
|
|
|
|
|
Hi,
I have some question about running threads in C#.
I have some thread that running on my system. The thread will stop in one case ... if some boolean variable will turn on.
So, in some places in the code i read the value of this boolean and only in one place in the code i write a value to this boolean.
When i writing the value to this boolean i lock the variable ( because its critical section ) but when i read from this boolean I'm not lock this variable.
I not sure i doing the right thing in this case - i mean that I'm not sure that reading without locking the boolean is the right way.
Do i need to lock the boolean in the reading also ?
|
|
|
|
|
Yanshof wrote: Do i need to lock the boolean in the reading also ?
No you don't. You even need the lock if more than one thread writes to the boolean.
Regards
|
|
|
|
|
Hi, what modifications should I do to add "editing" functionality to DataGridViewImageCell. I need a cell that has Image external representation and Text internal representation. I know how to get a Text string from Image name and vice versa for my case.
What class should I derive from and what I need to modify?
|
|
|
|
|
You are in the right direction. You should derive from DataGridViewImageCell class, and set your DataGridViewImageColumn.Template property to that class.
For the editing support, there is a control associated with each DataGridViewCell. I believe you should set MyNewImageCellType.EditType = typeof(TextBox); or something!
Regards
|
|
|
|
|
I was in the production of a C / S procedures, in the left up a tree structure,
Click on the left want a project, the right to show the specific features of the item (the corresponding interface)
If the B / S procedures, I can create a frame directly on the left click on the link
If I can use Notebook delphi such a container control, in the production of many panel then Notebook.ActivePage = panelX on the ~!
The VS2005 how to achieve this function should be »
|
|
|
|
|
You question is totally unclear. If you're asking about visual studio itself, then this is the wrong forum. There is another forum for Visual Studio language-independent questions. Here is for questions about C# -C Sharp- language only!
Regards
|
|
|
|
|
i want to change the DGV event calling sequence but dunno how to do ? here is current DGV event calling sequence :
Mouse Down <br />
Selection Changed <br />
Mouse Click<br />
Mouse Up
what i want is :
Mouse Down <br />
Mouse Up<br />
Selection Changed <br />
Mouse Click <br />
that mean if Mouse Up event not called then other rest should not call also
is there anyway to change this or any other way to solve this?
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)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Xmen wrote: is there anyway to change this
Nope! Post your real problem. The one you want to change the sequence of events to solve. Maybe we can figure that out.
Regards
|
|
|
|
|
yes i posted but noone replied, my problem is i want to drag selected rows from a DGV but when mouse button down on a selected and keep down then all selected rows get unselected and the clicked row become selected only, it works good when i use right mouse button but when i drop rows a small context menu popups (i.e. Move here, copy here) but i dont want this menu popup, so anyway to solve this ?
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)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
|
all articles in entire google dropping only single row, i have been searching this thing for weeks and still not get anyone, some questions asked same as me but no reply
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)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
What works for one row works for a collection. you just have to go through them one by one.
Regards
|
|
|
|