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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ListView Control

Status
Not open for further replies.

MarcelBeals

Programmer
Mar 29, 2000
18
CA
I hope I am not stuck.<br><br>This is the problem:<br><br>I inherited a VB5 (E) system.&nbsp;&nbsp;I am trying to convert it to VB6 (P).&nbsp;&nbsp;There are 3 DBGrid's.&nbsp;&nbsp;I have tried to convert them without changing how the Oracle D/B is accessed.&nbsp;&nbsp;I may have hit a road block.&nbsp;&nbsp;I convert the grids to ListViews and now have come across a problem.&nbsp;&nbsp;I can not make changes and update the D/B with this solution.<br><br>Can anyone think of something else that I can use?<br><br>I know I can not do the same things in ListView as DataGrid but there must be another solution.&nbsp;&nbsp;I also do not want to buy a third party solution because that can get very expensive and the other colleges will not buy into that.<br><br>Is there a conversion program out there that will convert the VB5's grids to VB6.&nbsp;&nbsp;<br><br>Also can anyone enlighten me on the use of an unbound read, write and delete?<br><br>I know this is long but it is very necessary.&nbsp;&nbsp;If there is no solution I may be busy for the next few months rewriting bad code.<br><br>Thanks a million.<br><br>Marcel.<br><A HREF="mailto:beals@ocas.on.ca">beals@ocas.on.ca</A>
 
Why not just keep using the VB5 grid?&nbsp;&nbsp; <p>nick bulka<br><a href=mailto:nick@bulka.com>nick@bulka.com</a><br><a href= > </a><br>
 
I can not use VB5's Grid because their are UNBOUND's being used and when I port the System to VB6 the grids are removed from the form.<br>Can you tell me how to get around the UNBOUND part?
 
Here is some code to write to a listview control from a database :<br>Set dbWorkshop = OpenDatabase(DatabaseName)<br>lvJobs.ListItems.Clear<br>Set rsItems = dbWorkshop.OpenRecordset(&quot;Select * from&nbsp;&nbsp;JobItemsAvailable&quot;, dbOpenDynaset)<br><br>If Not rsItems.BOF Then rsItems.MoveFirst<br>If rsItems.EOF Then Exit Sub<br>Do While Not rsItems.EOF<br>&nbsp;&nbsp;&nbsp;&nbsp;If rsItems!itemcategory = cboJobItemsCat.Text Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set itmJobs = lvJobs.ListItems.Add(, ,rsItems!itemcode)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;itmJobs.SubItems(1) = rsItems!itemname<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;itmJobs.SubItems(2) = rsItems!labourunits<br>&nbsp;&nbsp;&nbsp;&nbsp;End If<br>&nbsp;&nbsp;&nbsp;&nbsp;rsItems.MoveNext<br>Loop<br><br><br>&nbsp; <p>PK Odendaal<br><a href=mailto: pko@mweb.co.za> pko@mweb.co.za</a><br><a href= > </a><br>
 
You can use the VB5 grid in a VB6 project.&nbsp;&nbsp;Porting the project does not require you to change.&nbsp;&nbsp;Controls are not removed from projects unless they no longer exist on the system.&nbsp;&nbsp;Apparently when you installed VB6 you uninstalled VB5 and all the controls that were installed with it.&nbsp;&nbsp; <p>nick bulka<br><a href=mailto:nick@bulka.com>nick@bulka.com</a><br><a href= > </a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top