|
The best docs I have found is from blog postings on blogs.msdn.com.
|
|
|
|
|
Thanks leppie,
blogs.msdn.com is a very big site.
Any specific links or?
regards,
George
|
|
|
|
|
You get that error if the address you dumped doesn't contain a valid reference type. The local variables in foo are integers, so !DumpVC will probably work.
|
|
|
|
|
Thanks Senthil!
I have tried to use !DumpVC. But it requires the method table ID. I have tried to use clrstack to get the method table, but only address of variable is given. My purpose is to find out the value and type of local variable. Any ideas?
0:004> ~0e!clrstack -a
OS Thread Id: 0x110c (0)
Child-SP RetAddr Call Site
RSP/REG Object Name
RSP/REG Object Name
RSP/REG Object Name
RSP/REG Object Name
RSP/REG Object Name
000000000012efe0 0000064280150182 TestDebugManaged1.Program.foo()
PARAMETERS:
this = 0x0000000002651ac8
LOCALS:
0x000000000012f000 = 0x000000000000006b
0x000000000012f004 = 0x0000000000000001
RSP/REG Object Name
000000000012f020 000006427f67d4a2 TestDebugManaged1.Program.Main(System.String[])
PARAMETERS:
args = 0x0000000002651aa8
LOCALS:
0x000000000012f040 = 0x0000000002651ac8
RSP/REG Object Name
RSP/REG Object Name
RSP/REG Object Name
RSP/REG Object Name
RSP/REG Object Name
RSP/REG Object Name
RSP/REG Object Name
RSP/REG Object Name
RSP/REG Object Name
RSP/REG Object Name
0:004> !DumpVC
Usage: DumpVC <Method Table> <Value object start addr>
Example: DumpVC 907b50 67903084
regards,
George
|
|
|
|
|
???????????????????????????????? ????????????? ????????????????? ????user and passI want a code login on C#.net pleasssssss
verryyy thank you
|
|
|
|
|
Hello everyone,
When using WinDbg to debug the following simple application, after loading SOS, then I type "!bpmd TestDebugManaged1.exe Program.Foo" to set a breakpoint, there is the error message -- "Found 0 methods...". What is wrong with my input?
namespace TestDebugManaged1
{
class Program
{
void foo()
{
int a = 100;
while (true)
{
Thread.Sleep(10000);
a++;
}
}
static void Main(string[] args)
{
Program instance = new Program();
instance.foo();
return;
}
}
}
thanks in advance,
George
modified on Sunday, July 6, 2008 8:12 AM
|
|
|
|
|
You will get much better answers in the MSDN forum for this type of question
|
|
|
|
|
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 »
|
|
|
|