dbTalk Databases Forums  

AxtiveX Joins Without Form

comp.databases.btrieve comp.databases.btrieve


Discuss AxtiveX Joins Without Form in the comp.databases.btrieve forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
henry
 
Posts: n/a

Default AxtiveX Joins Without Form - 10-08-2004 , 07:10 PM






I hope someone can assist me w/this....
I am brand new to the ActiveX component got it from installing V8 and
am connecting to a V7 database.
First thing I did was to put a couple components on a form, set the
indexnumber and joins. Then I used a few textfields to display the
data. Everything worked great, as db1 advanced..so did db2 based on
the db1 join.

I printed all of the settings of each data control and used the same
settings in a form-less application.


Database definitions:
db1
ID
(Index 0 = ID)

db2
ID
Desc
(Index 0 = ID)

Code (from my often faulty memory)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Private db1 as VAccesslib.VAccess
Private db2 as VAccesslib.VAccess
Set db1 = new VAccesslib.VAccess
Set db2 = new VAccesslib.VAccess

With db1
.AutoOpen = False
End with

With db2
.AutoOpen = False
.IndexNumber = 0
.Join = "db1:ID"
...(some other settings not shown, tried most all combinations)
End with

With db1
.Open
.GetFirst
.Init
End With

With db2
.Open
.GetFirst
.Init
End With


Sub Command1_Click
db1.GetNext
Text1.Text = db1.FieldValue(1)
Text1.Text = db2.FieldValue(1)
Text1.Text = db2.FieldValue(2)
end Sub


I can't seem to get the second data control to advance when the first
control is moved in the same manner as in the app with a form.
I am creating a service so it is very important not to have to use a
form.
I gues the main confusion is when db1.GetNext is called, db2 just sits
on the first record and doesn't move. Do I have to call one of these
methods on db2 (init, open, refresh,join, indexnumber) ? I think that
I have tried everything, except posting here
Is it possible that I just need a form?

Thanks in advance,

Henry

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.