Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: OO4O and vb5 dbcombo problem

Re: OO4O and vb5 dbcombo problem

From: <zschott_at_my-deja.com>
Date: Sat, 04 Dec 1999 03:25:58 GMT
Message-ID: <82a1k3$70c$1@nnrp1.deja.com>


You will want to use OO4O 2.3.4.2 or the new 8.1.5 client since there are known issues with the 2.2.x versions.

For more information and download locations goto...

http://www.egroups.com/group/oo4ole/

Good Luck!

Zane E

In article <809a1g$td3$1_at_nnrp1.deja.com>,   Pablo <pablo1999_at_my-deja.com> wrote:
> I have a problem with
> Microsoft Visual Basic 5.0's dbcombo
> and
> Oracle Objects for OLE Version 2.2 (Oracle 8.0.4)
>
> Following is a sample program.
> All seems to work fine, but when
> the user selects dbcombo1's first item,
> then dbcombo2 doesn't show what it should.
>
> Where's the problem? Can anybody help me?
> Thanks in advance.
>
> 'controls:
> 'oradc1 (oradc).......... cities
> 'oradc2 (oradc).......... states
>
> 'text1 (textbox)......... shows city.state_id
> 'dbcombo1 (dbcombo)...... shows state.code
> 'dbcombo2 (dbcombo)...... shows state.name
>
> 'design time settings:
> 'text1.DataSource ...... ORADC1
>
> 'dbcombo1.DataSource ... ORADC1
> 'dbcombo1.RowSource .... ORADC2
>
> 'dbcombo2.DataSource ... ORADC1
> 'dbcombo2.RowSource .... ORADC2
>
> Dim s As Object 'session
> Dim db As Object 'database
> Dim dy1 As Object 'cities dynaset
> Dim dy2 As Object 'states dynaset
> Dim Focused As String
>
> Const ORADB_ORAMODE = &H1&
> Const ORADB_NOWAIT = &H2&
>
> Private Sub Form_Load()
> Set s = CreateObject("OracleInProcServer.XOraSession")
> Set db = s.OpenDatabase("my_service", "system/manager", ORADB_ORAMODE
> Or ORADB_NOWAIT)
> Set dy1 = db.DBCreateDynaset("select * from city", 0&)
> Set dy2 = db.DBCreateDynaset("select * from state", 0&)
>
> s.begintrans
>
> Set ORADC1.Recordset = dy1
> Set ORADC2.Recordset = dy2
>
> Text1.DataField = "state_id" 'en dy1
>
> DBCombo1.DataField = "state_id" 'en dy1
> DBCombo2.DataField = "state_id" 'en dy1
>
> DBCombo1.ListField = "code" 'en dy2
> DBCombo2.ListField = "name" 'en dy2
>
> DBCombo1.BoundColumn = "state_id" 'en dy2
> DBCombo2.BoundColumn = "state_id" 'en dy2
> End Sub
>
> Private Sub Form_Unload(Cancel As Integer)
> s.rollback
> End Sub
>
> Private Sub DBCombo1_GotFocus()
> Focused = DBCombo1.Name
> End Sub
>
> Private Sub DBCombo2_GotFocus()
> Focused = DBCombo2.Name
> End Sub
>
> Private Sub DBCombo1_Click(Area As Integer)
> If Focused = DBCombo1.Name Then
> DBCombo2.BoundText = DBCombo1.BoundText
> Text1.Text = DBCombo1.BoundText
> End If
> End Sub
>
> Private Sub DBCombo2_Click(Area As Integer)
> If Focused = DBCombo2.Name Then
> DBCombo1.BoundText = DBCombo2.BoundText
> Text1.Text = DBCombo2.BoundText
> End If
> End Sub
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Fri Dec 03 1999 - 21:25:58 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US