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 Chriss Miller 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: *

  • Users: mbaranski
  • Content: Threads
  • Order by date
  1. mbaranski

    Get table list from ODBC Connection in .NET

    OK, I have an OdbcConnection (Visuall C++ .net) object, connected to an (unknown DB Vendor) ODBC source on the machine. How do I get a list of tables and viewes in the database that I'm connected to? I can run queries, etc, but not get a table list. Thanks!
  2. mbaranski

    Namespace problems

    So, I've got a VC++ service. Defined as: namespace xy { public __gc class z { // Class code. }; } Now, I've got another class, in another .h/.cpp file: namespace xy { public __gc class abc { // Class code; }; } The problem is, I cannot use class abc...
  3. mbaranski

    How to embed interpreter

    OK, I've got a VC++ application, and I need to do some data conversions. Now, I'm thinking I want to have a script file, call it x.js. When the data conversion is going to happen, I want my VC++ app to read in x.js, set a variable called inputValue to the original data x.js will modify...
  4. mbaranski

    WMI Query Help

    I've got the following code, that does not work. I get an invalid query error, does anyone know why? Thanks, M. #define _WIN32_DCOM #include <iostream> using namespace std; #include <comdef.h> #include <Wbemidl.h> # pragma comment(lib, "wbemuuid.lib") int main(int argc, char **argv) {...
  5. mbaranski

    TableCellRenderer still not working right

    I have a table cell renderer class, that should color certian cells of a table and leave others the default. The problem is, all the cells take the properties of the last one I set! The text is correct in each of them, but if I set them all blue except the last one, they are all the color of...
  6. mbaranski

    TableCellRenderer Problem

    I have a table cell renderer class, that should color certian cells of a table and leave others the default. The problem is, all the cells take the properties of the last one I set! The text is correct in each of them, but if I set them all blue except the last one, they are all the color of...
  7. mbaranski

    Insert BLOB into ACCESS

    I'm re-writing a mysql app that has blob support. I have set up the access database, but can't seem to insert the ADO Object via odbc. Can anyone give me a small example of how to convert a string into an ado object (or whatever) and insert it. Disclaimer: Beware: Studies have shown that...
  8. mbaranski

    Segfault with threads

    Anyone have any idea why the following source code segfaults after it exits? It prints Done! (The last line) and then segfaults. All of the threads join up and then it gets a sigsegv.?. This is very confusing. MWB. #include <multimap.h> #include <vector> #include <string> #include <deque>...
  9. mbaranski

    Threaded program segfaults

    I'm running a threaded program that segfaults after the threads are joined and before it returns. The last few lines are: pthread_create (&th_a, NULL, producer, 0); pthread_create (&th_b, NULL, consumer, 0); /* Wait until producer and consumer finish. */ pthread_join (th_b, &retval)...
  10. mbaranski

    Fast way to trim trailing whitespace

    I'm writing a program that does a huge database import, and after profiling my code, I've found that my program spends over .25 of it's exec time trailing whitespace from each field it imports. I need a (clever) and fast way to remove trailing spaces, and insert a null where the first trailing...
  11. mbaranski

    files and pipes and streams, oh my!

    I'm trying to do 3 things: 1. Open a pipe to &quot;mysql -fs&quot; and write to it using << operators: I can't figure out how to use popen() and stuff to get an ostream out of that process. i.e. FILE *mysql; mysql = popen(&quot;mysql -fs&quot;, &quot;w&quot;); /* Where to go now? */ 2. Open...
  12. mbaranski

    crypt() and salt question.

    I'm trying to write a verification program for a web page, and it'll use crypt for a password. Do I have to save the salt that people use, or is there a way to get it from the password that they enter? Or, is it acceptable to use their password as the salt? I could use a little advice here...
  13. mbaranski

    Concurrent File access and CGI scripts

    I've a CGI script that takes an email address and a boolean and depending on the boolean adds/removes the address from a mailing list. The mailing list is a flat text file with 1 address per line. When an item is removed, I read every entry except ones that match the address to remove and...
  14. mbaranski

    Re-Direct cerr...

    I've got a program that does some stuff, and has logging information being printed to one file, other stuff going to cout, and errors going to cerr. I want to re-direct cerr to a log file, without messing up anything else. Basically, if there is an option specified in the config file, write...
  15. mbaranski

    putenv() / getenv() problems

    I'm trying to read in a config file, and set the vars as env vars: /etc/carma.conf : informix_server=ol_p140 informix_dbname=proteus informix_username=informix informix_password=informix mysql_dbname=proteus /etc/carma.conf (END) and the source snippet: ifstream configFile; char line[ 512...
  16. mbaranski

    The Place For Howtos

    This is not an ad... I've just used www.linuxdoc.org (The Linux documentation project) quite a bit. They have pretty good stuff, this may help some. Also, www.linuxrouter.org is good. MWB. As always, I hope that helped! Disclaimer: Beware: Studies have shown that research causes cancer in...
  17. mbaranski

    Determine Indexes in a table

    How can I use a SELECT, or whatever, to determine which cols are indexes? I'm usng Informix esqlc, but any sql code to get me started would help. Thanks Mike. As always, I hope that helped! Disclaimer: Beware: Studies have shown that research causes cancer in lab rats.
  18. mbaranski

    Weeding out duplicates

    I have a table in mysql that has about 60 columns. It has about 50,000 entries in it. For each entry, there are 3 almost duplicate records. By almost duplicate I mean that 57 out of the 60 columns are the same for the 3 rows. I want to be able (with temporary tables and select statements) to...
  19. mbaranski

    Write an STL string to a file

    I need to write an STL string to a file. I have a list of things (ASCII data) that I need to write to a file line by line. The line is like: &quot;mike&quot;, &quot;baranski&quot;, &quot;400&quot;, &quot;The man&quot; and ends with a newline (the newline is included in the STL string). I need...
  20. mbaranski

    New FAQ on recursion

    There's a new FAQ on recursion in this section, let me know if there's anything unclear or needed. Mike B. As always, I hope that helped! Disclaimer: Beware: Studies have shown that research causes cancer in lab rats.

Part and Inventory Search

Back
Top