System.Data.SqlClient.SqlException: 未能为数据库 'OA' 中的对象 't_d_教案' 分配空间,因为文件组 'PRIMARY' 已满。 因为你sql server所在的磁盘空间不够了,数据库0A不能扩展空间了.和你的代码无关系.
check your database

解决方案 »

  1.   

    cgsun(其实我明白你的暗示!!)    我用的服务器是CDPOWER 500G硬盘。应该是没问题吧。
      

  2.   

    1.pls check the tempdb size,and set automatically grow .
    2.DBCC SHRINKDATABASE('db_name')
      GO
      BACKUP TRAN db_name WITH TRUNCATE_ONLY
      GO
    3.In Enterprise Manager right click on the database, choose properties, select the data files tab and see if the automatically grow file option is checked
    4.restart MSSQLSERVER service.
    5.recreate primary key.