Click here to Skip to main content
15,912,329 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: inline dont work in VC++ Pin
sunit525-Nov-05 19:50
sunit525-Nov-05 19:50 
Questionbinary search Pin
ArielR25-Nov-05 0:48
ArielR25-Nov-05 0:48 
AnswerRe: binary search Pin
cmk25-Nov-05 3:03
cmk25-Nov-05 3:03 
GeneralRe: binary search Pin
ArielR25-Nov-05 5:22
ArielR25-Nov-05 5:22 
GeneralRe: binary search Pin
cmk25-Nov-05 5:29
cmk25-Nov-05 5:29 
AnswerRe: binary search Pin
Matt Godbolt25-Nov-05 4:30
Matt Godbolt25-Nov-05 4:30 
QuestionQuery: Printing MS access tables using VC++ Pin
Ankush Mehta25-Nov-05 0:40
Ankush Mehta25-Nov-05 0:40 
QuestionQuery: Printing MS access tables using VC++ Pin
Ankush Mehta25-Nov-05 0:37
Ankush Mehta25-Nov-05 0:37 
Hi All,

Requirement: i want to print the table in an MS Access Database.The Design is such that when i select a database using open Dialog, the corresponding tables in it should come in combo box automatically,i.e,
1) I should be able to retrieve the no. of tables & their names as well(not resolved)
2)on selecting any 1 table in combo box, i want to automate its printing through the click of a button.
I am using vc++ 6.0, office 2000.

Where i am: I tried a lot & searched a lot on net. a lot of material is available in vb/.net but in vc++ the same approach doesn't work out. Here is a snippet of the code:

if(!app.CreateDispatch("Access.Application"))
{
AfxMessageBox("Couldn't CreateDispatch on Excel");
return;
}

// Set visible.
app.SetVisible(TRUE);
app.OpenCurrentDatabase(m_FileName,TRUE);

//Get DoCmd Collection
lpDisp=app.GetDoCmd();
ASSERT(lpDisp);

// Attach the IDispatch pointer to the oDoCmd object
oDoCmd.AttachDispatch( lpDisp );

//Parameters of Open Table & Printout shown below give errors in VC++
oDoCmd.OpenTable (TableName,acViewNormal,acReadOnly);
DoCmd.PrintOut [printrange][, pagefrom, pageto][, printquality][, copies][, collatecopies]

I don't know whether this is the desired approach to fulfill the 2 requirements mentioned above.Moreover, i don't know the desired parameters of opentable & printout in vc++(Preferably,they should be same as in vba but still these give errors. if possible, please give the exact parameters in any solution)

This is urgent. Please Help.

Thanks in anticipation,
Ankush Mehta.



Ankush Mehta
QuestionOnLButtonDown cannot catch mouse click on CButton Pin
caykahve25-Nov-05 0:26
caykahve25-Nov-05 0:26 
AnswerRe: OnLButtonDown cannot catch mouse click on CButton Pin
Gary R. Wheeler25-Nov-05 3:06
Gary R. Wheeler25-Nov-05 3:06 
AnswerRe: OnLButtonDown cannot catch mouse click on CButton Pin
Michael Dunn25-Nov-05 10:04
sitebuilderMichael Dunn25-Nov-05 10:04 
QuestionHTTP commands & Sockets Pin
Mohammad A Gdeisat24-Nov-05 23:36
Mohammad A Gdeisat24-Nov-05 23:36 
AnswerRe: HTTP commands & Sockets Pin
vikas amin25-Nov-05 2:46
vikas amin25-Nov-05 2:46 
AnswerRe: HTTP commands & Sockets Pin
sunit525-Nov-05 2:58
sunit525-Nov-05 2:58 
AnswerRe: HTTP commands & Sockets Pin
Ravi Bhavnani25-Nov-05 13:21
professionalRavi Bhavnani25-Nov-05 13:21 
AnswerRe: HTTP commands & Sockets Pin
sunit525-Nov-05 19:31
sunit525-Nov-05 19:31 
QuestionUdp socket with two network cards(Ethernet NIC) Pin
ygyu24-Nov-05 22:17
professionalygyu24-Nov-05 22:17 
QuestionProgramming Outlook Pin
cuongcntt200224-Nov-05 21:27
cuongcntt200224-Nov-05 21:27 
QuestionSlow performance with mixed assembly Pin
uus9924-Nov-05 20:45
uus9924-Nov-05 20:45 
AnswerRe: Slow performance with mixed assembly Pin
Nemanja Trifunovic25-Nov-05 13:43
Nemanja Trifunovic25-Nov-05 13:43 
QuestionFastest thread-safe logging library for C++ Pin
Automation Software Engineer (A.S.E)24-Nov-05 20:11
Automation Software Engineer (A.S.E)24-Nov-05 20:11 
AnswerRe: Fastest thread-safe logging library for C++ Pin
cmk25-Nov-05 3:12
cmk25-Nov-05 3:12 
QuestionRunning Excel from an MFC program Pin
pani6824-Nov-05 19:43
pani6824-Nov-05 19:43 
AnswerRe: Running Excel from an MFC program Pin
S Douglas24-Nov-05 21:36
professionalS Douglas24-Nov-05 21:36 
QuestionCEdit WM_CHAR question Pin
followait24-Nov-05 19:35
followait24-Nov-05 19:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.