Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
K

karl_w

@karl_w
About
Posts
34
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Encryption
    K karl_w

    Try this: #define _WIN32_WINNT 0x0500 -- karl

    C / C++ / MFC help security question

  • fetching backward
    K karl_w

    You could call SELECT COUNT(*) FROM items first and then your actual query. -- karl

    Database database help com sysadmin question

  • Physics query?
    K karl_w

    You mean "The Uncertainty Principle" of Heisenberg? -- karl

    The Lounge question database com game-dev

  • the real challenge when installing the OS
    K karl_w

    We take names out of greek mythology: Intranet Web- and Mailserver: HERMES Firewall: KERBEROS Fileserver: ALEXANDRIA (I know it's not out of mythology, but it has a library) Desktops: names connected somehow to the user (our secretary's machine is named APHRODITE, boss' machine ZEUS, his wife's HERA, and so on ...) Domain: HELLAS We also have a little server for LAN-Games (after work!!) It's called DIONYSOS -- karl

    The Lounge c++ apache sysadmin question

  • Select statement
    K karl_w

    This solution is for Oracle, I don't know if and how you can use it in other systems: SELECT rownum, col1, col2, col3 FROM table; -- karl

    Database database com question

  • Capturing 'Enter' key
    K karl_w

    Just add a new function called OnOK() in your dialog-class. And be sure not to call CDialog::OnOK() -- karl

    C / C++ / MFC tutorial

  • foreign key
    K karl_w

    ylaine wrote: tblcompany - accountnumber (primary key) : varchar - companyname : varchar - address : varchar tblcustomer - customerid (primary key, auto generated) : int - companyname [foreign key] : varchar - username : varchar - password : varchar - name : varchar - contactnumber : int The foreign key in tblcustomer references to the PRIMARY KEY of tblcompany. So it references to accountnumber and not to companyname. If you want to set a foreign key to companyname you must define it as UNIQUE in tblcompany and change the fk-constraint to point to companyname. -- karl

    Database help question database

  • foreign key
    K karl_w

    First of all: 1. What DB do you use? Oracle, SQL-Server, Access, DB2? 2. Post your error message (or error code) 3. Post your table-definitons 4. Post the INSERTs you tried. Some things you should check: 1. Most DBs are case sensitive. So 'comp1' != 'Comp1' => master-key won't be found 2. Even if it sounds silly -> Check for typing errors! 3. Be sure to create a company before creating a customer for it. 4. You can only delete a record from tblcompany if no record of tblcustomer is referencing to it. The included example should work (assuming accountnumber, customerid and contactnumber to be NUMBERS, the others VARCHAR) INSERT INTO tblcompany VALUES(1, 'comp1', 'someaddress'); INSERT INTO tblcompany VALUES(2, 'comp2', 'someaddress'); INSERT INTO tblcustomer (companyname, username, password, name, contactnumber) VALUES ('comp1', 'uname', '***', 'name', 1); -- karl

    Database help question database

  • Syntax error with CREATE TABLE
    K karl_w

    For SQL-Server the maximum length for TEXT is 2,147,483,647 (and even VARCHAR can store up to 8000 characters), so I don't think 600 should be the problem. Maybe it's just the missing comma again? --edit-- BTW: For 600 characters you shouldn't use TEXT but VARCHAR because of better performance. TEXT is designed for storing large textfiles, so in the table there is only stored a pointer to the actual data. --edit-- -- karl

    Database database help question

  • MainFrame OnClose() crashes
    K karl_w

    ns wrote: I thought CMDIFrameWnd::OnClose(); would terminate the app.. No, it just closes the window. If you don't want to execute the rest of your code add a return; after CMDIFrameWnd::OnClose(); -- karl

    C / C++ / MFC help windows-admin question

  • Modularity with C++ on Windows and Linux
    K karl_w

    I think he means wxWindows www.wxwindows.org[^] -- karl

    C / C++ / MFC help c++ database oracle com

  • #iclude problems
    K karl_w

    mehere wrote: Error E2209 Yahtzmain.cpp 12: Unable to open include file 'Yahzt.h' I know it sounds silly, but are you sure your file is named 'Yahzt.h'? I once mistyped the filename for a class. I wanted to include the headerfile but it wasn't found. After half an hour searching for the error I checked filenames and found the problem :-O -- karl

    C / C++ / MFC help tutorial delphi game-dev tools

  • Question about delete a char* pointer
    K karl_w

    You don't need to release the memory of these variables because they aren't allocated on heap but on stack. Defining char* q ="54321"; is the same as defining char q[6] = "54321";. You only need to use delete/delete [] for variables created with new/new []. -- karl

    C / C++ / MFC performance question announcement

  • Query From Column Name
    K karl_w

    I'm not sure if I understood you right. Maybe you mean how to get the columnnames in you table. Try DESCRIBE tablename -- karl

    Database database question

  • What is the difference between delete[] and delete?
    K karl_w

    CString *example1; CString *example2; example1 = new CString; //allocate one CString delete example1; example2 = new CString[10]; //allocate an array of 10 CStrings delete [] example2; Simply said: delete is for deleting single objects, delete[] is for deleting arrays of objects. Everything you allocated with new[] you should must free with delete[]. -- karl

    C / C++ / MFC question tutorial

  • What is wrong with these SQL statements??
    K karl_w

    Could you post your table-definition? What database are you using? Maybe you have to use \' instead of ' ? A full SQL-Specification can be found here: http://developer.mimer.com/documentation/Mimer_SQL_Reference_Manual/Mimer_SQL_ReferenceTOC.html[^] -- karl

    Database database question help

  • What is wrong with these SQL statements??
    K karl_w

    You don't need the "*" but you'll need "from" so the right statement will be (at least in SQL92) DELETE FROM branches WHERE branch_no LIKE '4%' -- karl

    Database database question help

  • Need help in using CryptoAPI
    K karl_w

    vuduo wrote: In order compile my application, do I have to add any macro in my code or download any service pack for my Visual Studio? Try this one: #define _WIN32_WINNT 0x0500 This should do the trick. -- karl

    C / C++ / MFC c++ csharp visual-studio json help

  • Intefacing a database with ANSI C++
    K karl_w

    If you know what DB you will use and you know it won't change, you can use the API of your DB. I think most of the known DBs have at least a C Interface you can use. For Oracle look for OCI (Oracle Call Interface) in the Oracle-Docs (online at otn.oracle.com[^] ) <--edit--> Forgot to mention Pro*C/C++ Precompiler for Oracle. With this precompiler you can write your SQL-Statemetns simply into your C/C++ code. Then run the precompiler. It will subsitute your statements with the correct OCI-calls. <--edit--> If you don't know what DB you will use or you want to be able to change it very easy you can use ODBC. The hardest way: You can implement a generic Data-Access-Class in combination with a Wrapper-Class for each DB-API. So you just replace your wrapper class and you can use another DB. :-D -- karl

    C / C++ / MFC c++ database oracle linux

  • Does anyone have any tutorials on using SQL with C++..
    K karl_w

    You know, this is quite the hardest way to interact with a database? For using the API there are many good examples in the MSDN: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odbc/htm/dasdkodbcoverview.asp[^] For SQL-Beginners this site could be helpful (I didn't have a deep look into it, just read the titles): http://www.w3schools.com/sql/default.asp[^] Hint: Search for SQL + tutorial on google. There are many other sites. -- karl

    Database c++ database help
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups