Ok I have built a blank Valentina database file using Director and I was then able to copy my simple 3 field database into it using the ODBC tool. But now when I use the VCursor Xtra to build a search it returns a negative number instead of the child object reference to the Xtra you normally get in Director. So I did the following gDB = new(xtra"VDataBase") createDatabase(gDB, the moviePath & "reg.vdb", 4) set ArtistRef = MakeNewBaseObject(gDB,"Reg") set fldRef = addField(gDB, ArtistRef, "RegNo", #kTypeString, 10 ) set fldRef = addField(gDB, ArtistRef, "LotNo", #kTypeString, 5) set fldRef = addField(gDB, ArtistRef, "Reserve", #kTypeString, 11)
Then I copied my CSV table into the reg.vdb using the ODBC tool and then ran this line:
gCursor = new( xtra "VCursor", GetRef(gDB), "select RegNo, * from Reg" )
And it failed, any ideas of where I have gone wrong?
I appreciate all your help on this :-)
Kevin Boyd
-----Original Message----- From: Gunnar Swan [mailto:GunnarSwan at PracticeToPass D.OT com] Sent: 27 September 2002 18:19 To: Subscribers of Valentina Subject: RE: Coverting a Excel doc into a Valentina doc
Specifying a database structure with code has been the way it's been done since databases were created by IBM. It's a rather recent invention to put a user interface to database schema creation.
In any case, it's easy to do.
If you do not specify which Valentina DB to import to, how will it know ?
9/27/02 10:02:40 AM, "MMCR" <kevin@mmcr.co.uk> wrote:
>OK seems an odd way of doing things, why can't the programme just >create a blank file and ask me to specify which fields I want like >nearly every other database system I have ever used!!! > > >-----Original Message----- >From: Ruslan Zasukhin [mailto:sunshine at public D.OT kherson.ua] >Sent: 27 September 2002 12:28 >To: Subscribers of Valentina >Subject: Re: Coverting a Excel doc into a Valentina doc > > >on 9/27/02 2:21 PM, MMCR at kevin@mmcr.co.uk wrote: > >> Very new to Valentina! I want to convert my Excel file into a >> valentina file. How do I do this? I tried downloading the ODBC >> converter but it made no sense that I had to open a vdb file as my >> destination file! > >Why no sense ? > >You must at first create empty Valentina db with tables and fields as >you need. > >Then only import from ODBC source > >-- >Best regards, >Ruslan Zasukhin [ I feel the need...the need for speed ] >------------------------------------------------------------- >e-mail: ruslan at paradigmasoft D.OT com >web: http://www.paradigmasoft.com > >To subscribe to the Valentina mail list >send a letter to valentina-on@lists.macserve.net >------------------------------------------------------------- > > ©2002 MMCR |