Please be aware that the SAP SQL Anywhere Forum will be shut down on August 29th, 2024 when all it's content will be migrated to the SAP Community.

If the database is empty (no tables created), the SchemaUpdate works fine, create all db objects and so. But if another call to SchemaUpdate is called, even if no Mappings or Objects were made, some action is made and finalizes with the error message "Column 'COLUMN_SIZE' does not belong to table" on schemaUpdate.Exceptions[0].

Stack trace: [HttpException (0x80004005): Column 'COLUMN_SIZE' does not belong to table .] System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +9859725 System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +118 System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +172 System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +336 System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +296

[HttpException (0x80004005): Column 'COLUMN_SIZE' does not belong to table .] System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9873912 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254

asked 14 Nov '12, 14:37

Tuschinski's gravatar image

accept rate: 0%

retagged 18 Nov '12, 11:57

Nica%20_SAP's gravatar image

Nica _SAP

I'm having the same problem with SchemaValidate.

(13 Nov '13, 05:12) henginy


When posting issues to the forum, please include a code sample so that we can reproduce your issue - this will assist us in understanding the precise issue you're seeing.

  1. Regarding hbm2ddl and updating schemas, it isn't generally recommended to run '' in production and Hibernate does not generally expect DDL updates after start-up. So, in terms of NHibernate features, this issue should really only affect development/testing. For schema validations, the '' only needs to be run once upon start-up and can thus just be a Configuration property - you should not have to call NHibernate.Tool.hbm2ddl.SchemaValidate directly:

    Configuration cfg = new Configuration(); cfg.Properties[""] = "validate";

  2. This issue is caused by CR #631249 - any ADO.NET provider prior to these builds (,, will not have the 'COLUMN_SIZE' issue. If you have an ADO.NET provider higher than these builds, the NHibernate 'Schema' files will have to be modified.

In \Dialect\Schema\SQLAnywhere11MetaData.cs (from Glenn Paulley's blog):

object objValue = rs["COLUMN_SIZE"];


object objValue = rs["CHARACTER_MAXIMUM_LENGTH"];

In \Dialect\Schema\SybaseAnywhereMetaData.cs (from the default Hibernate install):




I will investigate to see if we can open an NHibernate request to fix this issue in the official NHibernate package. Thank you for the bug report.

permanent link

answered 15 Nov '13, 15:09

Jeff%20Albion's gravatar image

Jeff Albion
accept rate: 25%

edited 15 Nov '13, 15:12

Your answer
toggle preview

Follow this question

By Email:

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



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 14 Nov '12, 14:37

question was seen: 7,942 times

last updated: 15 Nov '13, 15:12