|
Hello Farzad,
I know this was posted a while back, but I want to help.
As it turns out, I was working on a similar program not to long ago and was able to modify it for your use.
It's kind of hodge-podged together. It uses a Mouse-hooking class written in C# I came across somewhere on the net and modified for my use. The main form is written in Visual Basic .NET.
You can download the code from: HERE
Hope that's what you needed,
Ray
|
|
|
|
|
Hi All.
I have bound the Text property of several Textboxes to the properties of an Object with DataSourceUpdateMode.Never .
A foreach loop cycles through all textboxes and the DataBindings.WriteValue() function is called for each modified textbox to give the changes back to the object (which stores them in a database):
foreach (TextBox ctrl in gbCAddress.Controls)
{
if (ctrl.Modified)
{
ctrl.DataBindings["Text"].WriteValue();
ctrl.Modified = false;
}
}
This works fine so far, but after calling WriteValue(), all other DataBindings reload the data from the object, which overwrites the changes made to the other textboxes (probably because the Datasource changed ?).
Example:
textbox1 and textbox2 were modified.
The loop calls the WriteValue() function for textbox1
All Bindings reload their data - textbox2.Text is now the old value
The loop calls the WriteValue() function for textbox2
Can I suppress this reloading somehow ? I cannot see why everything is reloaded after one field changes...
Help !
|
|
|
|
|
Hi ezeew.
you binded all text boxes to DB.
As you and all people know! the data in those text boxes will change when DB update.
so I suggest you to collect your all data in each text box (if it modified) and in the end Update them to DB. (not exactly after modification)
I dont know, probably into a dailog form. It depend on you.
sorry, my english is not good
|
|
|
|
|
I have a big size xml dom.
Each node has lots of sub node and each subnode has lots of child sub nodes.I want to read,validate and save this xml data to database.
Each node having attributes under a parent node is considering a transaction bcoz these row of node having attributs are geting saved in different table in database
How can i count a transaction and transaction time while save xml data to database.
Can anyone plz give me some idea.
thanks and regards
tarak
|
|
|
|
|
It doesn't matter how many times you ask the same question you'll get the same response.
only two letters away from being an asset
|
|
|
|
|
Mark Nischalke wrote: how many times
The number of XmlNodes perhaps.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
The woods are lovely, dark and deep,
But I have promises to keep,
And miles to go before I sleep,
And miles to go before I sleep!
|
|
|
|
|
NOONE KNOWS WHAT YOUR TALKING ABOUT! What do you mean by "COUNT TRANSACTION TIME AND NUMBER OF TRANSACTION" and how do it relate to your XML file???
|
|
|
|
|
Is there a way to modify/add to the list of file extensions that ResXFileCodeGenerator recognizes as text files?
I'm on a project where the (DB2) queries are all accessed through resource files. I have a visual studio add-on that gives me editor support (color coding, etc) for working with DB2 queries when editing text files with the db2 extension.
The problem is that the ResXFileCodeGenerator doesn't recognize these files as being text files, so when I add them to the resource, they get returned as byte arrays.
I'm well aware that there are other, better ways to manage these queries, but I have to stay with the design that's already in place.
At this point all I want to do is make ResXFileCodeGenerator recognize files with a .db2 extension as text, so the ResourceManager will return them as strings.
Thanks.
Grim
MCDBA, MCSD, MCP+SB
SELECT * FROM users WHERE clue IS NOT NULL
(0 row(s) affected)
|
|
|
|
|
I have a big size xml dom.
Each node has lots of sub node and each subnode has lots of child sub nodes.I want to read,validate and save this xml data to database.
How can i count a transaction while save xml data to database.
Can anyone olz give me some idea.
thanks and regards
tarak
|
|
|
|
|
TARAK NATH ROY wrote: How can i count a transaction
What do you mean?
only two letters away from being an asset
|
|
|
|
|
What do you mean my "count a transaction"?? That doesn't make any sense the way you wrote the question.
|
|
|
|
|
TARAK NATH ROY wrote: How can i count a transaction while save xml data to database.
For each transaction, add one to the previous count.
|
|
|
|
|
Also you should initialize the count with 1. You can use a different number, and subtract that later, but its not as efficient as just starting with 1.
|
|
|
|
|
I think that you mean zero...
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
So I made a datagridview, table adaptor, dataset, etc and it's all working fine. I can view data perfectly but I can't save it. I tried doing this:
Me.TerritoryTableAdapter.Adapter.Update(Me.TerritoryDataSet.Territory)
But it just says I need a DeleteCommand or UpdateCommand, etc. I'm using the ODBC driver for MySQL if it makes a difference. Please help
|
|
|
|
|
You must provide, or have autogenerated, the update, insert and delete commands so the DataAdapter can determine which one to call. You may know that you are only updating a record but to the DataAdpater there could inserts and deletes that need to be done also.
only two letters away from being an asset
|
|
|
|
|
I tried ticking the "Generate Insert, Update and Delete statements" and nothing happened. How can I generate the commands?
|
|
|
|
|
Create them youself. If you have complex statements the autogenerated ones aren't usually as efficient as ones you would create manually. Besides that, you should be using stored procs rather than manual sql statements.
only two letters away from being an asset
|
|
|
|
|
How would I create them? What would be the query to update?
|
|
|
|
|
Stop what you're doing at this point and learn a little SQL before continuing.
only two letters away from being an asset
|
|
|
|
|
I know all about SELECT, UPDATE, INSERT INTO, etc statements, I just need to know how to use them with the datagridview.
|
|
|
|
|
Seriously, is this[^] difficult to do?
only two letters away from being an asset
|
|
|
|
|
Thanks for your help. Just needed to know what to google
|
|
|
|
|
Hi,
Is it possible to parse and fetch TYPE PARAMETER & TYPE PARAMETER CONSTRAINTS information defined for a Generic class OR method in a C# source code using CodeModel APIs?
I do not see any API exposed in EnvDTE & EnvDTE80 namespace. Can you please suggest me a solution.
Regards,
Manish
|
|
|
|
|
Take a look at the MethodInfo.IsGeneric??? properties in the System.Reflection namespace.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|