#1  
Old 14th August 2003, 06:13 PM
Robert Meek
 
Posts: n/a
Default Another project try while I'm waiting...!

While awaiting word from you as to what the problem might be with the
example I sent you, I've been working on yet another test project...this
time an embedded server, single exe type. Here's what I've done:

I've set up a datamodule as per your quick start guide for single exe's with
the following:

ServerEngine
Session
Database

Then on my app's main form I've added a table and DataSource. Everything is
connected as they should be. Everything is set to Active := False; And
I've set the StoreDefs of the table component to True and have defined my
fields via it at designtime as well.
In my mainform's OnCreate I'm doing the following: ClientDM is the
datamodule, Globals.DataPath points to a directory on my system.

ClientDM.nxDataBase1.AliasPath := Globals.DataPath;
ClientDM.nxServerEngine1.Active := True;
ClientDM.nxSession1.Active := True;
ClientDM.nxDatabase1.Active := True;
nxTable1.TableName := 'TDClients';
If nxTable1.Exists = True then
begin
nxTable1.Active := True
end
Else
begin
nxTable1.CreateTable(); //not sure about any needed parameters here???
nxTable1.Active := True;
end;

Also on my mainform I have a number of DBEdits and a DBMemo components. one
for each of the fields I set up in the table component and connected to my
datasource. I also have, just for testing, a standard DBGrid which is also
connected to my datasource. So far so good right?
Upon trying to set up the coloumns of my grid, and/or set which DBedit gets
connected to which field I get a notification that the DataBase Alias or
Directory must be set. But since I do not know before hand where this will
be, I've set the app up to create a data directory right off the application
exe directory and set the AliasPath in code as you can see above. Now my
question(s) are:

Will what I've done create a new table as per my definitions if none is
found in the aliasPath, and load it up if one is found there, OR must I
still provide an alias Name other than as I've set the tablename above? And
in either case, when is it proper to attach my DBEdits to their respective
fields, and/or set the Grid Coloumns? Before or after I create or load the
actual table in code? And can I actually do it this way or must I set up
the field definitions in code as well as per most of the examples I've
found? It just seems logical that one should be able to set up the
definitions at designtime via the fieldDefs property of the table component
just like one does with a TClientDataSet, but I haven't found any references
to doing it this way in the documentation. And if I do it this way, can I
also set up my indexes via the indexDefs property of the Table component at
designtime OR must I do that in code?
Thanx in advance for your help!


  #2  
Old 14th August 2003, 08:04 PM
Eivind Bakkestuen [NDD]
 
Posts: n/a
Default Re: Another project try while I'm waiting...!

> Will what I've done create a new table as per my definitions if none is
> found in the aliasPath, and load it up if one is found there, OR must I
> still provide an alias Name other than as I've set the tablename above?

And

AliasName and AliasPath are mutually exclusive. Setting one clears the
other.

> in either case, when is it proper to attach my DBEdits to their respective
> fields, and/or set the Grid Coloumns? Before or after I create or load

the
> actual table in code? And can I actually do it this way or must I set up
> the field definitions in code as well as per most of the examples I've
> found? It just seems logical that one should be able to set up the
> definitions at designtime via the fieldDefs property of the table

component
> just like one does with a TClientDataSet, but I haven't found any

references
> to doing it this way in the documentation. And if I do it this way, can I
> also set up my indexes via the indexDefs property of the Table component

at
> designtime OR must I do that in code?
> Thanx in advance for your help!


In the programming environment, I would create the table first, then create
persistent fields for the table. Then you don't need to set up field
definitions in code to hook up grids etc. Using IndexDefs with CreateTable
should work fine.


--


Eivind Bakkestuen [NDD]
Please, no email unless requested.
Search Borland and third-party newsgroups here: www.tamaracka.com





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
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
A different Delphi for every project Hannes Danzl[NDD] nexusdb.public.discussions 5 16th January 2009 01:32 AM
OT Waiting for a specific time David Guest nexusdb.public.discussions 7 14th December 2007 03:13 PM
To those sitting on the fence waiting for the perfect release... Eivind Bakkestuen [NDD] nexusdb.public.support.sql 14 24th January 2007 10:42 PM
OT MS Project access John Turner nexusdb.public.discussions 4 13th December 2006 07:02 AM
We are developping our new project not with NexusDB Bernhard Roos nexusdb.public.discussions 15 22nd August 2006 10:19 AM


All times are GMT +11. The time now is 06:49 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.