|
Thanks a Lot it did work.
I have another question how can i keep a thread wait untill the other one finishes. Say i have
Dim t1 As Thread = New Thread(AddressOf execute)
Dim t2 As Thread = New Thread(AddressOf execute)
t1.start(0)
t2.start(1)
But t2 should not start untill t1 finishes. I have to create say varying threads right now i and only creating two threads but i have to actually create as many as there are records in the database. but at the same they won't be more then 5, but could be less even one. At end of the program(thread) i am updating records in the database and that is the reason i dont want to start the next thread before the finish of the first.
Regards
|
|
|
|
|
Use the Join method in the Thread class.
---
single minded; short sighted; long gone;
|
|
|
|
|
Thanks! for the reply
I am doing that but it requires time period, and in my case the time period will not be fixed, or it won't be a good idea to hardcode the time. is there any other way u can suggest.
Regards
|
|
|
|
|
sabby2006 wrote: I am doing that but it requires time period
No, it doesn't. You can specify a time period as timeout limit, but that is not required.
---
single minded; short sighted; long gone;
|
|
|
|
|
In 1.1 I didn't think paramiters could be passed to a sub called on a new thread. I believe you have to store the data in class level variables accessible to the sub. Not positive of this though.
|
|
|
|
|
Iam new to VB.Net2005.
In the Form Load Event Iam Displaying Data into Datagridviewand I have written a code for Double-click event which is going to disply the data in the relevent textboxes from datagridview.
After Displaying I want to modify the Data and updating it into the Database.
For this I have written the code as:
ds.Tables("emp_details").Rows(n).Item(1) = txtsurname.Text ds.Tables("emp_details").Rows(n).Item(2) = txtname.Text
ds.Tables("emp_details").Rows(n).Item(3) = txtdesg.Text
ds.Tables("emp_details").Rows(n).Item(4) = txtplace.Text
ds.Tables("emp_details").Rows(n).Item(5) = txteligamt.Text
ds.Tables("emp_details").Rows(n).Item(6) = txtfno.Text
ds.Tables("emp_details").Rows(n).Item(7) = txtyear.Text
da.Update(ds.Tables("emp_details"))
But Iam getting the error as :
"Update requires a valid updatecommand when passed Datarow collection with modified rows".
Please suggest me correct code for this updation urgently
ThanX in advance
|
|
|
|
|
|
That is DataAdapter.Update
|
|
|
|
|
|
You're looking for the CommandBuilder class for the database you're using. If you have an Access database, then you'd be using the OleDbCommandBuilder[^]. If SQL Server, SqlCommandBuilder[^].
These classes take the Select command that you gave to your dataadapter and build the other three corresponding SQL commands, DELETE, INSERT, and UPDATE, for you. It will only work with single table Select commands though.
|
|
|
|
|
Hi Dave Kreskowiak,
In ur Previous Reply , u told , one must know the following things
1.low-level file system extension
2.writing a database manager to hold all of the passwords
3.writing a utility to manage the password database
4.and finally, comming up with a method to recover a file if the user ever forgets the password
5.This requires a blackbelt in Windows internals and NTFS
to implement the file folder security by applying the password.
So from where should i start , out of the above points?
I really don't want any code.
I Just want u to guide me.
Thank You
|
|
|
|
|
From your previous posts, you don't have to skill level to pull this off.
You've got about 3, 1000+ page books to read just to understand device driver developement and the ins-n-outs of NTFS.
For a comparison of whats involved, you're a student walking in to his first metal shop class, wanting to build a brand new car. You are a couple of years away from aquiring the programming skill to do this.
|
|
|
|
|
I'm trying to find out how I can open and read an Outlook .pst file. I need to be able to read/edit all of the email headers. If the attachments have any header type information that tie them to a particular mail server, I need to be able to read/edit that info too.
Can someone point me in the right direction. I'm using VS2005. Are there any code samples anywhere or articles that tell how to do this type of thing? What is the best way to perform these tasks?
Thanks.
|
|
|
|
|
You'll have to use automation to get Outlook to read the PST file for you. The file format is protected by Microsoft and there is just about no documentation on the web on it.
|
|
|
|
|
hi,
Have u got any idea on reading the pst file path of current user.i tried through registry.But its not working.
If u have any idea nor samples,pls share with me
Thanks
|
|
|
|
|
That depends on how the object was written and what it does with that FileNum. Most likely, no, you can't redirect it.
You'd have to let the object save it's files, then transfer the file to the client and have it load the file when done.
|
|
|
|
|
Wow - really terrible database design. Is your class assignment saying it has to look like that ? How do you think you could do it ? I mean, do you have any ideas ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
If I didn't know better, I'd say you were talking to yourself.
|
|
|
|
|
I'm new to programming, I want to build application that play dvd movies, please help me to do this. i will be highly gratefull.
|
|
|
|
|
Drag the Windows Media Player control onto a form. You're done. Of course, the MPEG2 codecs need to be installed on the machine, but that's another story.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
|
The easiest way to do it would be to launch the installer for the codecs from your app and let the installer do it's job for you.
Since you don't own the codecs, you probably would not get away with shipping the codec with your application.
|
|
|
|
|
Does anybody know how to create an efficient Undo/Redo Class? What are the general things I need to implement?
may your code be error free
|
|
|
|
|
Undo/Redo functionality is really based on what your application does.
If it's a text editor, you'd want to store which text was inserted/deleted/moved where. If it's a graphics program, you might want to store that drawing tool X was used at location Y. If it's a game, you'd want to store that the player moved from A to B, and what each enemy did in response.
In general terms, an Undo/Redo class is going to act like a list or array of state objects. The state object would need to:
1) Store data representing the action performed
2) Know how to "apply" that data to the application (Enter text, make a move, draw something)
3) Know how to reverse that process (Remove the text, back up a move, erase something)
I can't help you with the implementation of that state object, but the general functionality of the Undo/Redo would be:
(Storing an integer representing the location in the undo list)
Undo:
1) "Reverse" the state object at the current index
2) Add one to the index
3) If the index is greater than the size of your state array, disable undo
Redo (Enabled when index > 0):
1) Subtract one from the index
2) "Apply" the state object at the current index
User performs an action:
1) Remove any state objects less than the current index (So the current undo item is in position zero)
2) Insert a state object at the zero position that describes what the user just did
3) Set the index to zero (First item)
Sounds easy, of course figuring out that state object could be really difficult, depending on your app.
|
|
|
|
|
Thanks for your response! I need Undo/Redo functionality for multiple objects. My application allows the user to
- move
- resize
- change font type
- change background image
etc..
The research I've done so far only supports undo/redo operations for one class. In other words, you would have to have a reference to the object then use the undo interface attached to it. Any ideas on how to implement undo's for multiple objects?
|
|
|
|