473,569 Members | 2,844 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

slow ODBC connection

1 New Member
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]
Oct 30 '06 #1
0 1305

Sign in to post your reply or Sign up for a free account.

Similar topics

11
17534
by: DJJ | last post by:
I am using the MySQL ODBC 3.51 driver to link three relatively small MySQL tables to a Microsoft Access 2003 database. I am finding that the data from the MySQL tables takes a hell of a long time to load making any kind linkage with my Access data virtually useless. I have the MySQL driver setup in as a USER DSN. The MySQL data is...
2
5148
by: panda | last post by:
Dear ALL, I was trying to connect to a remote AIX DB2 database from a Windows 2000 machine in two ways: 1) Use DB2 client in Windows to connect to the cataloged DB I typed "db2 connect to mydb user myuser using mypassword" in the DB2 command line. The connection is nearly instant.
6
8565
by: B B | last post by:
Okay, here is what's happening: I have a reasonably fast laptop (1.4 GHz Mobile M, so comparable to 2.5GHz P4) doing .net development. Running Windows XP pro, SP2 IIS is installed and running fine All SQL Servers I am referring to share a small (10 computers or so) LAN with a 100MB Switch. No other computers on the LAN exhibit this...
21
4660
by: lesperancer | last post by:
I've got an access97 reporting mdb that pulls data (77,000 rows) from a sql server table into a local table to run reports if the local table is part of the reporting MDB, the insert statement (16 fields) takes less than 30secs, but because of db-bloat, I moved the local table to a 2nd MDB and per postings, this 2nd MDB is copied into a...
13
3436
by: eighthman11 | last post by:
using Access 2003 and sql server version 8.0 Hey everyone. Created a text box where the user types in an Inventory number and it takes them to that inventory number on the contimuous form. The form is based on a link table to sql server. Here is the code: Dim rst As DAO.Recordset Dim InventoryItem As String InventoryItem = "'" &...
0
7695
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7612
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8119
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7668
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6281
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5218
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3637
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2111
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1209
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.