Click here to Skip to main content
15,880,891 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hello

I want to store and retrieve records from Access 97 and vb6.0
to store records, I wrote a the following Code:

Dim MyConn As ADODB.connection

       Set MyConn = New ADODB.connection
       Dim MyRecSet1 As New ADODB.Recordset

       MyConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + App.Path + "\db1.mdb"
       MyConn.Open
        MyConn.Execute ("INSERT INTO table1 VALUES('" + Text1.Text + "','" + Text2.Text + "','" + Text3.Text + "')")


   MsgBox "The record was added to database", vbInformation, "Succesfull adding"
   MyConn.Close


I have two Questions
1. How to retrive those records using parametarized Query in the same way,
and store it in text boxes.

2. Is there any other way to insert and retrieve, using
Microsoft.Jet.OLEDB.4.0;
Posted

1 solution

 
Share this answer
 
Comments
Valery Possoz 7-Jun-11 18:39pm    
Spot on!
Kim Togo 8-Jun-11 4:10am    
Thanks
[no name] 7-Jun-11 23:36pm    
retrieved data and store it in textbox, but how. Ididn't get te thing.
please help
Kim Togo 8-Jun-11 4:10am    
Look at the second link a gave. And find "Private Sub LoadCustomerListView()" - There is a example on how to read sql result and populate a listview control.
[no name] 8-Jun-11 9:35am    
thanks

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900