I want to add a progress bar to a small app but once i pass a script to the database i have no control until the script finishes. The app reads a script from a file modifies it slightly and then connect and pass the script to the database. I pass the script using the ExecuteNonQuery method. Here is that section of code. can anyone help?
You really can't track that. There is no status information sent back from SQL Server that you can use to track the progress of the script. At best, you can put up a "progess bar" that doesn't progress. It just spins endlessly until the call returns.
1. There is a SendTo folder under every user account. Just drop a link to your app there and it will show up in the Send To menu.
2. You can configure this under Explorer/Extras/Options/DataType. Visual Studio setup projects are able to automatically make the correct entries for your application.
3. Search this site for single instance[^]
In general you just have to evauluate the parameters your Main function has. Have a look at the link I have provided. It not only shows how to do this but also how to pass those arguments to an already running instance.
I'm just starting out in .NET and creating a simple application to store the personel information on staff, e.g. name, address, age etc etc.
My question is which would be the best storage for this type of information. I'm considering XML or a database. The application will be run on a single machine so it just needs to be something simple. It would be nice to be able to load the information into Excel too...
Any pointers would be a real help so I start down the right path.
File/Open?? Just opening the solution or porject file should launch the conversion wizard which will upgrade the project files to the current version supported by the IDE, IF the conversion is supported.
You can't change the key of a node in a hash table, as the entire table is arranged according to the hash codes of the keys. You have to remove the node from the table and re-add the object in the node using the new key.
Once a hashtable record is created, you don't want to change the key. Changing the value is fine though. Sometimes whan I need a quick and easy list of objects, I'll create a hashtable and just use hash.count as the key. Here is an example of how you could deal with changing values from a hashtable:
Hashtable hash = new Hashtable() ;
for (int i = 0; i <=10; i++)
//we now have 11 objects in the hashtable
int counter = 0 ;
//we do this, because hashtables don't guarantee that you'll
//get object out in the same order you put them in
for (int i = 0; i <= 10; i ++)
hash[i] = "new object" ;
//this will modify the VALUE, not the KEY
//if you don't care about the order you're getting objects out of the hashtable
//you can enumerate them like this:
IDictionaryEnumerator enumr = hash.GetEnumerator() ;
object theKey = enumr.Key ;
object theValue = enumr.Value ;
//you could change the value here
enumr.Value = "new value" ;
Just as some further info: Whenever you loop over some sort of collection with foreach you are not allowed to change it within the loop. That's no speciality of the HashTable class but affects about all collection classes.
I encode picture by binary byte and put it into database,now i want to get it back and put it into Grid(i use Xtragrid). I decoded it into Picture, but i dont know how to show it into grid
Please help me
Thanhs a lot.
Sure, Win32_Directory[^]. But why would you want to??? This is kind of the Rube Goldberg method of copying files. It has limited functionality, such as it won't over-write the destination file if it already exists.
Dave Kreskowiak Microsoft MVP - Visual Basic
Last Visit: 31-Dec-99 18:00 Last Update: 27-Sep-23 0:07