LizR 171 Posting Virtuoso

its probably upset because you put cmd.exe as your arguement, it might be trying to do something with it.

It will be running the batch file as if it runs from your current directory, this could also give you your file not found if its looking for something in the directory you ran it from.

LizR 171 Posting Virtuoso

possibly because you have the arguements and the filename round the wrong way? c:\windows\system32\command.com would be the filename, the batchfile is the argument.. as is the /c

Your code also doesnt have the @ so if you wrote c:\test\myfile.cmd it wouldnt have found it either..

LizR 171 Posting Virtuoso

If c:\setstation.cmd doesnt work, then you may need c:\windows\system32\command.com /c c:\setstation.cmd as your full command, rather than pass it as 1 command you would probably need to call c:\windows\system32\command.com with the parameters of /c c:\setstation.cmd

You should be getting some error codes saying why it failed.

LizR 171 Posting Virtuoso

double click on the form, it will give you the forms onload procedure, you can fill it in there.

LizR 171 Posting Virtuoso

Ok, so the answer was you wanted to use the windows based performance counters.

Try http://msdn.microsoft.com/en-us/library/5e3s61wf(VS.71).aspx

LizR 171 Posting Virtuoso
getCompanyName(); //populates the Cbox with the data - it works
            getCompanyID();  //returns the uniqueID for the selected item - doesnt work

I wouldnt expect getCompanyID() to work, you havent selected an item after clearing the box and repopulating it.

LizR 171 Posting Virtuoso

I must be being thick.

You get the item selected from a list box with

listBox1.SelectedItem

A dictionary is exactly that, it allows you to lookups on things.

LizR 171 Posting Virtuoso

That didnt really answer the question, but once again, if you want a simple readable text file, open a stream and write it :)

LizR 171 Posting Virtuoso

If your listbox holds the string of the name then you would need a dictionary to pull out the relevant item against that name, or, if you create an object whos "tostring" returns the name you could just add the whole object to the listbox, knowing it will display the right thing, but then its the selected item, with no looking up required.

Holding things in an invisible text box would seem an odd way to do it, surely you just want a private or public variable for the form class?

LizR 171 Posting Virtuoso

Make sure you put the full path to the batch file. You may also need to call it as

command /c setstation.cmd

LizR 171 Posting Virtuoso

Do you just want a simple text log file, or are you talking performance counters?

If you want a log file, open a stream and write to it..

LizR 171 Posting Virtuoso

SendKeys sends to the active application so, if the app you want to send to is focused it should be sending to it.

LizR 171 Posting Virtuoso

Make sure hideselection is true on the text box

LizR 171 Posting Virtuoso

I think that depends on what you are trying to achieve

LizR 171 Posting Virtuoso

"Native code" is a very common term. Hence their website says so without explaination.

.net relys on a framework and is compiled and run at runtime. Native code is platform specific.. eg win32, linux etc, so as it compiles win32 ONLY code in, it wouldnt run on anything other than windows.

LizR 171 Posting Virtuoso

Depends on your router, Im not aware of any routers that have databases in programming terms. They have config files, and memory, and you can access them either by ssh or telnet, run commands to return various datas such as links up/down/config/errors etc. you can then parse that and display it in anyway you see fit.

LizR 171 Posting Virtuoso

http://forums.msdn.microsoft.com/en-US/csharpgeneral/thread/00d6e2dd-e8a8-4720-94fc-e9b07abf2bfa/ has some example code on reading from a com port with c#, to graph it you would need to keep the values, and map it across time, so you would want to use the time to work as your X axisis and perhaps scroll so as to only fit a given time period on screen at an time, or start with some more fancy maths to squish from start to finish in your given space..

If nothing else, i would suggest you take the code on that forum, read in your data, and save it to a file, you can always process it afterwards as your first project.. and if necessary graph it in excel afterwards.. For stage 2, try and work on a graph and updating it from the code you have that works.

LizR 171 Posting Virtuoso

Only potential downside to that app is that it uses native code, as a result anyone trying to use mono or such would find it wouldnt run.

LizR 171 Posting Virtuoso

It would depend a little on the connection you make. If its TCP based then refuse the connection based on IP, if its UDP eg connectionless then yes, each received packet would have to be ignored or used depending on wether it fits.

Network sniffing is generally frowned on as companies can be sued by employees if they havent been notified that network sniffing is being used as their private data is considered at risk, even though its company machines.

Any connection to your machine comes as part of the packet where it came from so you can reply.

LizR 171 Posting Virtuoso

If you just download a file and plonk it in a directory nothing is going to be aware of that. You would need to do more work as part of the updater to make anything aware of the update. If its already too late and you have your app out and deployed, you'll need to have a new update that goes out to update it with a way of knowing that additional files are logged somewhere and to remove them before removing your app.

LizR 171 Posting Virtuoso

Your window has "Roger that" at the bottom so Im guessing its a window you made yourself which has a memo field on it not a label?

LizR 171 Posting Virtuoso

If the update was also an MSI it should have removed it as part of the uninstall, or if you put it in the windows/system32 area it should have come up with "probably not in use by anything else do you want to remove it"

LizR 171 Posting Virtuoso

It may depend on what your app does, .net has a number of security parts check the properties on your project.. as well as check what the error is, if it says something about security etc and yet runs from a local drive, you need to change the properties in the project settings.

LizR 171 Posting Virtuoso

If you use XNA and export it in the right format sure it can make you 3d objects to put in your program.

I cant draw for toffee so I havent done it but I know plenty of people who have.

LizR 171 Posting Virtuoso
foreach ( string fileName in filesOnServer ){
            string fileWpath = fileName;
            string fileOnly = Path.GetFileNameWithoutExtension(fileName);
            int index = filesOnServer.IndexOf(fileOnly) ;
            if (index >= 0)
            {
           if (!filesInDatabase.Contains(fileOnly) ){

foreach ( string fileName in filesOnServer ){ string fileWpath = fileName; string fileOnly = Path.GetFileNameWithoutExtension(fileName); int index = filesOnServer.IndexOf(fileOnly) ; if (index >= 0) { if (!filesInDatabase.Contains(fileOnly) ){

and index is 0 until it hits the !filesInDatabase line then it becomes -1. So that explains why it is -1 thanks.

OK here you look at files on the server and find they arent in the db, so you need to add them, this is cool.

any idea how to check then to see them if the file isn't in the database?

Sure, now do the same tests but with the db and server roles reversed so get the filenames in the db and check if they are on the server or not. If not perhaps you need to delete the entry in db or resave the file to the server.. depending on your need.

secondary - why doesn't index change to -1 when it gets to

if ( !File.Exists(SOIDs[index]) ){

because thats a test, not a value setting.

before you had the code

int index = filesOnServer.IndexOf(fileOnly) ;

where you set index, if you dont set that to something else it wont change :)

LizR 171 Posting Virtuoso

got a screen print and the code you call it with?

LizR 171 Posting Virtuoso

Then we need more of the code, because you only show up to the start of the decision making process.. If the file was not found then yes the index will be -1 because its not on the list.. whats the actual error you get?

LizR 171 Posting Virtuoso

yes the time is different so it wont match, if you want to match on date alone you would need to do change it so it extracts the date from the fine_date field and the date of the part in question.. I dont have access on here to check but something like date(file_date)=#1/9/2008# would probably work.

LizR 171 Posting Virtuoso

Um, first thing that comes to my mind is that you define SOID as List<String> but.. you then refer to SOIDs... whats SOIDs ?

LizR 171 Posting Virtuoso

As I said, the above will as long as you know what the URL will be.. wether its http://mysite.com/download.asp or what..as long as you know how to get the URL and how to test if theres a newer exe - either by praying the server displays correct headers or in your case maybe a version.txt file, the principle is the same. Have a look at those 2 objects and work from there.

LizR 171 Posting Virtuoso

Why not have an optional listbox with a lookup, on the selected criteria, if the results of the query of available flights, show the list box, and make the user select before continuing, otherwise assume the only available flight is the one they wanted.

LizR 171 Posting Virtuoso

Go with whatever you know best, unless you're told specifically which language to use.

LizR 171 Posting Virtuoso

If you mean they type in a text box, then the Text value of the textbox is indeed a string yes

LizR 171 Posting Virtuoso

Assuming you know the full URL then theres a good set of options built in HttpWebRequest and HttpWebResponse classes, see if that helps you find the right answer.