× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Mike,

First, 1 update per second is obscene. The code below runs from by XP Laptop
(P3 1.2G) to my 270 box in 25 seconds and inserts 10,000 rows. (400
rows/sec)

Second, as to where to look, you can turn on tracing in the odbc manager.
Perhaps the trace would help show where the update statements are going
awry.

-Walden

-----------Code----------
option explicit
dim cn
dim cm
dim rs
dim startid
dim x
dim StartTime
dim StopTime


set cn = createobject("ADODB.Connection")
cn.open("Provider=IBMDA400;Data Source=sol;User
ID=WaldenL;Password=<secret>;Default Collection=EJ_OBJ;")

set cm = createobject("ADODB.Command")
set cm.activeconnection = cn
cm.commandText = "insert into cust (ID, Name) values(?,?)"
cm.prepared = true

set rs = cn.execute("Select coalesce(max(id),0) from cust")
StartID = Cint(rs(0))+1
rs.close
set rs = nothing

StartTime = now()
for x = StartID to StartID + 10000
        cm.parameters(0).value = x
        cm.parameters(1).value = "Name " & x
        cm.execute
next
stoptime = now()

cn.close
set cm = nothing
set cn = nothing

msgbox (stoptime-starttime)*60*60*24
-----------End----------- 


------------
Walden H Leverich III
President
Tech Software
(516) 627-3800 x11
(208) 692-3308 eFax
WaldenL@xxxxxxxxxxxxxxx
http://www.TechSoftInc.com 

Quiquid latine dictum sit altum viditur.
(Whatever is said in Latin seems profound.)
 
-----Original Message-----
From: Michael Naughton [mailto:mnaughton@xxxxxxxxxxxx] 
Sent: Tuesday, November 04, 2003 1:58 PM
To: Midrange Systems Technical Discussion
Subject: SQL (ODBC?) Timeout?

Another developer here has an application in Notes/Domino that loads
records into a file on our AS/400. He says he's not using any fancy Domino
features -- he just sets up an ODBC connection using the Client Access
driver and does SQL inserts. His routine inserts about 1 record per
second, he says, and after about 600 records it seems to time out -- he
doesn't get an error message, or anything, but the inserts just stop. If
he starts is up again where it left off, it will keep going fine for
another 600 or so records, so it doesn't look like a data problem.

We're suspecting some sort of time out problem, but we're not sure where
to look. We're also wondering why a time out would happen anyway, since
there's constant traffic across the connection. I'm a real novice at this
side of things -- does anyone have an idea about what might be happening
and/or where we could look to find out more?

Thanks very much!

Mike Naughton
Senior Programmer/Analyst
Judd Wire, Inc.
124 Turnpike Road
Turners Falls, MA  01376
413-863-4357 x444
mnaughton@xxxxxxxxxxxx

_______________________________________________
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.