Thank you for this concise summary of possibilities. I am
using the first
one, but I would rather use the third one. It just will not
work for some
reason in my environment. The dataset I try to get is only
1000 or so
records, but in trying to search the entire mainframe, the
query hits the
timeout. Oh well, I have it working, and I need to move
on to the next
issues in this project. There is absolutely nothing
appealing about the
second one, for any application I can think of.
Thanks again for your help.
Kelly
-----Original Message-----
From: Discussion of writing applications and components
using Visual Basic
.NET [mailto:VBDOTNET DISCUSS.DEVELOP.COM] On Behalf Of Don
Edwards
Sent: Thursday, June 22, 2006 1:11 PM
To: VBDOTNET DISCUSS.DEVELOP.COM
Subject: Re: [VBDOTNET] Database access without using a
dataset
From: Kelly Baker <kbaker HOWARD-IND.COM>
>Normally I would agree with you. But in this case,
Connx acts as a
>database interface for our mainframe flatfiles. A query
with a
filter
>that may return only 40,000 records times out on the
mainframe
>before it is complete. I'll see the 40,000 records, but
the query
>would never end because of the mainframe timeout.
Unfortunately,
>I don't have the clout to make them upgrade from the
flatfiles to a
>database driven system or this would not be an issue.
So it's basically a communication timeout - you have time
to get a
little data but not a lot of data.
That means you want queries that return only a little data
and
process quickly on the mainframe.
Which means you'll be running many queries. You can do that
with one of three models:
(1) Open a connection, create a datareader, suck the data
out of
it, close the datareader, close the connection. (The
connection will
actually be held open for a while and reused if you try to
open
another connection with all the same attributes. This
happens
automatically, handled by the .Net runtimes, so don't worry
about
frequent opening and closing.) You'll only use one
connection per
user.
(2) Open a connection, create a datareader. Don't close
either until
you are done with that data. Get data from the datareader at
leisure.
You may have dozens of connections per user. Which may annoy
your system administrators.
(3) Open a connection, grab a dataset, close the connection.
Get
data from the dataset at leisure. You'll only use one
connection per
user.
===================================
This list is hosted by DevelopMentor(r) http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
===================================
This list is hosted by DevelopMentorŪ http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
|