Hello together
My ODBC-connection has slown down.
Does anybody know, if systemvariables have affect to the speed of ODBC!
After manipulating with systemvariables my programm slowed down at the point where I call RECORDSET OPEN.
Is there anything which can be manipulted to speed up ODBC??
Thanks for helping
Reini
[code]
int _stdcall ask_pps_repl(ch ar TLNR[7]) {
char tmp[256];
char sql[133];
char TLNR_repl[7];
try {
AfxDaoInit();
CDaoWorkspace ws_e;
ws_e.Open();
// *** Database IBM AS400 ***
CDaoDatabase DB_e(&ws_e);
DB_e.Open(NULL, FALSE,TRUE,_T(" ODBC;DSN=pps;UI D=*****;PWD=*** **"));
// *** Querydefinition ***
CDaoQueryDef qd_e(&DB_e);
try {
sprintf(sql,"SE LECT DTLNR3 FROM IDTLPD WHERE IDTLPD.DTLMDK=' L00' AND IDTLPD.DTLNR='% s';",TLNR);
qd_e.Create(NUL L,sql);
}
catch(CDaoExcep tion* ex) {
ex->ReportError( );
return (0);
}
CDaoRecordset rs_e(&DB_e);
try {
rs_e.Open(&qd_e , dbOpenSnapshot, dbForwardOnly);
}
catch(CDaoExcep tion* ex) {
ex->ReportError( );
return (0);
}
try {
COleVariant varValue_e[1];
if(rs_e.GetFiel dCount()!=0) {
// Feldinhalt von erster TLNR lesen
rs_e.GetFieldVa lue(0, varValue_e[0]);
strcpy(TLNR_rep l, V_BSTRT(&(varVa lue_e[0])));
}
else
return(0);
}
catch(CDaoExcep tion* e) {
e->ReportError( );
e->Delete();
sprintf(tmp, "Fehler %d %s\n", e->m_pErrorInfo->m_lErrorCode , e->m_pErrorInfo->m_strDescripti on);
MessageBox(GetF ocus(),tmp, "FEHLER!", MB_OK);
}
// *** Ende ***
rs_e.Close();
qd_e.Close();
DB_e.Close();
ws_e.Close();
}
catch(CDaoExcep tion* e) {
e->ReportError( );
e->Delete();
sprintf(tmp, "Fehler %d %s\n", e->m_pErrorInfo->m_lErrorCode , e->m_pErrorInfo->m_strDescripti on);
MessageBox(GetF ocus(),tmp, "FEHLER!", MB_OK);
}
return (atoi(TLNR_repl ));
}
[\CODE]