Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread "Cloning" MS SQL Field Types
Fri, Sep 8 2006 5:04 PMPermanent Link

"Jerry Hayes"
I want to "clone" a MS-SQL structure; or at least create it's closest
equivalency in dbisam.

Is there a cross-reference available for field type assignments when adding
new records to my new table? (for the SQL.DataType)?

    DBISAM.FieldDefs.Add(SQL.FieldName,SQL.DataType,SQL.Size);

Thanks all,

Jerry

Fri, Sep 8 2006 5:39 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Jerry,

<< I want to "clone" a MS-SQL structure; or at least create it's closest
equivalency in dbisam.

Is there a cross-reference available for field type assignments when adding
new records to my new table? (for the SQL.DataType)? >>

Not that I'm aware of.  However, most of the basic types should all map fine
unless you're using something esoteric like a specific BLOB type that DBISAM
doesn't support.

--
Tim Young
Elevate Software
www.elevatesoft.com

Sat, Sep 9 2006 5:07 AMPermanent Link

Michael Baytalsky
Hi Jerry,

Try our Context Database Designer. You should be able to
reverse engineer MS SQL database (both physical or script) and
create SQL script for dbisam. After you reverse engineer the
original database, go to schema properties and select Target
Database DBISAM. Then it will should you conversion errors if any.
You can download fully functional trial here:
http://www.contextsoft.com/products/dbdesign


Regards,
Michael

Jerry Hayes wrote:
> I want to "clone" a MS-SQL structure; or at least create it's closest
> equivalency in dbisam.
>
> Is there a cross-reference available for field type assignments when adding
> new records to my new table? (for the SQL.DataType)?
>
>      DBISAM.FieldDefs.Add(SQL.FieldName,SQL.DataType,SQL.Size);
>
> Thanks all,
>
> Jerry
>
>
Sun, Sep 10 2006 5:08 PMPermanent Link

Jeff Cook
"Jerry Hayes" <jhayes@nospam-connexability-dot-com> wrote on Fri, 8 Sep 2006 17:00:16 -0400

>I want to "clone" a MS-SQL structure; or at least create it's closest
>equivalency in dbisam.
>
>Is there a cross-reference available for field type assignments when adding
>new records to my new table? (for the SQL.DataType)?
>
> DBISAM.FieldDefs.Add(SQL.FieldName,SQL.DataType,SQL.Size);
>
>Thanks all,
>
>Jerry
>
>
Jerry


I wrote some code to do what you are doing - you are welcome to it - I can email the project to you  if you'd like to use/improve it.

The project comments are posted below:-

Cheers

Jeff
=========================================================================================

{

Program:    ConvertSQL

 This program was developed by Jeff Cook of Aspect Systems Ltd. in New Zealand.

 Purpose:    Conversion of MS SQL Server tables to DBISAM tables.

 The program was developed for a particular use, that of converting the files
 of a competitors system into DBISAM tables.  This was the first stage of a
 conversion to use our DBISAM based product.

 You are welcome to use the program as it stands or modify it to do what you
 want.

 /////////////////////////////////////////////////////////////////////////////
 If you suffer any loss from using this program, don't come to us for
 compensation. Compensation is limited to the amount you paid for the program,
 which was nothing!
 /////////////////////////////////////////////////////////////////////////////

 The program was developed in Delphi 6 and uses the ADO components.

 The program uses the registry to remember settings and I know many programmers
 don't like that.  It suited me to do it that way and it is a trivial task to
 remove registry references.

 The Connections strings for SQLServer and the DBISAM data directory are hard
 coded.

 NOTES:        1.  I had problem with varchar fields.  SQLServer seems to allow
                   very large sizes - I hit an example of varchar(5000).  When
                   you read them they look like an ordinary ftString field,
                   with a large size.  I've converted them to ftMemo if the size
                   is greater than 250.

               2.  ftAutoInc caaused me some stress as I found that I was
                   getting a different value in the converted file.  I've used
                   SuppressAutoIncValues to fix this.  This may or may not be
                   the appropriate behaviour for you.

               3.  Apart from the problem with big varchar's, I've just used
                   the same datatype in both SQLServer and DBISAM.  This has
                   worked OK for all the fields in the database that I was
                   working with.  It is untested for datatypes that were not
                   in the SQLServer database that I was converting.

               4.  I hit a problem with the IndexDefs which I have ignored with
                   a try ... except - if the indices are invalid, I simply
                   clear them and proceed with no indices.

 You can contact me by email: jeffc@aspect.co.nz

}
--
Jeff Cook
Aspect Systems Ltd
Phone: +64-9-424 5388
Skype: jeffcooknz
www.aspect.co.nz



Image