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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by cwong1

  1. cwong1

    SOAP Problem

    Dear experts, your humble admirers have need of your genius minds. I have a problem with my SOAP server. At first all was working perfectly, with all my development done in .Net 2003. I decided to install .Net 2005 when it became available. As soon as it was installed, I tried out my SOAP...
  2. cwong1

    How to get the server name using MS SQL ODBC

    Follow up question: I got the server name now and I stored it in a char (size of 20) variable, say, g_server. But when I pass the g_server to the connect function, I get the error: cannot convert from 'char [20]' to 'const unsigned short *'. How do I solve this? Here's my code: char...
  3. cwong1

    How to get the server name using MS SQL ODBC

    It worked!!! Thanks a lot ArkM!!! =))
  4. cwong1

    How to get the server name using MS SQL ODBC

    Hi. Is there a way in order to get the Server name using MSSQL ODBC in Visual C++? Here's my code: CString wstr_connect ; wstr_connect.Format( "DSN=%s;UID=%s;PWD=%s", gstr_DBName, gstr_UserID, gstr_Password ) ; CDatabase mydb ; BOOL ret = mydb.OpenEx( wstr_connect, CDatabase::noOdbcDialog ) ...
  5. cwong1

    QUERY TWO TABLES PROBLEM

    Try this: SELECT table_two.fields FROM table_two LEFT JOIN table_one ON table_one.fields=table_two.fields WHERE table_one.fields IS NULL ;
  6. cwong1

    Selecting from two tables...

    I think both queries are the same... But if you use the first query, you could do something more (that is if you think you'll need it, if not, you can just use the second query) like getting information from the grade table even if no identical course ID was found on course table, of course...
  7. cwong1

    SQL Syntax Compatibility

    Hello. I think if your SQL statements are really simple, you don't need to change it anymore. However, there are certain things that you should remember, such as MySQL does not provide sub-queries... there are also some joins that don't work on the older vesions of MySQL. Hope it helps.
  8. cwong1

    SQL QUERY - JOIN

    You can use two queries (LEFT JOIN) in order to get the information you need. SELECT t1.staff_id, t1.date, t2.remark, t1.other_field FROM table1 AS t1 LEFT JOIN table2 AS t2 ON t1.date=t2.date ; SELECT t1.staff_id, t2.date, t2.remark, t1.other_field FROM table2 AS t2 LEFT JOIN table1 AS t1 ON...
  9. cwong1

    query problem

    I'm using version 3.23. Follow up question, what if I had two primary keys in the table1 and table2 aside from ID, say P_ID. Example: table1 ----------------------------- P_ID | ID | data1 | data2 ----------------------------- P1 | 1 | 100 | aaa P1 | 2 | 200 | bbb P1 | 3 | 300 | ccc P1 | 4 |...
  10. cwong1

    query problem

    I'm having some problem creating a SELECT query (hopefully, with one or two SQL statement only) that would output the contents of two tables. Example, given the table1 and table2 as follows: table1 ------------------------ ID data1 data2 ------------------------ 1 100 aaa 2...
  11. cwong1

    table locking

    i was wondering, how will you know that tables of a certain database have been locked by other threads? is there a command for it? i can't find it in the manual. thanks

Part and Inventory Search

Back
Top