Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > DB-Aware

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 03-20-2001, 01:28 PM
AREF AREF is offline
Senior Member
 
Join Date: Feb 2001
Posts: 285
Default A DATABASE WHICH IS BASED ON BOTH SQL AND DBASE!

Hi

I tend to write Database applications which are based on MS SQL Server . sometimes we need to create a single-user version of the program (for instance we need to deliver limitted [Demo]) versions) . It take us much time to convert the program so that it works with DBASE files. Is it possible to write the program in a way that it can work with both SQL SERVER databses and Dbase/FOXPRO or Paradox tables?

Regards,
Aref
Reply With Quote
  #2  
Old 03-20-2001, 02:15 PM
MrBaseball34 MrBaseball34 is offline
Senior Member
 
Join Date: Jan 2001
Posts: 7,260
Default RE: A DATABASE WHICH IS BASED ON BOTH SQL AND DBASE!

There are several ways to do this. My first thought was to
use MSDE which is a basically slimmed down version of SQL7.
We did that with one of our products to put it on a demo
CD. Worked very well.

But you can also use compiler directives and constants to
perform the naming of fields and tables.

{$ifdef SQL}
const Table1Name='ENTY_Entity'
const Table1Field1Name='YouCanHaveLongFieldNamesInSQL';
{$else}
const Table1Name='ENTITY';
// Can only have 10 char fieldnames in dBase.
const Table1Field1Name='FieldName1';
{$endif}

Then Build your TTable or TQuery components at run-time
and use them according to your compiler directive. You
can set your compiler directive in the Conditional Defines
section on the Directories/Conditionals tab of the Project
Options dialog.
Reply With Quote
  #3  
Old 03-20-2001, 03:41 PM
Scottg Scottg is offline
Senior Member
 
Join Date: Feb 2001
Posts: 109
Default RE: RE: A DATABASE WHICH IS BASED ON BOTH SQL AND DBASE!

I concur with MrBaseball.. I come from a long line of Clipper/C development and I have found that MSDE is a wonderful product that gives you an excellent, robust database for 5 or fewer users. dBase and Paradox based data should go away...they just cannot provide the data security that is available with the newer database formats. The great thing about MSDE is that, like MrBaseball said, it is a slimmed down version of SQL server, so if you want to move to more users, there is little or no work involved to make the transition.

Scottg
Reply With Quote
Reply

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:37 PM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.