database update script

Thread is closed for posting
3 posts, 0 answers
  1. Antti Stoor
    Antti Stoor avatar
    1 posts
    Member since:
    Nov 2009

    Posted 13 Nov 2009 Link to this post

    Hi, I just moved to Telerim ORM from Vanatec OpenAccess.
    I added some new persistent fields to my class and when I compile, I get the error


    <P>c:\program files\telerik\openaccess orm\bin\VSchema.exe   
    -assembly:C:\Projects\MesPal\LavaLib\bin\Release\LavaLib.dll -migrate</P> 
    <P>Data truncated for column 'db_status_time' at row 1</P> 
    <P>at Telerik.OpenAccess.RT.Adonet2Generic.Impl.StatementImp.execute(String   
    script, Connection con, SqlDriver sqlDriver, Boolean noShredder)</P> 
    <P>OpenAccess Error: Telerik.OpenAccess: Updating SQL schema failed.   
    Telerik.OpenAccess.OpenAccessException: SQL exception on 'ALTER TABLE `machine`   
    CHANGE COLUMN `db_status_time` `db_status_time` DATETIME NOT NULL' : Data   
    truncated for column 'db_status_time' at row 1</P> 
    <P>OpenAccess Error: Data truncated for column 'db_status_time' at row </P> 

    With earlier versions, OpenAccess made a database schema update script for me and there it first made the new field NULL then updated values and then altered the field as not null.

    How do I get the script file?
  2. Thomas
    Thomas avatar
    590 posts

    Posted 13 Nov 2009 Link to this post

    Hello Antti,

    the update scripts should be in your bin\Release or bin\Debug folder, depending on your configuration.

    Best wishes,
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. IT-Als
    IT-Als avatar
    381 posts
    Member since:
    Sep 2008

    Posted 16 Nov 2009 Link to this post

    Hello Antti,

    If you want to control the specifics of generating schemas (create or migrate), you can do direct calls to the vschema.exe on the command-line. See these docs. Take a look at the -migrate option and the -outputdir switch

    The same functionality is accessible through the API. Check out this doc entry for a sample.


Back to Top