Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 10 of 12 total
Thread D2009 and TableName property
Wed, Sep 9 2009 6:12 AMPermanent Link

Pat
Hi all,

Just started playing with D2009 and DBISAM v4.27 Build5.

With Delphi 6 I
- create folder, say, C:\test
- add table to this folder, say, C:\test\TestTable
- start new project
- add TDBISAMTable to a form
- save project to folder, C:\test, & close project
- open project again & select the TDBISAMTable
- from the TDBISAMTable property, select the TableName 'TestTable'
from the dropdown & all is OK

if I do this same procedure in D2009, there is no TableName
'TestTable' in the dropdown. It is as if the project cannot see the
table in the folder.

Should this procedure work in D2009?
Am I doing things correctly?
Should I use a Session or Database component? When should I use a
Session or Database component

Regards,
Pat
Wed, Sep 9 2009 6:42 AMPermanent Link

Pat
Other points to note:

- using XP with only D2009 installed (D6 is loaded on another
computer)

and

- in Windows Explorer, the file icon (for the .dat file) is usually
the dbsys icon (magnifying glass over the table). But on the D2009
system the dbsys icon isn't shown, its the generic icon. The .dat file
is asociated with dbsys because when I doulbe click the .dat file,
dbsys opens up the table

Pat
Wed, Sep 9 2009 3:07 PMPermanent Link

"Terry Swiers"
Pat,

> if I do this same procedure in D2009, there is no TableName
> 'TestTable' in the dropdown. It is as if the project cannot see the
> table in the folder.

Sounds like the current directory that the component is looking at is
somewhere other than the project folder.   Set the DatabaseName property of
the TDBISAMTable component to point to the folder with the data in it and
you should be good to go.

--

---------------------------------------
 Terry Swiers
 Millennium Software, Inc.
 http://www.1000years.com
 http://www.atrex.com

 Atrex Inventory Control/POS -
    Big business features without spending big business bucks!

Atrex Electronic Support Options:
 Atrex Knowledgebase: http://www.atrex.com/atrexkb.asp
 Email: mailto:support@atrex.com
 Newsgroup: news://news.1000years.com/millennium.atrex
 Fax: 1-925-829-1851
 Phone: 1-925-828-5892 (M-F, 9a-5p Pacific)
 ---------------------------------------

Wed, Sep 9 2009 5:36 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Pat,

<< if I do this same procedure in D2009, there is no TableName 'TestTable'
in the dropdown. It is as if the project cannot see the table in the folder.
>>

You're relying on the current working directory not changing, which in
Delphi 6 it didn't.  However, the newer IDEs constantly change the current
working directory, so you need to specify an explicit directory in the
TDBISAMTable.DatabaseName property in order to have the table appear in the
drop-down list.

--
Tim Young
Elevate Software
www.elevatesoft.com

Wed, Sep 9 2009 5:37 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Pat,

<< - in Windows Explorer, the file icon (for the .dat file) is usually the
dbsys icon (magnifying glass over the table). But on the D2009 system the
dbsys icon isn't shown, its the generic icon. The .dat file is asociated
with dbsys because when I doulbe click the .dat file, dbsys opens up the
table >>

Did you check the file associations to see if another application has
updated the association for .dat ?

--
Tim Young
Elevate Software
www.elevatesoft.com

Wed, Sep 9 2009 5:48 PMPermanent Link

Pat
Terry

>> if I do this same procedure in D2009, there is no TableName
>> 'TestTable' in the dropdown. It is as if the project cannot see the
>> table in the folder.
>
>Sounds like the current directory that the component is looking at is
>somewhere other than the project folder.   Set the DatabaseName property of
>the TDBISAMTable component to point to the folder with the data in it and
>you should be good to go.

that fixed it, thanks.

So when my application is created,
- I get the path of the .exe (in this case C:\test) in a string, and
- when forms are created, I have code to initialise the form's tables
DatabaseName to this .exe path?

This is pretty basic stuff but I want to get the foundations right
before I start building the skyscraper Smile

Pat
Wed, Sep 9 2009 5:51 PMPermanent Link

Pat
Tim,

><< if I do this same procedure in D2009, there is no TableName 'TestTable'
>in the dropdown. It is as if the project cannot see the table in the folder.
> >>
>
>You're relying on the current working directory not changing, which in
>Delphi 6 it didn't.  However, the newer IDEs constantly change the current
>working directory, so you need to specify an explicit directory in the
>TDBISAMTable.DatabaseName property in order to have the table appear in the
>drop-down list.

ah, didn't know that. Thanks Tim.
Wed, Sep 9 2009 8:04 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Pat,

<< So when my application is created,
- I get the path of the .exe (in this case C:\test) in a string, and
- when forms are created, I have code to initialise the form's tables
DatabaseName to this .exe path? >>

Well, the best way to deal with the database paths are to use a
TDBISAMDatabase component that has its Directory property set to the proper
path, and then hook up all TDBISAMTable and TDBISAMQuery components to this
TDBISAMDatabase component via their DatabaseName properties:

http://www.elevatesoft.com/manual?action=mantopic&id=dbisam4&product=d&version=7&category=1&topic=11

The way that you describe will work also, but using the TDBISAMDatabase
database method is the best way to deal with database paths, especially if
you may want to switch to using the DBISAM Database Server later.

--
Tim Young
Elevate Software
www.elevatesoft.com

Wed, Sep 9 2009 8:49 PMPermanent Link

Pat
Tim,

>Well, the best way to deal with the database paths are to use a
>TDBISAMDatabase component that has its Directory property set to the proper
>path, and then hook up all TDBISAMTable and TDBISAMQuery components to this
>TDBISAMDatabase component via their DatabaseName properties:
>
>http://www.elevatesoft.com/manual?action=mantopic&id=dbisam4&product=d&version=7&category=1&topic=11
>
>The way that you describe will work also, but using the TDBISAMDatabase
>database method is the best way to deal with database paths, especially if
>you may want to switch to using the DBISAM Database Server later.

Thanks Tim
Thu, Sep 10 2009 2:18 AMPermanent Link

"Ralf Bieber"
Pat wrote:

He Pat

I think it is also a good idea, if you use the latest version 4.28
build 6.

Ralf
Page 1 of 2Next Page »
Jump to Page:  1 2
Image