I use Powershell almost daily for system administration and automation. I know of some Dev shops that use Powershell to power their continuous integration and continuous deployment efforts. I work in a mixed Windows/Linux shop and rubberman is right. Powershell gives a similar level of power to bash. As you get deeper into it you can start using the underlying .NET libraries directly, making it possible to do anything in Powershell that can be done in any .NET language.

hithirdwavedust commented: Yay, that is a rather tempting description of Powershell. +0
DeanMSands3 commented: Thanks for the input! +5

Now, it's been a while since I've worked with VB & form controls, but it sure looks like you are repopulating your listview every time you change selections. Seems to me you should have an "onload" or similar function to populate the listview, and the "selectedindexchanged" handler should only handle that operation on the previously created listview. That might fix your problem.

Thanks for your reply, but I found at least part of the problem.

I'm using tab pages for different functions in this app, and I inadvertently connected a combobox on 1 tab to the same binding source as the datagridview in question which is on another tab. I still have some problems with the combobox not listing values properly, but setting up a new binding source for the combobox fixed the problem with the datagridview.

My problem with the combobox is that on startup, it displays the id of the data row desired instead of the name value retrieved through the foreign key. If I click to show the list of available items for the combobox, it shows the names (as desired), not the ids. There are 3 comboboxes on that tabpage referencing different tables. 1 of them works properly, the other 2 do what I just described. I have compared the settings between the 3, and they all look to be correct.

I'm in kind of a pickle - I have a project due tonight and suddenly 2 of my datagridviews are acting funky while the others are fine.

I have 2 tables in an sqlce db. the first is books(id, title, copyright) and the next is publisher(id, name, bookid). I'm writing a vb.net frontend to access the data.

I have data bound datagridviews for both tables. Both have their respective ID columns hidden. The publisher dgv uses a combobox cell style to display the book title in the bookid column. So far so good.

I have suddenly run into a problem where if I have clicked in a cell on the books dgv and then click a cell on another row, the title changes to the id value. The publisher dgv also updates to show the id instead of the title.

It sounds to me like there may be a problem with the booktableadapter or bookbindingsource, but I don't know where to start looking for it. I have a 3rd dgv referencing an unrelated table, and it has no problems. The code for both the working and problematic dgvs are the same (only the control names are different).

Suggestions?

I'll have to play with this later when I'm more coherent - I'm interested in seeing how it works.

[QUOTE=Dave Sinkula;1143189]I had been thinking something along this line...
[CODE]#include <iostream>
using std::cout;
using std::cin;

include <string>

using std::string;

include <fstream>

using std::ifstream;
using std::ofstream;

std::string get_filename(const char prompt = "filename?",
const char
defname = "file.txt")
{
string input, filename = defname;
cout << prompt << "<" << defname << "> ";
getline(cin, input);
if ( input != "" )
{
return input;
}
return filename;
}

int main()
{
ifstream ifs;
ofstream ofs;
string filename;

do {
filename = get_filename("input file? ", "file.txt");
ifs.open(filename.c_str());
} while ( !ifs.is_open() );
cout << "opened " << filename << " for reading\n";

do {
filename = get_filename("output file? ", "output.txt");
ofs.open(filename.c_str());
} while ( !ofs.is_open() );
cout << "opened " << filename << " for writing\n";

// ...

return 0;
}[/CODE][/QUOTE]

[QUOTE=mitrmkar;1143193]After the failed attempt to open the file, [ICODE]inFile[/ICODE] is in error state. You want to do [ICODE]inFile.clear();[/ICODE] to make it functional again.[/QUOTE]

That was exactly what I needed! Works the way I wanted it to now.

[QUOTE=jonsca;1140289]Try changing line 32 to [icode] while(inFile >> inValue) [/icode] and remove line 33.[/QUOTE]

I like this better than what I had, and it helped with the problem of values repeating so I can remove line 37 too, but it didn't fix the problem I asked about.

The way it is now, with or without the changes to lines 32/33, if I enter a valid file name for the input file when prompted on the first run it works. If I enter an invalid file name, it outputs a message stating bad file name to cout, then asks for a new file name. If the 2nd time I enter a file name I enter a valid file name, it still reports bad file name and asks for a new one.

I'm stumped.

[QUOTE=Dave Sinkula;1140171]Don't repeat your filename validation with a duplicate section of code after the first check. Use the first check as the only check.[/QUOTE]

I don't think I'm duplicating the check. I try to open the file on line 15 and check to see if it's open on line 17. If it's open, I ask for a file name for the output file. Where am I duplicating the file name validation?

I am writing a simple program to take a user-supplied file, read the contents, and output email addresses found in the file. If the user supplied an invalid path/file name, I want to prompt the user to try again.

Right now, everything works properly if the first file name the user inputs is valid. If it's invalid, the program correctly identifies that and continues to prompt until a valid file name is provided. If the first file name supplied is invalid, the program bypasses the file parsing routine even though it reports a valid file name.

Here's what I have:
[CODE=CPP]
fileExists = false;
while (!(fileExists)) {

    cout << "Enter name of the input file.\n";
    getline(cin, filename);
    cout << "\n\n";

    //remove any leading white space in filename
    while (filename.substr(0, 1) == " ") {
        length = filename.length();
        length--;
        filename = filename.substr(1, length);
    }

    inFile.open(filename.c_str());

    if (inFile.is_open()) {
        fileExists = true;
        filename = "";
        cout << "Enter the name of the output file.\n";
        getline(cin, filename);

        //remove any leading white space in filename
        while (filename.substr(0, 1) == " ") {
            length = filename.length();
            length--;
            filename = filename.substr(1, length);
        }

        outFile.open(filename.c_str());

        while(inFile) {
            inFile >> inValue;
            if (inValue.find("@") != string::npos) {
                outFile << inValue << endl;
            }
            inValue = "";       //clear inValue so final value doesn't repeat
        }
        outFile.close();
    } else {
        cout << "Input file does not exist\n\n";
        filename = "";
    }

    inFile.close();
}

[/CODE]

Let's say I have file c:\temp\myfile.dat. If the user enters it correctly the first time on line ...

For corporate/enterprise email I prefer desktop clients over web clients mostly because desktop clients have a tendency to be more responsive. I don't like to wait for a web page to refresh every time I change the item I'm viewing.

That being said, on my Linux boxes, Evolution has become my client of choice as it is the only Linux based desktop client that I've found that will interface even close to properly with our Exchange servers. Unfortunately, it doesn't quite measure up to Outlook quite yet, but it compares well with Entourage (the email client in MS Office for Mac). I believe that Evolution has the potential to surmount its shortcomings in the relatively near future, and I would love to see it ported to Windows as an alternative to Outlook.

Q-1, Q-2, Q-3: I know you didn't want a website, but I'm going to give it to you anyway: [url]http://www.microsoft.com/learning/mcp/certifications.mspx[/url]. That will guide you to the appropriate exams for your desired cert. MCTS is the entry-level cert & MCITP is a more advanced cert with MCTS as a preqequisite.

Q-4: You must schedule with Prometric or Vue based on your local testing center availability. You can schedule up to 3 months in advance I believe. Make sure to sign up for the MS "second shot" program - lets you retake the exam free if you fail.

Q-5: If you are just starting out, I would probably go for the SQL 2008 track - look forward, not back. There is a certain amount of crossover between certs - someone who knows 2008 will know something about 2005 and vice versa.

Get into the field that makes you happy. Your career is likely to evolve in unexpected ways and you will have to constantly keep learning new skills so make sure it is something that will keep your interest. Start with a self-inventory of likes/dislikes and build from that. If you know you are interested in IT but unsure of the field you would prefer, spend some time exploring either through self taught hands-on work in programming, dba, system administration, etc., or start a general IT bachelors degree program. You can frequently take a wide variety of coursework in a degree program to help determine your field of choice while still applying all of the classes towards the same major.

I don't know much about developer certification tracks (I'm more of a system administrator), but I think the ubiquitous automobile analogy would fit here. So far you have essentially said "I want to buy a car. What should I get?"

Well, it depends on what you want it to do for you. If you want to be a Windows software developer, you might look into some of the MS developer certs (MCITP and whatnot). If you want to be a database administrator, pick your platform (Oracle, MS SQL, MySQL, etc.) and choose a DBA cert for that platform.

Like buying a car, decide what you want before getting the cert. Don't buy an SUV and then decide you want a fuel-efficient vehicle, or buy a compact car to haul construction equipment.

what fixed it?

Sorry about that - had a momentary lapse of reason. Forgot for a moment that you specified field length by setting type to memo.

Sounds like for troubleshooting you may want to step through the recordset one by one to find the offending record(s), then you can inspect that individual record to determine why it failed. I still think there may be a schema difference between the 2 tables causing some grief. Perhaps a field in the source table that allows zero-length data while the corresponding destination field doesn't?

I have seen this before using VBScript & Access (I don't use VB much). That error usually indicates either a data type issue or a field length issue. Sounds like you have the data type covered. Check the field length in the source & destination fields to make sure that you aren't potentially trying to put data that is too large for the field into the destination.