0 Replies Latest reply on Jul 23, 2002 11:27 AM by 310141

    A question about oo4o and MSDBGrid

    310141
      Hi,
      The Oracle8.1.7 has been installed on my machine,and there is an oo4o example in the directory of "E:\oracle\ora81\oo4o\VB\SAMPLES\NESTEDTABLE", Maybe I'll bother you to have a look at that VB exampleF
      There has already code as following:

      Private Sub Division_Reposition()

      Dim CourseList As OraCollection
      Set CourseList = Division.Recordset.Fields("Courses").Value
      Division.Recordset.Database.Parameters.Add "COURSELIST", CourseList, ORAPARM_INPUT, ORATYPE_TABLE, "COURSELIST"
      'create a read only dynaset based on the courselist.
      Set Courses.Recordset = Division.Recordset.Database.CreateDynaset("select * from THE(select CAST(:COURSELIST AS COURSELIST) from dual)", ORADYN_READONLY)
      Division.Recordset.Database.Parameters.Remove "COURSELIST"

      End Sub

      But I wonder very much how to write codes to Add,Delete and Update data in the table of "Courses", that is, add/delete/update data in the MSDBGrid and reflect them into the database.


      Private Sub cmdAdd_Click()
      '???How to write these codes to add record in the table "courses"?
      End Sub

      Private Sub cmdDelete_Click()
      '???How to write these codes to delete record in the table "courses"?
      End Sub

      Private Sub cmdUpdate_Click()
      '???How to write these codes to delete record in the table "courses"?
      End Sub