DB setup question

erne ernestogiannotta at tiscalinet.it
Tue Sep 9 09:29:30 CDT 2003


Hi James,

on 8-09-2003 23:38, James Kleinschmidt at jkleins at shentel.net wrote:

> I get a weird situation when I try to setup a database. I am sure it is
> something I am overlooking but can't find it.
> 
> I have three baseobjects (appointments, patients and users). I get a DB
> created without any errors with the vNewDB below. I can get no cursor
> from it though until I open it in the Valentina application and there I
> notice the three VobjectPtr in boAppointments do not point to anything.
> All I have to do is click on the "target" menu and select the proper
> link and the DB works great. I cannot seem to get it to work without
> going into the application. I get no errors and theVDB is good in the
> debugger. I just get nothing on any select statement. After I fix the
> errors in the VDB application I can see all the test data I put in so
> it seems I can load it but I can't get it out.
> 
> The vDatabase is VDB and is setup this way:
> 
> Sub VDB()
> theVDB=me '(this is a global property of type VDB)
> appointments=new boAppointments
> patients=new boPatients
> users=new boUsers
> 

key is here
you must add:
me.appointments.createdby.SetTarget me.Users

aha! wait... I see you don't need other pointers...
you could more easily solve it doing:

theVDB=me '(this is a global property of type VDB)
users=new boUsers
appointments=new boAppointments
patients=new boPatients



Cool Runnings,
Erne.
-- 
|  e r  |  Ernesto Giannotta
|  n e  |  Musical Box - a media store
                   




More information about the Valentina mailing list