Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. bnbertha

    How do I call an instance method from an exported method in a MFC DLL?

    You can't call a non-static method without a pointer to the instance of the class containing the method. The best way of doing this is to use a static method to return a pointer for the class instantiation you want to call. If you only want one instance of MyClass running try making MyClass...
  2. bnbertha

    Pointer to pointer

    The else condition code is adding another node to the end of the list. Continuing ArkM's example, listtail is pointing to the last node, for arguments sake call it node3. Each node in the list has a pointer to the next node in the list. So with node3 being the last node, a call is made to...
  3. bnbertha

    Remove Multiple Files in a Directory

    What OS are you running this on? Some possibilities are MS Windows has remove() with multiple ways of moving through directories. Unix has remove() opendir() readdir() unlink() that can be used in conjunction with each other. I think the remove() function is ANSI standard, it's definetly...
  4. bnbertha

    NullReferenceException trying to return int from stored proc

    I've got it to work. The problem was that I had not added a return value parameter. It needs to map to the @return parameter from the sproc and needs to be of type ReturnValue. The working code is as follows: protected void ect_txt_TextChanged(object sender, EventArgs e) {...
  5. bnbertha

    NullReferenceException trying to return int from stored proc

    I was too polite to say it :-) Running it in the debugger, everything seems to exist and I've changed the stored proc to force it to return an int. Do you know if any of the attriubutes buried inside the SqlCommand object being null (there are quite a few) can cause this? This C# code has...
  6. bnbertha

    NullReferenceException trying to return int from stored proc

    It's a NullReferenceException Bertha
  7. bnbertha

    NullReferenceException trying to return int from stored proc

    I've been coding for years but I'm relatively new to ASP/C#. This is my code; the exception occurs on the ExecuteScalar() command. protected void ect_txt_TextChanged(object sender, EventArgs e) { SqlConnection conn = new SqlConnection(connect_str); // connect_str good as it works...
  8. bnbertha

    |= operator

    As already stated, you should never use int a |= funct(); but int a = 0; a |= funct(); is perfectly good coding practice. In this case the '|=' operation adds the return value from funct() to what is already in a. What needs to be considered is that in creating variable int a, the memory...
  9. bnbertha

    Returning records with a foreign key in preference to one without

    No it didn't work but you've given me an idea, something for me to work on that should work, so thanks :-)
  10. bnbertha

    Returning records with a foreign key in preference to one without

    No it doesn't work. My test data is obviously not close enough to the actual data. I'll expand it to the complete table structure for the tables concerned. Parameters is actually called Process_Params and the columns (all data type of int) are as follows: Params_key Test_Seq_id Param_seq_num...
  11. bnbertha

    Returning records with a foreign key in preference to one without

    No I don't really have that flexibility. We need to keep track of what values were used when. This is only a small corner of our database and the possible variation in changes makes holding the old data in a separate table very complex, and something I'd rather avoid if I can.
  12. bnbertha

    Storing results of getc in array

    Another point is that by doing strcpy(bc_str, "") you are just putting a '\0' in bc_str[0], leaving the rest of the array uncleared. With adding a string terminator as already suggested, this line becomes vitually redundant anyway, but if you really want to clear the array, use something like...
  13. bnbertha

    Returning records with a foreign key in preference to one without

    I have two tables; Parameters and Concessions. The parameters table has a foreign key field to concessions that is populated only if a concession exists. If a concession is put in place, a duplicate record in Parameters is created with the duplicate having a foreign key entry to concessions...

Part and Inventory Search

Back
Top