Share

Delphi Persistent Object

The forum address has changed, you have been automatically redirected. Please update any bookmarks to use the new URL.

Subscribe

DEPO0.31 with Sybase ASA8,problem?!!

You are viewing a single message from this topic. View all messages.

  1. 2005-04-26 03:24:42 UTC
    DEPO0.31 connects to sybase ASA8.0,In delphi, i define a variable sname,whose datatype is string. in ASA, i have a table,whose name is toil. as follows:

    tfybill = class(TInterfacedPersistent)
    private
    fsname: shortstring;
    ficode: integer;
    public
    property sname: shortstring read fsname write fsname ;
    property icode: integer read ficode write ficode ;
    end;

    ...

    with DBMapping1.Classes.Add do
    begin
    ClassObject := tfyBill;
    StorageName := 'toil';
    OnNewObjectId := fmfymain.NewId;
    with AttributesMapping.Add do
    begin
    AttributeName := 'icode';
    ColumnName := 'fcode';
    Size := 0;
    IndexType := idxNone;
    IsOID := True;
    end;
    with AttributesMapping.Add do
    begin
    AttributeName := 'sname';
    ColumnName := 'fname';
    Size := 10;
    IndexType := idxNone;
    IsOID := False;
    end;

    ...
    now there comes a problem,the DEPO can translate the attribute 'icode' to the table's column 'fcode' correctly,but it can't do with attribute 'sname'. when sname='love depo', the column of fname can only get 'l',that is : fname='l',it just translate the first character of 'love depo' to the column 'fname' of table .how to resolve this problem? help me...plz..
< Previous | 1 | Next >

Add a Reply

This forum does not allow anonymous participation.

Log in to add a reply. Not registered? Create an account to participate and receive email updates when replies are posted to this topic.