Click here to Skip to main content
15,917,859 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
GeneralRe: C1010 Error Pin
Christian Graus12-Sep-05 17:42
protectorChristian Graus12-Sep-05 17:42 
QuestionThree Ques Pin
LiYS12-Sep-05 5:57
LiYS12-Sep-05 5:57 
AnswerRe: Three Ques Pin
Christian Graus12-Sep-05 12:36
protectorChristian Graus12-Sep-05 12:36 
GeneralRe: Three Ques Pin
LiYS12-Sep-05 15:13
LiYS12-Sep-05 15:13 
GeneralRe: Three Ques Pin
Christian Graus12-Sep-05 17:48
protectorChristian Graus12-Sep-05 17:48 
Questionheader error Pin
rolati12-Sep-05 4:08
rolati12-Sep-05 4:08 
QuestionHelp me!!!!! Detecting change in data streams Pin
bulgaa12-Sep-05 3:02
bulgaa12-Sep-05 3:02 
QuestionInsert data problem Pin
mengyin11-Sep-05 22:19
mengyin11-Sep-05 22:19 
i face problem in insert data from text file to mysql database,when the program finish read a line of a text file,it should insert data into database.

How can i make the program to insert data into database once read a line from text file?

Below is my code:
-----------------------------------------------
void CXXXDlg::OnButtonInsert()
{
// TODO: Add your control notification handler code here
CStandardDB db;
FILE* pFile = fopen("c:\\XXX.txt","r");
log_standard logRead;
while (!feof(pFile)) {
if(!searchfile(logRead.strLogdate,pFile,'\t'))
break;
if(!searchfile(logRead.strLogtime,pFile,'\n'))
break;

insertdb(&logRead);//after finish read a line,call insert data
}
//insertdb(&logRead);//success insert last line of data if call insert data here
}

void CXXDlg::insertdb( logfile * pLog)
{
CDatabase myDb;
myDb.Open(NULL,FALSE,FALSE,"ODBC;DSN=standard");
CODBCRecordset rs(&myDb);


CString strQuery="";
strQuery.Format("insert into standard (logdate,logtime,name) values (\'%s\',\'%s\',\'%s\')",
pLog->strLogdate,pLog->strLogtime,pLog->strName);
//AfxMessageBox(strQuery);
myDb.ExecuteSQL(strQuery);

}

Questionclasses c++ project HELP!! PLZ Pin
da_comp_learner11-Sep-05 15:19
da_comp_learner11-Sep-05 15:19 
AnswerRe: classes c++ project HELP!! PLZ Pin
Christian Graus11-Sep-05 15:33
protectorChristian Graus11-Sep-05 15:33 
GeneralRe: classes c++ project HELP!! PLZ Pin
da_comp_learner11-Sep-05 15:41
da_comp_learner11-Sep-05 15:41 
GeneralRe: classes c++ project HELP!! PLZ Pin
Christian Graus11-Sep-05 15:55
protectorChristian Graus11-Sep-05 15:55 
QuestionHelp with DJGPP! (GCC for DOS) Pin
Lord Kixdemp11-Sep-05 7:06
Lord Kixdemp11-Sep-05 7:06 
QuestionRe: Help with DJGPP! (GCC for DOS) Pin
Lord Kixdemp11-Sep-05 11:47
Lord Kixdemp11-Sep-05 11:47 
QuestionMonitor Traffic on Single Computer... Pin
code-frog10-Sep-05 15:24
professionalcode-frog10-Sep-05 15:24 
Questionwhy it is giving runtime error? Pin
mcnu10-Sep-05 7:06
mcnu10-Sep-05 7:06 
AnswerRe: why it is giving runtime error? Pin
Christian Graus11-Sep-05 12:33
protectorChristian Graus11-Sep-05 12:33 
GeneralRe: why it is giving runtime error? Pin
mcnu11-Sep-05 15:45
mcnu11-Sep-05 15:45 
GeneralRe: why it is giving runtime error? Pin
Christian Graus11-Sep-05 15:56
protectorChristian Graus11-Sep-05 15:56 
GeneralRe: why it is giving runtime error? Pin
mcnu11-Sep-05 16:13
mcnu11-Sep-05 16:13 
GeneralRe: why it is giving runtime error? Pin
Christian Graus11-Sep-05 16:20
protectorChristian Graus11-Sep-05 16:20 
GeneralRe: why it is giving runtime error? Pin
mcnu11-Sep-05 16:50
mcnu11-Sep-05 16:50 
GeneralRe: why it is giving runtime error? Pin
Christian Graus11-Sep-05 16:51
protectorChristian Graus11-Sep-05 16:51 
GeneralRe: why it is giving runtime error? Pin
Nemanja Trifunovic12-Sep-05 2:35
Nemanja Trifunovic12-Sep-05 2:35 
Questionoperator << is ambiguous? Pin
LiYS9-Sep-05 18:24
LiYS9-Sep-05 18:24 

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.