#1  
Old 7th May 2005, 04:06 AM
Phil Hansen
 
Posts: n/a
Default RunTime / DesignTime

Am new to Nexus so sorry if this seems basic.
Using the free embedded server.
Have run into the runtime / design time problem of tables only being
open in one mode.
In the manual p37 you recommend using an external server while
developing.
How do I set up an external server if using the embedded server?

Thanks
  #2  
Old 7th May 2005, 05:47 AM
Brian Evans [NDX]
 
Posts: n/a
Default Re: RunTime / DesignTime

Phil Hansen wrote:
> Am new to Nexus so sorry if this seems basic.
> Using the free embedded server.
> Have run into the runtime / design time problem of tables only being
> open in one mode.
> In the manual p37 you recommend using an external server while
> developing.
> How do I set up an external server if using the embedded server?
>
> Thanks


What I do is leave runtime activation as false and design
activation as true with the component properties setup for
an external server. On application startup I assign
properties for the internal server and activate the
components. Mainly switching the session to use the
internal server engine instead of a remote one and
setting the database component's AliasPath.
nxDatabase1.AliasPath := ExtractFilePath(paramstr(0))+'DATA';

Brian Evans [NDX]
  #3  
Old 7th May 2005, 12:58 PM
Robert Meek
 
Posts: n/a
Default Re: RunTime / DesignTime

Phil Hansen wrote:
> Am new to Nexus so sorry if this seems basic.
> Using the free embedded server.
> Have run into the runtime / design time problem of tables only being
> open in one mode.
> In the manual p37 you recommend using an external server while
> developing.
> How do I set up an external server if using the embedded server?
>
> Thanks


Hi Phil,
I didn't want to get into the EM right away either so here's how I
set up my embedded server apps and it works just fine!
I set my tables for StoreDefs to True, enter a aliaspath in the
database properties, and then build my table fields and indexs from each of
their defs properties in the table components. In my datamodule, I give my
tables a tablename and write code that checks to see if the tables I created
exist. if they don't I create them at runtime. if they do I just make them
active. Then i run the app once to build the tables, after which you can
turn designtime Active properties on all nexus components to True and then
double-click each table component and click the Add all Fields item. This
adds the fields as properties right in the datamodule which can then be
accessed just like any other properties! when I am finished with the
application, I write code in my datamodule setting trhe aliaspath to
whatever I want it to be for the client, or to what you allow the client to
set and that way the first time they run it it creates the same tables for
them exactly where they are supposed to be. For embedded apps this is so
much quicker and easier than using the EM...at least I think so!
--
from Robert Meek dba "Tangentals Design"
Personal e-mail: rmeek1@comcast.net

-------------------------------------------------
visit us on the World Wide Web and pick up
your free copy of "The Keep" at:

http://www.TangentalsDesign.com

E-mail us at one of the following:

information@tangentalsdesign.com
feedback@tangentalsdesign.com
support@tangentalsdesign.com
-------------------------------------------------


  #4  
Old 8th May 2005, 03:36 AM
Phil Hansen
 
Posts: n/a
Default Re: RunTime / DesignTime

On Fri, 06 May 2005 14:47:14 -0400, "Brian Evans [NDX]"
<Brian.Evans@ndx.nexusdb.com> wrote:

>> snip
>> How do I set up an external server if using the embedded server?
>>

>
>What I do is leave runtime activation as false and design
>activation as true with the component properties setup for
>an external server. On application startup I assign
>properties for the internal server and activate the
>components. Mainly switching the session to use the
>internal server engine instead of a remote one and
>setting the database component's AliasPath.
>nxDatabase1.AliasPath := ExtractFilePath(paramstr(0))+'DATA';


Thanks for the info and got it working with a small change.

nxDatabase1.AliasPath := ExtractFilePath(paramstr(0))+'\DATA'

  #5  
Old 8th May 2005, 03:37 AM
Phil Hansen
 
Posts: n/a
Default Re: RunTime / DesignTime

On Fri, 6 May 2005 21:58:14 -0400, "Robert Meek" <rmeek1@comcast.net>
wrote:

> I didn't want to get into the EM right away either so here's how I
>set up my embedded server apps and it works just fine!
> I set my tables for StoreDefs to True, enter a aliaspath in the
>database properties, and then build my table fields and indexs from each of
>their defs properties in the table components. In my datamodule, I give my
>tables a tablename and write code that checks to see if the tables I created
>exist. if they don't I create them at runtime. if they do I just make them
>active. Then i run the app once to build the tables, after which you can
>turn designtime Active properties on all nexus components to True and then
>double-click each table component and click the Add all Fields item. This
>adds the fields as properties right in the datamodule which can then be
>accessed just like any other properties! when I am finished with the
>application, I write code in my datamodule setting trhe aliaspath to
>whatever I want it to be for the client, or to what you allow the client to
>set and that way the first time they run it it creates the same tables for
>them exactly where they are supposed to be. For embedded apps this is so
>much quicker and easier than using the EM...at least I think so!


Hi Robert,
Thanks for that. Got it working with Brian's comments, but this is
another way to try. Nice to have a backup way of doing things.


  #6  
Old 10th May 2005, 12:58 AM
Brian Evans [NDX]
 
Posts: n/a
Default Re: RunTime / DesignTime

Phil Hansen wrote:
> On Fri, 06 May 2005 14:47:14 -0400, "Brian Evans [NDX]"
> <Brian.Evans@ndx.nexusdb.com> wrote:
>
>
>>>snip
>>>How do I set up an external server if using the embedded server?
>>>

>>
>>What I do is leave runtime activation as false and design
>>activation as true with the component properties setup for
>>an external server. On application startup I assign
>>properties for the internal server and activate the
>>components. Mainly switching the session to use the
>>internal server engine instead of a remote one and
>>setting the database component's AliasPath.
>>nxDatabase1.AliasPath := ExtractFilePath(paramstr(0))+'DATA';

>
>
> Thanks for the info and got it working with a small change.
>
> nxDatabase1.AliasPath := ExtractFilePath(paramstr(0))+'\DATA'


Thats odd because ExtractFilePath is described as
"The resulting string is the leftmost characters of FileName, up to and
including the colon or backslash that separates the path information
from the name and extension. The resulting string is empty if
FileName contains no drive and directory parts."

Not sure what the problem is, thinking on it root directories
might be a problem. The path would end up relative to the
current directory on the drive/share and not an absolute
path. "CATA" is a relative path, "C:\DATA\" is
absolute.

sPath := ExtractFilePath(paramstr(0));
if RightSTR(sPath,1) <> '\' then
nxDatabase1.AliasPath := sPath + '\DATA\'
else
nxDatabase1.AliasPath := sPath + 'DATA\';

Brian Evans [NDX]
  #7  
Old 10th May 2005, 02:31 AM
John
 
Posts: n/a
Default Re: RunTime / DesignTime

Brian Evans [NDX] wrote:
> Phil Hansen wrote:
>
>> On Fri, 06 May 2005 14:47:14 -0400, "Brian Evans [NDX]"
>> <Brian.Evans@ndx.nexusdb.com> wrote:
>>
>>
>>>> snip
>>>> How do I set up an external server if using the embedded server?
>>>>
>>>
>>> What I do is leave runtime activation as false and design
>>> activation as true with the component properties setup for
>>> an external server. On application startup I assign
>>> properties for the internal server and activate the
>>> components. Mainly switching the session to use the
>>> internal server engine instead of a remote one and
>>> setting the database component's AliasPath.
>>> nxDatabase1.AliasPath := ExtractFilePath(paramstr(0))+'DATA';

>>
>>
>>
>> Thanks for the info and got it working with a small change.
>>
>> nxDatabase1.AliasPath := ExtractFilePath(paramstr(0))+'\DATA'

>
>
> Thats odd because ExtractFilePath is described as
> "The resulting string is the leftmost characters of FileName, up to and
> including the colon or backslash that separates the path information
> from the name and extension. The resulting string is empty if
> FileName contains no drive and directory parts."
>
> Not sure what the problem is, thinking on it root directories
> might be a problem. The path would end up relative to the
> current directory on the drive/share and not an absolute
> path. "CATA" is a relative path, "C:\DATA\" is
> absolute.
>
> sPath := ExtractFilePath(paramstr(0));
> if RightSTR(sPath,1) <> '\' then
> nxDatabase1.AliasPath := sPath + '\DATA\'
> else
> nxDatabase1.AliasPath := sPath + 'DATA\';
>
> Brian Evans [NDX]


You can use the IncludeTrailingPathDelimiter function to add a backslash
(or slash in Linux) to a path, if it isn't there.

John
  #8  
Old 11th May 2005, 03:31 PM
Phil Hansen
 
Posts: n/a
Default Re: RunTime / DesignTime

On Mon, 09 May 2005 09:58:40 -0400, "Brian Evans [NDX]"
<Brian.Evans@ndx.nexusdb.com> wrote:

>> Thanks for the info and got it working with a small change.
>>
>> nxDatabase1.AliasPath := ExtractFilePath(paramstr(0))+'\DATA'

>
>Thats odd because ExtractFilePath is described as
>"The resulting string is the leftmost characters of FileName, up to and
> including the colon or backslash that separates the path information
> from the name and extension. The resulting string is empty if
> FileName contains no drive and directory parts."
>
>Not sure what the problem is, thinking on it root directories
>might be a problem. The path would end up relative to the
>current directory on the drive/share and not an absolute
>path. "CATA" is a relative path, "C:\DATA\" is
>absolute.
>
>sPath := ExtractFilePath(paramstr(0));
>if RightSTR(sPath,1) <> '\' then
> nxDatabase1.AliasPath := sPath + '\DATA\'
>else
> nxDatabase1.AliasPath := sPath + 'DATA\';
>

Not sure about the logic but at least it works.
Thanks



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
Runtime update userinfo Hannes Danzl[NDD] nexusdb.public.support.portal 7 26th October 2010 07:45 AM
No or missing double type for calc fields in designtime ? Vojko Cendak nexusdb.public.support 4 17th February 2004 09:09 AM
Designtime problem with memory tables Stefan Paege nexusdb.public.support 3 6th February 2004 11:27 PM
NexusDb runtime package ? Roberto Nicchi nexusdb.public.support 9 31st July 2003 12:53 AM
EM b3 runtime error Ole Willy Tuv nexusdb.public.support 7 15th July 2003 06:47 PM


All times are GMT +11. The time now is 12:23 PM.


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