Click here to Skip to main content
15,923,142 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: spawnl Pin
Ryan Binns8-Feb-05 17:03
Ryan Binns8-Feb-05 17:03 
GeneralRe: spawnl Pin
2249178-Feb-05 19:12
2249178-Feb-05 19:12 
GeneralShould Be Simple Disabling "Return" Pin
JKallen8-Feb-05 13:47
JKallen8-Feb-05 13:47 
GeneralRe: Should Be Simple Disabling "Return" Pin
Michael Dunn8-Feb-05 14:02
sitebuilderMichael Dunn8-Feb-05 14:02 
GeneralRe: Should Be Simple Disabling "Return" Pin
JKallen8-Feb-05 14:21
JKallen8-Feb-05 14:21 
GeneralRe: Should Be Simple Disabling "Return" Pin
Nish Nishant8-Feb-05 19:14
sitebuilderNish Nishant8-Feb-05 19:14 
GeneralReading Excel files w/ CDatabase Pin
shultas8-Feb-05 13:00
shultas8-Feb-05 13:00 
GeneralRe: Reading Excel files w/ CDatabase Pin
David Crow9-Feb-05 3:36
David Crow9-Feb-05 3:36 
This code snippet worked for me:

CString strConnection, 
        strSQL, 
        strTemp;
CDatabase myDB;
CRecordset recset(&myDB);
CDBVariant sValue;
 
strConnection.Format("DRIVER={%s};DSN='';FIRSTROWHASNAMES=1;READONLY=FALSE;CREATE_DB=\"%s\";DBQ=%s",
    "Microsoft Excel Driver (*.xls)", 
    "c:\\Book1.xls", 
    "c:\\Book1.xls");
myDB.OpenEx(strConnection,CDatabase::noOdbcDialog);
strSQL.Format("SELECT * FROM [Sheet1$]");
recset.Open(CRecordset::forwardOnly, strSQL, CRecordset::readOnly);
 
while (! recset.IsEOF()) 
{
    recset.GetFieldValue((short) 0, sValue);
    strTemp.Format("%f", sValue.m_dblVal);
    AfxMessageBox(strTemp);
    
    recset.MoveNext();
}



"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow


Questionhow to activate a window from a pull-down list Pin
elephantstar8-Feb-05 12:59
elephantstar8-Feb-05 12:59 
QuestionHow do I set a field that accepts an OLE document (Excel, Word, etc.) in an access table? Pin
nonothing8-Feb-05 11:56
nonothing8-Feb-05 11:56 
GeneralCompile/Link Work, Code Doesn't Pin
KenWill8-Feb-05 11:45
KenWill8-Feb-05 11:45 
GeneralRe: Compile/Link Work, Code Doesn't Pin
marinme8-Feb-05 16:31
marinme8-Feb-05 16:31 
GeneralRe: Compile/Link Work, Code Doesn't Pin
KenWill9-Feb-05 3:36
KenWill9-Feb-05 3:36 
GeneralScan Active IP Pin
manofoblivion8-Feb-05 11:19
manofoblivion8-Feb-05 11:19 
GeneralRe: Scan Active IP Pin
2249178-Feb-05 17:19
2249178-Feb-05 17:19 
GeneralRe: messages of CPropertySheet Pin
ThatsAlok8-Feb-05 17:28
ThatsAlok8-Feb-05 17:28 
GeneralRe: messages of CPropertySheet Pin
manofoblivion9-Feb-05 11:35
manofoblivion9-Feb-05 11:35 
GeneralMicrosoft FlexGrid Pin
JesuZ-878-Feb-05 10:49
JesuZ-878-Feb-05 10:49 
GeneralStraight C, ANSI C, UNIX C, ect Pin
Timothy Grabrian8-Feb-05 7:46
professionalTimothy Grabrian8-Feb-05 7:46 
GeneralRe: Straight C, ANSI C, UNIX C, ect Pin
David Crow8-Feb-05 10:31
David Crow8-Feb-05 10:31 
GeneralRe: Straight C, ANSI C, UNIX C, ect Pin
markkuk8-Feb-05 13:01
markkuk8-Feb-05 13:01 
GeneralFormating string for write in excel file Pin
El'Cachubrey8-Feb-05 5:29
El'Cachubrey8-Feb-05 5:29 
GeneralRe: Formating string for write in excel file Pin
David Crow8-Feb-05 7:50
David Crow8-Feb-05 7:50 
GeneralRe: Formating string for write in excel file Pin
El'Cachubrey8-Feb-05 19:47
El'Cachubrey8-Feb-05 19:47 
GeneralRe: Formating string for write in excel file Pin
David Crow9-Feb-05 2:15
David Crow9-Feb-05 2:15 

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.