|
Log in | ||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
Hello,
if let's say in version 1.0 of my database I create a table with 5 fields and after in next version I need to add more fields : I want to be able to detect programmatically tables created with previous version and then convert to tables with new version. How can i add this extra information like a version number to the table file: I dont want to add it for each record.. |
|
#2
|
|||
|
|||
|
On Thu, 11 Aug 2005 19:18:29 +0200, "Francesco Savastano"
<francosavastano@TakeThisOutFromAddress.virgilio.i t> wrote: >Hello, >if let's say in version 1.0 of my database I create a table with 5 fields >and after in next version I need to add more fields : I want to be able to >detect programmatically tables created with previous version and then >convert to tables with new version. How can i add this extra information >like a version number to the table file: I dont want to add it for each >record.. You can either add an additional stream into each table or you have to create a metadata database, which stores the datadictionary of each version plus the table mapping for restructuring from the previous version. Regards from Germany Franz-Leo Chomse [NexusDB Expert] franz.leo.chomse@ndx.nexusdb_x.com (please remove "_x" to reply) |
|
#3
|
|||
|
|||
|
Hello Francesco,
> if let's say in version 1.0 of my database I create a table with 5 fields > and after in next version I need to add more fields : I want to be able to > detect programmatically tables created with previous version and then > convert to tables with new version. How can i add this extra information > like a version number to the table file: I dont want to add it for each > record.. I personnaly use the utility nxSourceMaker for this(v1 only). In the file created with nxSourceMaker, I write the version of my tables. In one table I save the version number of my app. At startup I compare both, if they are not alike I call a restructure procedure from the nxSourceMaker file. Voilą. If you are using V2, look in the binaries, Bert posted his new utility that can replace nxSourceMaker. It is called NXDDCG. HTH Pierre |
|
#4
|
|||
|
|||
|
Pierre,
> If you are using V2, look in the binaries, Bert posted his new utility > that > can replace nxSourceMaker. It is called NXDDCG. Ha! nothing better that mouth-2-mouth advertising :-) Bert. "Pierre Demers" <pierredemers@NOSPAMsympatico.ca> wrote in message news:42fb9ce8@wic040d.... > Hello Francesco, > >> if let's say in version 1.0 of my database I create a table with 5 fields >> and after in next version I need to add more fields : I want to be able >> to >> detect programmatically tables created with previous version and then >> convert to tables with new version. How can i add this extra information >> like a version number to the table file: I dont want to add it for each >> record.. > > I personnaly use the utility nxSourceMaker for this(v1 only). In the file > created with nxSourceMaker, I write the version of my tables. In one table > I > save the version number of my app. At startup I compare both, if they are > not alike I call a restructure procedure from the nxSourceMaker file. > Voilą. > > If you are using V2, look in the binaries, Bert posted his new utility > that > can replace nxSourceMaker. It is called NXDDCG. > > HTH > Pierre > > |
|
#5
|
|||
|
|||
|
> Ha! nothing better that mouth-2-mouth advertising :-)
Yep, 75% of my sales... ![]() Pierre |
|
#6
|
|||
|
|||
|
>you have to > create a metadata database, which stores the datadictionary of each > version plus the table mapping for restructuring from the previous > version. Can you explain how to do it (I am db beginner) with a small example of code thanx? |
|
#7
|
|||
|
|||
|
Francesco Savastano wrote:
> > > you have to > > create a metadata database, which stores the datadictionary of each > > version plus the table mapping for restructuring from the previous > > version. > > Can you explain how to do it (I am db beginner) with a small example > of code thanx? You may get a table datadictionary by using: Dict := TnxDataDictionary.Create; TheDatabase.GetGetDataDictionary(TableName, Password, Dict); Now, put the dictionary in a BLOB (use Dict.AsStream property) and store it in a table: var BS: TnxBlobStream; begin BS := NXTable.CreateBlobStream(SomeField, bmReadWrite); try BS.CopyFrom(aStream, aStream.Size); finally BS.Free; end; where aStream is the stream containing the datadictionary (or any blob data). HTH, -- Jean-Francois Nifenecker, Bordeaux (EU) |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Build number, version number and releases in general | Brian Evans [NDX] | nexusdb.public.discussions | 11 | 13th April 2006 12:56 AM |
| Max Number of Columns in Table? | Dennis Landi | nexusdb.public.support | 1 | 7th June 2005 09:17 AM |
| Max number of fields in table? | Holger Franke | nexusdb.public.discussions | 14 | 29th August 2003 09:48 PM |
| ANN: Important information regarding file compatibility between beta versions | Thorsten Engler [NDA] | nexusdb.public.announcements | 0 | 16th July 2003 12:11 PM |
| ANN: Important information regarding file compatibility between beta versions | Thorsten Engler [NDA] | nexusdb.public.support | 0 | 16th July 2003 12:11 PM |