View Single Post
  #4 (permalink)  
Old August 7th, 2004, 02:46 AM
happygv happygv is offline
Friend of Wrox
Join Date: Jun 2003
Location: Bangalore, KA, India.
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post

Hi Shoaib,

Any connection to database should have the following structure.

Connection object.
Open Connection (with help of connection string) Connection strings
Recordset Object (if results are to be processed)
Open recordset with help of SQL statement and Connection Object.
Check if recordset in not empty.
Then Loop through the Recordset
   Display/Process records.
   Move to Next Record.
End of LOOP
Close Recordset
Close connection
set Recordset and connection objects to nothing.

Connecting to a Database

Or google with this link - Connecting to database

Hope that helps.

- Vijay G
Strive for Perfection
Reply With Quote