0

I have an application that takes a long time to open odbc connections (like 20 sec) also takes forever using arcmap and arcsde

but when I try the connection on the odbc data source administrator, it tests it really fast

Does anyone have any idea of what my be causing this?

btw the application works fine in another computer with another database

thanks.

sergiogx
  • 335
  • 3
  • 15

1 Answers1

0

In ODBC administrator you can enable tracing. Then compare trace file from both slow and fast machine. If there is "fast" open from that machine using ODBC administrator and "slow" from your app then try other ways to open such connection. Try use it from other tool such as QueryTool (free trial), or create simple script in Python with win32 extension. In Python (I recommend Active Python which has win32 included) you can open ODBC with:

import odbc
import time

t_start = time.time()
conn = odbc.odbc('db_alias/user/passwd')
t_stop = time.time()
print('open: %.3f [ms]' % (t_stop-t_start))
cursor = conn.cursor() 
cursor.execute("SELECT FIRST 1 DBINFO('version','full') FROM systables;")
for row in cursor.fetchall():
    print('[%s]' % (row[0]))

(note Informix specific version select)

Michał Niklas
  • 248
  • 1
  • 3
  • 10