Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 8 of 8 total
Thread Stores path
Sat, Oct 24 2009 9:02 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Can you ensure that the Path is the Stores table has a trailing delimiter? Reason is that if I'm checking to see if there's already a store with that pas I currently need to test for both cases

Roy Lambert
Sat, Oct 24 2009 9:13 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

woops


store with that pas = store with that path Smiley

Roy Lambert
Sat, Oct 24 2009 9:17 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Roy,

<< Can you ensure that the Path is the Stores table has a trailing
delimiter? Reason is that if I'm checking to see if there's already a store
with that pas I currently need to test for both cases >>

Is there any reason why you can't just use IncludeTrailingBackslash() or
something similar ?

--
Tim Young
Elevate Software
www.elevatesoft.com

Sat, Oct 24 2009 9:48 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Tim


No, in fact what I've done is:

 Destination.Text := IncludeTrailingBackslash(Destination.Text);
....
....
  Qry.SQL.Text := 'SELECT Name FROM Configuration.Stores WHERE Path = ' + QuotedStr(Destination.Text) + ' OR Path = ' + QuotedStr(ExcludeTrailingBackslash(Destination.Text));

So its not difficult, but its one of those consistency things, and one less that you have to remember to check for different things, probably less of a problem where the sql is built dynamically rather than typed in and forgotten.

Roy Lambert
Sat, Oct 24 2009 3:17 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Roy,

<< No, in fact what I've done is:

Destination.Text := IncludeTrailingBackslash(Destination.Text);
...
...
Qry.SQL.Text := 'SELECT Name FROM Configuration.Stores WHERE Path = ' +
QuotedStr(Destination.Text) + ' OR Path = ' +
QuotedStr(ExcludeTrailingBackslash(Destination.Text));

So its not difficult, but its one of those consistency things, and one less
that you have to remember to check for different things, probably less of a
problem where the sql is built dynamically rather than typed in and
forgotten. >>

EDB just saves whatever path that you enter for the store, so if you want to
enforce a trailing backslash, then you are free to do so.

--
Tim Young
Elevate Software
www.elevatesoft.com

Sun, Oct 25 2009 5:11 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Tim


>EDB just saves whatever path that you enter for the store, so if you want to
>enforce a trailing backslash, then you are free to do so.

I think my brain may be functioning today (not sure yet). Its in EDBManager when you do a lookup for the path. Naturally when I create one in code I'll do the job properly Smiley

Roy Lambert
Tue, Oct 27 2009 7:15 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Roy,

<< I think my brain may be functioning today (not sure yet). Its in
EDBManager when you do a lookup for the path. >>

What is "its" ?  Are you talking about the "browse for folder" dialog ?

--
Tim Young
Elevate Software
www.elevatesoft.com

Tue, Oct 27 2009 7:42 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Tim

><< I think my brain may be functioning today (not sure yet). Its in
>EDBManager when you do a lookup for the path. >>
>
>What is "its" ? Are you talking about the "browse for folder" dialog ?

Obviously brain not functioning correctly - yes that's right.

Roy Lambert
Image