Click here to Skip to main content
15,891,976 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Strings in C++ Pin
Iceberg7622-Feb-04 9:49
Iceberg7622-Feb-04 9:49 
GeneralRe: Strings in C++ Pin
Tim Smith22-Feb-04 11:16
Tim Smith22-Feb-04 11:16 
GeneralRe: Strings in C++ Pin
Tim Smith22-Feb-04 4:15
Tim Smith22-Feb-04 4:15 
GeneralRe: Strings in C++ Pin
David Crow23-Feb-04 3:14
David Crow23-Feb-04 3:14 
Questionhow to connect to access database in vc++6.0? Pin
Anonymous21-Feb-04 16:09
Anonymous21-Feb-04 16:09 
AnswerRe: how to connect to access database in vc++6.0? Pin
LieuLuc21-Feb-04 17:12
LieuLuc21-Feb-04 17:12 
GeneralRe: how to connect to access database in vc++6.0? Pin
Anonymous21-Feb-04 18:48
Anonymous21-Feb-04 18:48 
GeneralRe: how to connect to access database in vc++6.0? Pin
solostar***22-Feb-04 20:31
solostar***22-Feb-04 20:31 
CString sDsn;
CString sFile = "e:\\DAS.mdb"; //path to database
// You must change above path if it's different

// Build ODBC connection string
sDsn.Format("ODBC;DRIVER={%s};DSN='';DBQ = %s",sDriver,sFile);
TRY
{CDatabase ComboDatabase;
// Open the database
ComboDatabase.Open(NULL,false,false,sDsn);
// Build the SQL statement
SqlCommand = "DELETE FROM BandSetting "
"WHERE BANDNAME = '" + m_Store + "'" ;
ComboDatabase.ExecuteSQL(SqlCommand);

// Close the database
ComboDatabase.Close();
}
CATCH(CDBException, e)
{
// If a database exception occured, show error msg
AfxMessageBox("Database error: "+e->m_strError);
}
END_CATCH;
}


#include "afxdb.h"
#include "odbcinst.h" include these 2 as header files

this shd worl perfectlt fine.. cos it worked well for me =)


GeneralRe: how to connect to access database in vc++6.0? Pin
David Crow1-Mar-04 2:28
David Crow1-Mar-04 2:28 
AnswerRe: how to connect to access database in vc++6.0? Pin
David Crow23-Feb-04 3:21
David Crow23-Feb-04 3:21 
GeneralCannot Run the Database on other PC Pin
siew hoon21-Feb-04 15:23
siew hoon21-Feb-04 15:23 
GeneralRe: Cannot Run the Database on other PC Pin
LieuLuc21-Feb-04 16:44
LieuLuc21-Feb-04 16:44 
GeneralRe: Cannot Run the Database on other PC Pin
siew hoon21-Feb-04 19:09
siew hoon21-Feb-04 19:09 
GeneralRe: Cannot Run the Database on other PC Pin
Steve S22-Feb-04 22:29
Steve S22-Feb-04 22:29 
GeneralRe: Cannot Run the Database on other PC Pin
Tim Smith21-Feb-04 17:15
Tim Smith21-Feb-04 17:15 
GeneralRe: Cannot Run the Database on other PC Pin
David Crow23-Feb-04 3:24
David Crow23-Feb-04 3:24 
GeneralRe: Cannot Run the Database on other PC Pin
siew hoon27-Feb-04 16:31
siew hoon27-Feb-04 16:31 
GeneralRe: Cannot Run the Database on other PC Pin
David Crow1-Mar-04 2:26
David Crow1-Mar-04 2:26 
GeneralRe: Cannot Run the Database on other PC Pin
siew hoon1-Mar-04 4:06
siew hoon1-Mar-04 4:06 
GeneralMicrosoft Office Chart 9.0 Pin
krugger21-Feb-04 13:11
krugger21-Feb-04 13:11 
GeneralEnumWindows() Pin
Nirav Doshi21-Feb-04 12:17
Nirav Doshi21-Feb-04 12:17 
GeneralRe: EnumWindows() Pin
Gary R. Wheeler21-Feb-04 12:36
Gary R. Wheeler21-Feb-04 12:36 
GeneralRe: EnumWindows() Pin
Nirav Doshi21-Feb-04 12:41
Nirav Doshi21-Feb-04 12:41 
Generalconsole i/o problems Pin
#937021-Feb-04 12:04
#937021-Feb-04 12:04 
GeneralRe: console i/o problems Pin
valikac21-Feb-04 14:36
valikac21-Feb-04 14:36 

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.