BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Access 2000 Administration Advice

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (ADO)
View previous topic :: View next topic  
Author Message
Doug Maurer
Guest





PostPosted: Mon Feb 09, 2004 9:12 pm    Post subject: Access 2000 Administration Advice Reply with quote



Delphi 7 Enterprise - ADO - Access 2000

I have created an application that uses and Access 2000 DB to handle all the
data storage and I am accessing it by using the ADO in Delphi. This has
been fine up until now, because I could always just grab the DB, open it in
Access and make any structure changes, modify data, etc. and make the
corresponding changes in Delphi, put everything back and move on.

This application is no longer going to be held in-house and I will have no
way to quickly "get a hold of the DB" to make changes. Moreover, there are
no users that would be available to handle the modifications that I would be
able to perform manually ... even with my direction via phone/email.

I have read through the previous posts in this group that pertain to Access
and it looks like there are units (ADOX, written utilities, etc.) that can
handle different capabilities for what I am looking for. Can anyone one in
particular perform all tasks from the following list?

What is the advice of this group on handling the following issues (at
run-time) ...
1. Compact/Repair
2. Backup/Restore
3. Add/Modify/Move/Delete tables
4. Add/Modify/Delete indexes in tables
5. Add/Modify/Move data between tables
6. How to handle a "temp-table" of data that is used for calculations where
data does not need to be permanent

I don't expect this group to guide my development, but these are questions
that I will have to address one way or another and any information that
could save me a headache or two is always welcome!!

Much Thanks!!

--

Doug Maurer - President
Business Technology Integration


Back to top
Jon Purvis
Guest





PostPosted: Mon Feb 09, 2004 10:13 pm    Post subject: Re: Access 2000 Administration Advice Reply with quote



Doug Maurer wrote:
Quote:
Delphi 7 Enterprise - ADO - Access 2000

I've just finished a very similar project, with the same problems. Here's what
I did:

Quote:
What is the advice of this group on handling the following issues (at
run-time) ...
1. Compact/Repair

function SQLConfigDataSource(hwndParent: HWND; fRequest: WORD; lpszDriver: LPCSTR;
lpszAttributes: LPCSTR): BOOL; stdcall; external'ODBCCP32.DLL';

procedure TDataModuleMN.DatabasePack;
var OldDB,NewDB: string;
const ODBC_ADD_DSN=1;
begin
with DataModuleMN do begin
DatabaseMN.Close;
OldDB:='"c:program filesmaster naturalistmaster naturalist.mdb"';
NewDB:='"c:program filesmaster naturalistmaster naturalist.mdb"';
if not SQLConfigDataSource(0,ODBC_ADD_DSN,'Microsoft Access Driver (*.mdb)',
PChar('REPAIR_DB='+OldDB+#0)) then
MessageDlg('Repair not successful.',mtInformation,[mbOK],0)
else MessageDlg('Repair successful.',mtInformation,[mbOK],0);
if not SQLConfigDataSource(0,ODBC_ADD_DSN,'Microsoft Access Driver (*.mdb)',
PChar('COMPACT_DB='+OldDB+' '+NewDB+' General'#0)) then
MessageDlg('Compression not successful.',mtInformation,[mbOK],0)
else MessageDlg('Compression successful.',mtInformation,[mbOK],0);
DatabaseMN.Open;
end;
end;

Quote:
2. Backup/Restore

I simply told the users to use windows explorer and make a copy of the file. I
forced to make a button that does this, I'd use ShellExecute();

Quote:
3. Add/Modify/Move/Delete tables
4. Add/Modify/Delete indexes in tables
5. Add/Modify/Move data between tables

When an update is sent out, I put code in the main form's show event. It checks
the database version field in the database. If an old value, it then runs a set
of SQL statements, and finishes off by updating the database field. I recommend
sticking all this in a transaction just to be safe. Alternately, I'd send out
an exe that only updates the database if you didn't want them to download a
large file.

Quote:
6. How to handle a "temp-table" of data that is used for calculations where
data does not need to be permanent

I use a TClientDataSet. I put it in the datamodule, but every time I need to
use it I redefine the fields it holds. More complex (multiuser) databases would
probably want to create the CDS on the fly, but this works for my simple programs.


Back to top
Mike Collier
Guest





PostPosted: Tue Feb 10, 2004 7:56 am    Post subject: Re: Access 2000 Administration Advice Reply with quote



Quote:
This application is no longer going to be held in-house and I will have no
way to quickly "get a hold of the DB" to make changes. Moreover, there
are
no users that would be available to handle the modifications that I would
be
able to perform manually ... even with my direction via phone/email.

If they have a web server running, or enable DCOM, you can remotly connect
to your Access database using REX and Adoanywhere browser.
www.adoanywhere.com It supports Transactions and BatchUpdates. You will
need to use SQL to modify your table structure. It has built in support for
browing,editing and moving data (tables).

--
Mike Collier
www.adoanywhere.com




Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (ADO) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.