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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
J

JockeP

@JockeP
About
Posts
6
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • landscape print in dialog?
    J JockeP

    Thanks for your reply Eugene! However, I'm sorry I still dont get it. I'm not using Document-View mode in which I think I know how to retreive the Device Context (pDC). I'm using Dialog mode. How can you acheive this? I also noticed you converted bLandscape to short. Why? Isn't it only the value that's assignmed dmOrientation that needs to be short?! Finally, does this alter the settings of my default printer straight away without showing any dialog, or what happens? Thanks again, Joachim

    C / C++ / MFC question

  • landscape print in dialog?
    J JockeP

    Thanks, but I get these five errors when compiling: error C2065: 'bLandscape' : undeclared identifier error C2065: 'ORIENT_LANDSCAPE' : undeclared identifier error C2059: syntax error : ')' error C2065: 'pDC' : undeclared identifier error C2227: left of '->ResetDCA' must point to class/struct/union Generating Code... Error executing cl.exe. It seems bLandscape does not exist. Where does that variable come from? I can also not find ORIENT_LANDSCAPE in MSDN.

    C / C++ / MFC question

  • landscape print in dialog?
    J JockeP

    Is there a way to change the print page orientation to landscape in a dialog mode, i e I'm not using Document- View mode? To print I've previously used ShellExecute method.

    C / C++ / MFC question

  • SIMPLE db example
    J JockeP

    ok thanks, but it need more specific ideas... i'm not that experienced with using vc++ to work with databases

    C / C++ / MFC database sql-server sysadmin tutorial question

  • What is wrong with these SQL statements??
    J JockeP

    Hi! I'm just curious how you manage to execute those insert and delete queries? I get rt error when doing it like this: CDaoDatabase* m_pDB; CDaoRecordset* m_pRS; m_pDB = new CDaoDatabase; m_pRS = new CDaoRecordset(m_pDB); try { m_pDB->Open("c:\\accessdb\\db1.mdb"); // CString strQuery = _T("SELECT * FROM Table1"); //Works just fine... CString strQuery = _T("INSERT INTO Table1 VALUES ('3', 'Olga')"); //Doesn't work m_pRS->Open(dbOpenDynaset, strQuery); } catch (CDaoException* e) { AfxMessageBox(e->m_pErrorInfo->m_strDescription); e->Delete(); } Can you tell me how to do it?

    C / C++ / MFC database question help

  • SIMPLE db example
    J JockeP

    Hi! I have tried to find a simple way to manipulate a database (in MS Access or MS SQL Server). However, I've not succeeded. I've tried SELECT statements with CRecordset and it works. But it seems like only SELECT statements work. This is what I've tried: CDaoDatabase* m_pDB; CDaoRecordset* m_pRS; m_pDB = new CDaoDatabase; m_pRS = new CDaoRecordset(m_pDB); try { m_pDB->Open("c:\\accessdb\\db1.mdb"); // CString strQuery = _T("SELECT * FROM Table1"); //Works just fine... CString strQuery = _T("INSERT INTO Table1 VALUES ('3', 'Olga')"); //Doesn't work m_pRS->Open(dbOpenDynaset, strQuery); } catch (CDaoException* e) { AfxMessageBox(e->m_pErrorInfo->m_strDescription); e->Delete(); } So how do you add data to a table, modify tables and so on? Cheers, Joachim

    C / C++ / MFC database sql-server sysadmin tutorial question
  • Login

  • Don't have an account? Register

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