alc6379 120 Cookie... That's it Team Colleague

I'm not really sure you're going to be able to use SendKeys into that dialog. I think that the Windows File/Save dialogs are going to be in unmanaged code. You'd have to get the HWND ID for the window, and then do something (I'm not sure what) to put the keys in that you want. I'm not really up on Win32 UI programming, but I thought I'd at least try and point you in some direction...

alc6379 120 Cookie... That's it Team Colleague

instead of using date1 or date2, use String.Format("MM/dd/yyyy", date1) in your SQL statement. That should format it how you need.

alc6379 120 Cookie... That's it Team Colleague

Check this out:

http://www.dotnet247.com/247reference/msgs/20/104068.aspx

BTW, please don't double-post. You already had another post asking how to change your IP address.

alc6379 120 Cookie... That's it Team Colleague

is it the actual incrementing of the number you're having issues with, or is it saving the value to a database?

alc6379 120 Cookie... That's it Team Colleague

Can you please provide more information? Your question isn't quite clear...

alc6379 120 Cookie... That's it Team Colleague

So long as these things stay off of the Interstate Highway system, I'll be happy. Here at home, we have conventional gasoline/diesel Staples trucks (whose speeds are artificially limited to 60MPH) going down roads where the speed limit is 70. That's dangerous-- people have to slow down, then try to go around the trucks.

alc6379 120 Cookie... That's it Team Colleague

Are you sure you're using Array.Replace, there?

if (values[i].ToString() == casprID && values[i + 1] == msNo)
{
   values[i] = values[i].Replace(values[i].ToString(), casprID.ToString());
}

should be

if (values[i].ToString() == casprID && values[i + 1] == msNo)
{
   values[i] = values.Replace(values[i].ToString(), casprID.ToString());
}

it's a subtle bug-- you were doing String.Replace, it looked like, on an element of the array, rather than replacing the element itself.

alc6379 120 Cookie... That's it Team Colleague

You'll just have to expose a property in movecategory:

private MyStructure Value
{
    get { return foo; }
}
alc6379 120 Cookie... That's it Team Colleague

can you not visit Dell's website for your given region? They pretty well sell throughout the world...

alc6379 120 Cookie... That's it Team Colleague

C/C++ is going to get you as close to the metal as possible, but don't discount .NET for this-- if you're going to be interfacing with a video camera, you'll probably have easier access to video processing modules, etc, with a higher level language.

alc6379 120 Cookie... That's it Team Colleague

It's external as in, possibly on a different subnet, from you, or even a different local network segment? That's DEFINITELY going to be a big issue.

Can you possibly try experimenting with running a local instance of mySQL on your machine? Sure, you won't have tons of RAM, but you may not even need it, since it's just your machine needing connections to the database.

alc6379 120 Cookie... That's it Team Colleague

You should just need the exe and the .ini file...

alc6379 120 Cookie... That's it Team Colleague

You can totally use RAD to do object-oriented work... Again, RAD is the methodology, object-oriented is the development technique.

I'm generally using RAD to describe the process I enumerated in my previous post. The main idea is keep track of your tasks, and knock them out in the most effective order you've determined. Don't get stuck on methodology or terminology-- focus on producing a quality product for your client. That way, you're not trying to learn a management process as you go.

alc6379 120 Cookie... That's it Team Colleague

What kind of stuff are you downloading? I promise you, there's GOT to be something you could be doing to the database, either by indexing or something, (or a memory cache there) that can definitely increase your speed. People are using mySQL to handle sites with MILLIONS of transactions per second-- it's definitely going to handle what you're doing.

Maybe it's not the database itself-- maybe it's the overhead in opening or closing SQL connections? You could have a process manage that connection, or keep it open for the duration of your processing. That way, you only had to open it once, and not incur that performance hit every time.

Those are probably the places you're really getting your performance drags from-- IO and opening db connections. If you manage those properly, you'll probably get a big speed increase.

alc6379 120 Cookie... That's it Team Colleague

Have you done any programming recently?

And I don't mean necessarily in anything up-to-date: I just mean ANY programming. If so, then you're still possibly pretty sharp with your analytical skills, so you could pick up another programming language fairly quickly.

Most work you're going to find these days is in web development and in web service development. That's going to be either Java or .NET. You already have the fundamentals down regarding programming itself, so picking up the concepts and the languages are going to be where you'd need to get your start. Start by picking up some books (I actually like the C# for Dummies books, and the O'Reilly Learning C# 2010 ones), and read through them. Do the examples. Then, start checking out online tutorials on things you didn't quite catch from the books.

At least in my area, your programming experience would be considered "junior" in C#, but you'd probably get credit for the years of programming experience overall. You're not going to make huge bank starting off, but it will be something you can build on.

alc6379 120 Cookie... That's it Team Colleague

How'd you fix it, just for posterity?

alc6379 120 Cookie... That's it Team Colleague

You can program some chips in .NET, take the Netduino, for instance:

http://www.netduino.com/

That's the first one that comes to mind. I think there are also other boards running the .NET Micro framework, too.

vedro-compota commented: +++++++++ +1
alc6379 120 Cookie... That's it Team Colleague

What exactly are you trying to do?

This might be some help to you:
http://www.csharp-station.com/Tutorials/AdoDotNet/Lesson01.aspx

ADO.Net is the usual way you'd access items in a database.

alc6379 120 Cookie... That's it Team Colleague

Have you stepped into the code? Are you getting any error messages?

alc6379 120 Cookie... That's it Team Colleague

check this site out:

http://www.dyndns.org

You can run a client program on each PC to associate the dynamic IP address with a specified host name.

alc6379 120 Cookie... That's it Team Colleague

If you want to know the amount of rows that would be returned from a query, you could do a SELECT COUNT(0) FROM foo WHERE <conditions>. If you pass that query as the OleDbCommand, you could then do ExecuteScalar, and it would return the number of rows that your WHERE clause would return.

Other than that, Momerath's right-- you can't know ahead of time how many rows the datareader is going to return, unless the answer is 0. :)

alc6379 120 Cookie... That's it Team Colleague

Questions:

Where are you getting your requirements from?
Are you required to produce a deliverable on a regular basis?
Are you expecting to add developers at any point?

If it's just going to be you, you should just take your requirements, sort them out task-by-task, order them estimated time to complete, versus "bang for the buck" in time to complete for the amount of importance to the project, then get cracking! (This is basically Rapid Application Development)

Test-driven development isn't so much a development methodology like Agile, RAD, or Waterfall. It's a software development process you'd use while developing. If your requirements are very clear, TDD is a way to go, but it can add considerable overhead to your project's time, as you'll be writing (and debugging) tests to verify your requirements are met.

selasedaniweb commented: Quite knowledgeable and trustworthy....thumbs up... +0
alc6379 120 Cookie... That's it Team Colleague

Yeah I'm going to have to agree with Momerath here. How is your database structured (and no, a flat file is not a database!) ? Even with 2 billion rows, a database (even SQL Server Express) should be able to easily handle what you're doing.

If you're going to be looking up an object multiple times, consider using a List as a cache, rather than the main data store. If you're checking to see if something has been processed before, first check the list. If it's not there, check the database. If it isn't in either place, process it, then write a record of processing to the List. At some point, have a method flush the List down to the database, so it's always stored that you processed it. If you really wanted to get fancy, you could add a Time Added property to whatever object you're storing in the List, so you could remove items that haven't been touched in a certain period of time. That would also help deal with RAM usage.

alc6379 120 Cookie... That's it Team Colleague

Try completely rebuilding the application, and then rerunning it.

Also, is this machine connected to the internet unpatched? It could be a virus, then.

alc6379 120 Cookie... That's it Team Colleague

I'd just like to add another angle to this:

Say you have properties in an object that, when added together, you'd like to add the individual properties. You can overload an operator and output an object that is the addition (or difference, or whatever) of the two objects you just used the operator on.

alc6379 120 Cookie... That's it Team Colleague

do you really need that first foreach loop? If you're already getting myTable, just do a foreach on the DataRows in myTable.Rows directly...

alc6379 120 Cookie... That's it Team Colleague

You could look at LINQ to XML. I use it all the time to read XML files and parse them.

http://msdn.microsoft.com/en-us/library/bb387098.aspx

If this is for an assignment, I'll leave the actual DAL building up to you, but LINQ to XML will provide you the mechanisms for reading the XML file and generating objects you require.

alc6379 120 Cookie... That's it Team Colleague

Can you provide some code for what you're doing, so we can get a better idea?

Offhand, it sounds doable, but we need a better idea of what you're doing already to see how it would fit in.

alc6379 120 Cookie... That's it Team Colleague

You're probably going to need a 3rd-party control for that. To my knowledge (and skill with Google searching), it doesn't appear there's anything like that, yet.

alc6379 120 Cookie... That's it Team Colleague

Why would you want to use global variables, exactly? It's one thing to show you how to use them, but it's really a bad idea to use them.

Check out this post for a good explanation:
http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/071dc2fb-76c3-4484-8418-6b37664995f7

Ketsuekiame commented: Globals are BAD. Use Singletons if you REALLY have to =D +1
alc6379 120 Cookie... That's it Team Colleague

I dunno... i think it might have been a display issue. It was just too dark for me to see what I was typing...

alc6379 120 Cookie... That's it Team Colleague

I should hope not... If that is the case, then the watermark text needs to be lighter, or something, because I can't read what I'm typing...

alc6379 120 Cookie... That's it Team Colleague

Whoa... that's a really gross way to do it, though... You don't want to introduce a global variable like that. Just have the checkIfEmpty() method return a bool value.

try this checkIfEmpty method:

public bool checkIfEmpty()
        {
            if (X1.Text == String.Empty)
            {
                MessageBox.Show("The number of Products must be entered", "Products number not entered", MessageBoxButtons.OK, MessageBoxIcon.Warning);
		return false;
            }
            else if (X2.Text == String.Empty)
            {
                MessageBox.Show("The Surface Area must be entered", "Surface Area not entered", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return false;
            }
            else if (X3.Text == String.Empty)
            {
                MessageBox.Show("The number of Persons must be entered", "Persons number not entered", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return false;
            }

	    return true;
	}

And then you could use it like this:

private void btnOK_Click(object sender, EventArgs e)
        {
            checkIfEmpty();
 
            if(checkIfEmpty())
            {
                 XmlDocument maindoc = new XmlDocument();
                 maindoc.Load(@"C:\\Windows\Temp\SessionsTotal.xml");
            }
        }

Check out this resource to see why global variables should be avoided:

http://c2.com/cgi/wiki?GlobalVariablesAreBad

alc6379 120 Cookie... That's it Team Colleague

Hey Dani,

Site looks great-- I've been trying to get on and lurk more and more. I noticed, though that under Chrome in Windows XP, the "use code tags" watermark doesn't go away when you click or start typing into the box. I remember it used to, but I thought I'd point it out...

alc6379 120 Cookie... That's it Team Colleague

Maybe you could write a webservice to send this email? Do that, and have your BLL reference the service, and use its methods to send the email?

alc6379 120 Cookie... That's it Team Colleague

Two things here:

Are these Class1,Class2, Class3 objects in a hierarchy? Are you using Interfaces or a superclass? It might be a good idea to have the method return the most concise type possible, as it's more type-safe. If your classes all do have a common set of operations or properties? Then you should have them all conform to an interface.

As far as an argument to a delegate is concerned, you just declare it with a variable:

public delegate void TestFunction(string myArg);

public void ThisIsMyDelegate(string myArg)
{
     //do something
}

TestFunction myFunc = ThisIsMyDelegate; 

//call it
myFunc("some string");
alc6379 120 Cookie... That's it Team Colleague

Momerath's probably right... How long does it usually take for your getVideos method to run? I didn't see code for that. I'd step through it with a debugger, and look at exactly what properties are being returned in that Video object.

alc6379 120 Cookie... That's it Team Colleague

Generally I like to have at least 2 projects: 1 for my UI, and one for my logic. If you're doing a multi-tied application, I'd go even further, and have projects for UI, business logic, and data access.

If the application can be broken down into other sub-applications, I'd make individual projects for each (say, a banking application that has loan approval functions and report writing... report writing isn't tied directly to loan approval, so it is another application, technically)

alc6379 120 Cookie... That's it Team Colleague

I think OTS is into something there...

alc6379 120 Cookie... That's it Team Colleague

1: .NET supports Unicode, which means you can use an Input Method Editor(IME) in text boxes. I think that there's an input for Arabic character sets.

2: You could store the keywords in a database, like SQL express, or SQLLite... Would that work for you?

alc6379 120 Cookie... That's it Team Colleague

Generally the application you're trying to access has to have an API or some method of adding the message in. In this case, I don't think Yahoo messenger does.

Could you maybe go another route, and use the Yahoo Messenger API that is provided by Yahoo, or build a client that interfaces with the service? There may be a library, like libpurple, that you could use.

alc6379 120 Cookie... That's it Team Colleague

How are you populating the table to begin with?

alc6379 120 Cookie... That's it Team Colleague

Do you have more than one application in your project? Maybe there's some configuration that's not getting loaded, in that case?

alc6379 120 Cookie... That's it Team Colleague

try this Google search for connecting to that type of file:

http://www.google.com/search?sourceid=chrome&ie=UTF-8&q=c%23+accdb

in short, no. You can't use SqlBulkCopy on the access database, but there are other, slower methods. You could parse the file, and populate row by row.

alc6379 120 Cookie... That's it Team Colleague

That's a valid point and is there any reason why you create an anymous class(using var)

var sortedByPrice =
from a in Array
where a.priceValue >=0
orderby a.priceValue
select new {a.PartNumber, a.quantityValue, a.priceValue};

In this situation, since all returned values are properties of Invoice, you coud simply do

IEnumerable<Invoice> sortedByPrice =
from a in Array
where a.priceValue >=0
orderby a.priceValue
select a;

Anonymous types are perfectly fine.

Besides, this could just be stub code-- he could have an even bigger class he plans to do this with, and the LINQ could then be used as a translation layer. Cherry-picking individual properties from an object would allow you to send a smaller object across a line connecting to a web service, too.

alc6379 120 Cookie... That's it Team Colleague

What exactly are you trying to do?

I don't have the exact specifics, but there are limitations to running DLLs from remote locations-- you have to "trust" the location that the DLL is being loaded from.

You can't install anything on the remote machine? I would consider running a service that you could ping from another machine to see if it was locked or not-- you might be able to hook into the user session of the machine, and see what desktop (in this case, like the article said, winlogon) is the running one.

alc6379 120 Cookie... That's it Team Colleague

Do you have a specific design pattern you need help with?

alc6379 120 Cookie... That's it Team Colleague

Your question is actually a little vague.

You can program in 2010 and use C# 3.0 syntax. More than likely, it will compile just fine; but, by default your executable will target the .NET 4.0 runtime, and any machine you deploy to will have to have that framework installed.

Also, you can use VS2010 to "target" a different runtime-- ie, use 2010, but say, target for .NET 2.0 or 3.5. Check this post out:

http://weblogs.asp.net/scottgu/archive/2009/08/27/multi-targeting-support-vs-2010-and-net-4-series.aspx

Geekitygeek commented: helpful link +2
alc6379 120 Cookie... That's it Team Colleague

Many times you're just out of luck. If you know the manufacturer of the drive, you might be able to email the manufacturer's support group to get a utility to unlock the drive from DOS.

alc6379 120 Cookie... That's it Team Colleague

Do you have any software installed like DaemonTools, Alcohol 120, or any Direct2Disc software like Roxio or Sonic? Try uninstalling that. If that doesn't work, you may very well have a bad drive...