#1 Re: mORMot 1 » Using Database View's instead of Database Table's » 2017-03-22 16:03:22

me too, i have the same problem,i can not find the solution now.

#2 Re: mORMot 1 » hi ab, Can i Use Database View's instead of Table? » 2017-03-22 15:32:34

igors233 wrote:

think igors233, I have look the whole section: https://synopse.info/forum/viewtopic.php?id=3760.
but i can not solve my problem. the whole err log is :
Error SQLITE_ERROR(1)[SELECT ID,JiLuRQ,XinXiSL FROM VXinXiShuLiang] using 3.17.0 -no such table: VXinXiShuLiang,extended_errcode=1.

#3 mORMot 1 » hi ab, Can i Use Database View's instead of Table? » 2017-03-22 10:17:02

luscen
Replies: 2

My DB is MSSQL, the View Name is VXinXiShuLiang in the DB.
in server side:

    aProps := TSQLDBFireDACConnectionProperties.Create(DBServer, DBName, DBUser, DBPasswd);
    aProps.StoreVoidStringAsNull := False;

    CreateClassList();
    try
        aModel := TSQLModel.Create(SQLRecLassList, REST_ROOT);

        aModel.Props[TVXinXiShuLiang].NoCreateMissingTable := True;
        VirtualTableExternalMap(aModel, TVXinXiShuLiang, aProps, 'VXinXiShuLiang');

        VirtualTableExternalRegisterAll(aModel, aProps);
    except
        Exit;
    end;

in the client side:

    ent := TVXinXiShuLiang.CreateAndFillPrepare(aClient, whereStr);

the error log is :
    no such table
    extended_errcode=1

#5 mORMot 1 » today, the SynCommons.pas can not compile » 2016-09-01 06:55:59

luscen
Replies: 2

[dcc32 Error] SynCommons.pas(18386): E2441 Inline function declared in interface section must not use local symbol 'SmallUInt32UTF8'
the line is 18385.
help!

#8 mORMot 1 » hello,AB, Can i definition the SQLRecord Field (RawUTF8)by chinese? » 2016-08-31 14:29:20

luscen
Replies: 3

eg.
TSQLTouZiZH = class(TSQLRecord)
    private
        F账号: RawUTF8;             //账号
        F账户名: RawUTF8;           //账户名
        F开户日期: TDateTime;       //开户日期

    published
        property 账号: RawUTF8 index 20 read F账号 write F账号;
        property 账户名: RawUTF8 index 10 read F账户名 write F账户名;
        property 开户日期: TDateTime read F开户日期 write F开户日期;

    end;

by this way, the ORM's CreateAndFillPrepare function is not work. the code is :
    ent: TSQLTouZiZH;
    ent := TSQLTouZiZH.CreateAndFillPrepare(aClient,'*');
I step into the function:
    aTable := aClient.MultiFieldValues(RecordClass,aCustomFieldsCSV,aSQLWhere);
that the aTable is nil.
How I do for this ? think you!

Board footer

Powered by FluxBB