|
Home > Archive > SQL Anywhere ultralite > May 2005 > MBusiness + Ultralite : DatabaseSchema.applyFileWithParms
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
MBusiness + Ultralite : DatabaseSchema.applyFileWithParms
|
|
|
| MBusiness 5.5
Ultralite Pod 9.0.2 3044
I'd like to update my database using the Method applyFileWithParms.
I didn't find the parms I have to use (the .usm file location I suppose)
and how to instanciate the DatabaseSchema object :
dbschema=conn.DatabaseSchema ?
dbschema = CreateObject( "iAnywhere.UltraLite.DatabaseSchema" ); ?
Could you provide an example to :
- access DatabaseSchema object,
- update database using applyFileWithParms,
- and (if possible), how to catch exception if data loss occurs (columns
deleted or data type changed to an incompatible type).
Thanks for your help.
Pierre
| |
| Philippe Bertrand 2005-05-24, 1:23 pm |
| "PL" <nospam@p.l> wrote in message news:4292ed22$1@foru
ms-1-dub...
> MBusiness 5.5
> Ultralite Pod 9.0.2 3044
>
> I'd like to update my database using the Method applyFileWithParms.
> I didn't find the parms I have to use (the .usm file location I suppose)
> and how to instanciate the DatabaseSchema object :
>
> dbschema=conn.DatabaseSchema ?
> dbschema = CreateObject( "iAnywhere.UltraLite.DatabaseSchema" ); ?
>
> Could you provide an example to :
> - access DatabaseSchema object,
You can access the DatabaseSchema as a property of a connection.
ie dbSchema = conn.databaseSchema
> - update database using applyFileWithParms,[
/color]
Create a ConnectionParms instance and supply the location of the schema file
(all other parms may be ignored), then pass this instance to
applyFileWithParms.
[color=darkred]
> - and (if possible), how to catch exception if data loss occurs (columns
> deleted or data type changed to an incompatible type).
I'm not an expert on UltraLite for MBusiness Studio, however from the docs I
concluded the only error handling available is to check the connection's
sqlCode property after the call to applyFileWithParms.
--
- Philippe Bertrand
iAnywhere Solutions, Inc.
Please include in your subject line what UltraLite API are you using
(I.E. UltraLite.NET, Native UltraLite for Java, Embedded SQL, C++,
(pure) Static Java UltraLite, etc.). Please include version and BUILD
numbers in your post.
|
|
|
|
|