• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
只是向上走
采菊东篱下,悠然见南山。
博客园    首页    新随笔    联系   管理    订阅  订阅
UNKNOWN as the Datatype when generated(MS ACCESS) -----MyGeneration

EntitySpaces Version # 2007.0.0528.0 MyGeneration Version # 1.2.0.7

 Hello,

 

I am having  a problem generating my classes. This started yesterday when I added a column to my table. After I regenerate the class using GENERATED CLASSES MASTER(c#), all the datatype is set to UNKNOWN like:

     public virtual bool LoadByPrimaryKey(Unknown line2mapuid)
        {
            if(this.es.Connection.SqlAccessType == esSqlAccessType.DynamicSQL)
                return LoadByPrimaryKeyDynamic(line2mapuid);
            else
                return LoadByPrimaryKeyStoredProcedure(line2mapuid);
        }
   

or
 

public virtual bool LoadByPrimaryKey(esSqlAccessType sqlAccessType, Unknown line2mapuid)
        {
            if (sqlAccessType == esSqlAccessType.DynamicSQL)
                return LoadByPrimaryKeyDynamic(line2mapuid);
            else
                return LoadByPrimaryKeyStoredProcedure(line2mapuid);
        }

I tried to regenerate class from other table that I did not alter and same thing. I get the UNKNOWN as the datatype.

I encountered this before but due to a missing primary key on the table. On the generated class, all portions where it supposed to show the datatype, it shows v. I searched the forum and found related only to MySQL.  

I tried uninstalling Mygeneration and EntitySpaces to no avail. Any help would be appreciated.

 Thanks

 

-------------------------------

 

Open MyGeneration Default Settings.
Make sure Microsoft Access is selected in the Driver drop-down.
Make sure Test Connection is successful.
In the Language drop-down, select C# (not C# System Types).
In the DbTarget drop-down, select OleDb.
Make sure you are using the correct default files:
  C:\Program Files\MyGeneration\Settings\Languages.xml
  C:\Program Files\MyGeneration\Settings\DbTargets.xml
Click OK.
Click the MyMeta Browser icon (3rd from left).
Click the MyMeta Properties icon (5th from right).
In the MyMeta Browser, navigate down to one of your columns.
In the Properties pane, is Language Type filled in?
  (They should be int, string, decimal, etc.)

 

 

posted on 2009-07-07 16:45  jes.shaw  阅读(539)  评论(0)    收藏  举报
刷新页面返回顶部
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3