GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Interview Questions  >  Microsoft  >  Visual Basic
Go To First  |  Previous Question  |  Next Question 
 Visual Basic  |  Question 443 of 453    Print  
How to retrieve the records from database into Listview Control in VB ?

  
Total Answers and Comments: 2 Last Update: July 22, 2008     Asked by: Subashini.Ramasamy 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
November 22, 2007 01:52:04   #1  
Rakesh        

RE: How to retrieve the records from database into Lis...
By using <listbox_name>.additem(<recordset_with_fieldname>)

for ex. listbox's name is list1 and field name is item1, then
list1.additem(rs!item1)

where rs is a recordset

 
Is this answer useful? Yes | No
July 22, 2008 02:13:56   #2  
aashutosh_r Member Since: July 2008   Contribution: 1    

RE: How to retrieve the records from database into Listview Control in VB ?

Dim z

rs.MoveFirst
Do While Not rs.EOF 
        Set z = lv.ListItems.Add(, , rs!Field1) '

        z.SubItems(1) = rs!Field2
        z.SubItems(2) = rs!Field3
        z.SubItems(3) = rs!Field4
        z.SubItems(4) = rs!Field5
        z.SubItems(5) = rs!Field6
        rs.MoveNext
Loop


 
Is this answer useful? Yes | No

 Related Questions

Latest Answer : strech property ...

Answer posted by santhanam on 2005-05-19 16:01:20: yes Ans : Set the UseMnemonic property to True if you want to  define a character in the Caption property of the Label as  an access key. 
Latest Answer : Set the UseMnemonic property to True if you want to define a character in the Caption property of the Label as an access key.Also one thing is that u should place text box to set focus because lable canot get focus in run time.Remember to set tab index. ...

Latest Answer : To move to the next control preceding the label directly instead of focusing each and every control using the tab button ...

Latest Answer : Win32 API ...

Latest Answer : ComboBox,ListBox. ...

Latest Answer : I think the correct answer for this question is AutoSize. ...

Latest Answer : RecordSetType is the property to 0-Table,1-DynaSet,2-SnapShot are valid for record source property of data control.RegardsVeena ...

Latest Answer : AbsolutePosition ...

Latest Answer : One And Only Event ...

Latest Answer : The data-aware DataGrid control appears similar to the Grid control; however, you can set the DataGrid control's DataSource property to a Data control so that the control is automatically filled and its column headers set automatically from a Data control's ...


 Sponsored Links

 
Related Articles

Using XMLType for Handling XML Data in the Database

Using XMLType for Handling XML Data in the Database Being an object type XMLType can not only be used to store XML data in the database but also to operate on that data via its built in methods Regardless of the storage model you choose XMLType provides a set of XML specific methods to operate on XM
 

Using Oracle Database for Storing, Modifying, and Retrieving XML Data

Using Oracle Database for Storing Modifying and Retrieving XML Data With Oracle XML DB you have various XML storage and XML processing options allowing you to achieve the required level of performance and scalability One of the most interesting things about Oracle XML DB is that it allows you to per
 

Performing XSLT Transformations inside the Database

Performing XSLT Transformations inside the Database Now that you have the employees XSL stylesheet stored in the database and the xmlusr schema is permitted to access the hr employees table you can create a script that will instruct the database to build an HTML page based on the data stored in hr e
 

Moving All the XML Processing into the Database

Moving All the XML Processing into the Database In the preceding example the database server performs only a part of the XML processing while the rest is still performed by the PHP engine Specifically the database server generates an employees XML document based on the records from the hr employees
 

Performing XML Processing inside the Database

Performing XML Processing inside the Database When building XML enabled applications on top of Oracle there are many advantages to performing the XML processing inside the database when compared to performing it on the client The key advantages to perform XML processing inside the database are as fo
 

ODP.NET - Fundamental ODP.NET Classes to Retrieve Data

ODP NET Fundamental ODP NET Classes to Retrieve Data To retrieve data from an Oracle database using ODP NET we need to work with a few of the ODP NET classes At this point we will discuss the most fundamental classes available in ODP NET for retrieving data mosgoogle The following is the list of fun
 

High Level Data Link Control (HDLC)

High Level Data Link Control HDLC The High Level Data Link Control protocol was developed by the International Organization for Standardization ISO It is used for switched and non switched networks and is a bit oriented architecture The High Level Data Link Control has been accepted and used widel
 

Synchronous Data Link Control (SDLC)

Synchronous Data Link Control SDLC The SDLC or the Synchronous Data Link Control was first developed by IBM It is basically a linked layer protocol which can be used with systems network architecture or the SNA environment In this system all the functions in a network can be defined and slotted into
 

jQuery - Basic Alphabetical Sorting

Learning jQuery Basic Alphabetical Sorting Now let s perform a sort on the Title column of the table We ll need a class on the table header cell so that we can select it properly geshibot lang html&quot; Title Author s Publish Date Price geshibot mosgoogle To perform the actual s
 

ERP Operation and Control

ERP Operation and Control The selection of the most suitable management system is it a difficult decision to make but once it is decided the next step is the operation and maintenance of ERP It is necessary to know well all the capacities and abilities in order to exploit the system to its fullest e
 





About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape