[AccessD] My first use of the Listview Control

Drew Wutka DWUTKA at Marlow.com
Wed Oct 29 13:35:40 CDT 2008


A few weeks ago we had a thread about creating a generic HTML table
based on a recordset.  I posted something that I typically add to my
more involved web systems.  It's a pretty generic asp page that let's me
put in an SQL Statement and then execute it (and either display the
results, or just run the SQL (if it is something like an Update, Insert
or Delete process)).  It's a handy page to put into a system, because
when initially developing a web based system, I usually have the
database and webpages local on my laptop.  But I eventually get to a
point where I move the system to the designated server.  If I still need
to develop the 'live' system, while opening and modifying .asp pages is
simple (even on a remote connection), sometimes opening an .mdb can be a
slow process (over a VPN, or even slower having to download it over an
FTP connection).  Plus, since Access 2000, sometimes the slightest
change will lock the database to web users.

 

So with that generic 'sql' page, I can put in a little SQL, and view or
modify the data right in the 'live' database, the query is run on the
web server itself, so I only get the data back (so it's fast), and since
it is connecting to the .mdb, it doesn't lock anyone else out of the
database.

 

Pretty handy!

 

Now lately, I've been spending most of my free time adding A LOT of
bells and whistles to one of my most complex VB 6 projects, the ISFE
(Information Services Front End).  The ISFE started out as a Help Desk
system, but eventually ended up with all sorts of other features.  A few
months ago, I moved the ISFE back end database from an Access .mdb, to
SQL Server.  (I love .mdb's, but when you are not using a web interface,
and you have to connect to them remotely, you might as well go out to
lunch while it works....). And about a month ago, we began using a new
(corporate wide) help desk system called Unicenter HelpDesk from
Computer Associates.  So all the bells and whistles I have been tacking
into the ISFE have been for the 'extra' features, some pretty cool ones.
Anyhow, one quirk I have, is that my desktop at work won't install the
Enterprise Manager for SQL Server. (My laptop installed it just fine).
However, over a VPN, the ISFE actually runs faster then Enterprise
Manager when it comes to getting data from the SQL Server.  So over the
past few days, as I've been tinkering with the ISFE program, I thought
to myself 'my, wouldn't it be nice to throw in an SQL Window that I can
talk to the database without Enterprise Manager'.  Not only would it fix
the sluggishness over a VPN, and the fact I can't hit it from desktop,
but it would allow me to use it on any machine the ISFE is installed on
(which is every computer in our company).

 

Problem:  In the ASP version, it builds an HTML table based on the
number of fields, and number of records returned.  Very simple to do.
But, in VB, I only knew of the Flexgrid to get similar results.  Plus, I
don't have the flexgrid 'packaged' with the ISFE, so if I used it, it
would might require the clients to need that flexgrid .ocx installed.
However, the listview is the same .ocx (I believe) as the treeview, and
I use treeviews a lot.  And wouldn't you know it, the treeview makes a
great 'datasheet' view.  Here's some screen shots of this VB form I
built (in about 20 minutes):

 

http://www.marlow.com/ListView1.jpg

 

http://www.marlow.com/ListView2.jpg

 

http://www.marlow.com/ListView3.jpg

 

Since this post is a little longer then I intended (sorry, just very
pleased with how easy this form was and how well it works), if anyone
thinks I should post the code behind this form, let me know. (In the
middle of writing this, I added another feature to this form, which
dumps the resulting data set to Excel)

 

Drew

 

 

 

 

 

 


The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited.



More information about the AccessD mailing list