Hi,

We've got a problem with the current mapping of DO. We use MS Access to prototype reports. Now we would like to connect to the DO Database with Access but it seems the new types in SQL Server like 'decimal' and 'bigint' are not supported by ODBC and always translated to text.

Is there a way to tell DO to map these fields to a different type?

Regards Paul

asked Sep 02 '14 at 03:29

Paul%20Sinnema's gravatar image

Paul Sinnema
261878896

edited Sep 02 '14 at 03:30


One Answer:

Hello Paul.

Unfortunately, there isn't. Each driver for RDBMS in DO has it's own type mapping from .Net types to RDBMS types and reversed mapping. User can't define his own mapping.

answered Sep 02 '14 at 04:19

Alexey%20Kulakov's gravatar image

Alexey Kulakov
71715

Thanks for the reply Alexey. That is unfortunate.

(Sep 02 '14 at 04:30) Paul Sinnema Paul%20Sinnema's gravatar image

MS Access also has problems with the names of primary keys. In our case it becomes 'PK_FactuurEntity.RootEntity'. ODBC does not like the period ('.') in the name. Can we influence that?

(Sep 02 '14 at 04:34) Paul Sinnema Paul%20Sinnema's gravatar image

Template of PK name is very simple - FK_{name of type}. If type inherits other type than PK name contains names of all of ancestors, separated by "." There is one way. If you define index with same key columns as PK key columns than DO sets name of PK from this index. For example


  [HierarchyRoot]
  [Index("Id", Name="PK_Group1")]
  public class Group : Entity
  {
    [Field, Key]
    public int Id { get; private set; }
    [Field]
    public string Name { get; set; }
  }
In this case name of PK will be "PK_Group1", not "PK_Group".

(Sep 03 '14 at 05:55) Alexey Kulakov Alexey%20Kulakov's gravatar image
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
toggle preview

Subscription:

Once you sign in you will be able to subscribe for any updates here

Tags:

×23

Asked: Sep 02 '14 at 03:29

Seen: 1,775 times

Last updated: Sep 03 '14 at 05:56

powered by OSQA