Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Accessing DB2 database and creating reports with VB

Status
Not open for further replies.

DeniseB

Vendor
Nov 10, 1998
1
0
0
US
Would VB be an efficient/useful language if I wanted to access a DB2 database and retrieve information? And after acessing this, allow consumers to be able to create reports online using the information pulled off of the DB2 database? Can all this be done with VB? <br>
Know a site where this information can be found? Thanks.
 
DeniseB,<br>
<br>
Would be and is, as long as you have an ODBC connection to DB2.<br>
<br>
We (read that as one other and me, but she is doing most of the work - one of the advantages of being an old cripple is to be able to delegate w/o repercussion &lt;grin!&gt;!) use the InterSolv SequeLink client/server product to talk to DB2 (on IBM big iron, VMS host (I think)). It installs a 'thin' server on the DB2 platform, and an ODBC client on the local box. There are other DB2 ODBC connectivity resolutions, so my explain may be a little off-kilter for them.<br>
<br>
ODBC aside, we use three approaches to reporting from the DB2 database. (As an aside, we also link in ODBC connectivity to some Oracle tables and even a couple of MS Access .mdb files.)<br>
<br>
The first approach, and the most commonly used, is a VB launch mechanism which populates pre-designed Crystal reports (v6.0 currently, but I've been using this method since version two or three) with user-selectable parameters, up to five parameters, then 'prints' the reports to screen, with option for hardcopy or export to Excel, Word, etc.. The VB launch mechanism is fairly straightforward, and allows you to build a few 'generic' reports that can end up highly customized depending upon user input.<br>
<br>
The next approach is to build a hard-coded report from SQL and raw code (no user input except, "Press the button, Max!") to build a 'fixed' report, i.e., a 'standard' report that allows of no change.<br>
<br>
The last approach involves use of a third-party control, the VS OCXs. Using the VSPrint and VSView capabilities, I've been able to create coherent reports out of multiple, non-relational (non-realted?) SQL statements, all on one page. Could do the same in Crystal, but would be a page per SQL statement. Could do in plain vanilla VB via the printer object, but wouldn't have the 'pretty-print' capabality so easily, or perhaps at all.<br>
<br>
If any of this seems to be something useful to you, just say what you want and I'll try to expand, or supply code where possible.<br>
<br>
Make a good day . . ..<br>

 
You may find the following middleware names useful if you are seriously contemplating Vb with a DB2 back-end. VB can be a very useful language with DB2. In fact I state as a matter of fact - the largest retailer in the UK (ok perhaps now the 2nd largest) uses VB as its main front end gui for DB2 in all implementations - and very successfully at that....<br>
<br>
The two main middleware solutions for efficient connectivity from a VB front end and a DB2 subsystem that I have come accross - are products called XDB and Shadow Direct. <br>
I suspect the latest ado technology in vb6 could influence your decision (I am just starting to familiarise with that as apposed to the older RDO)- and I have to confess - at the time I used both middleware solutions - I was using vb3 and 4. perhaps much has changed since then...and I do suspect - that middleware may be 'overkill' if you are not looking for a full 'client server' type<br>
installation of VB&lt;---&gt;DB2 but could luck in your hunt for a solution.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top