Problems compiling object

Remco_Reinking
Member Posts: 74
What I have done is the following:
A 3.70 SQL database that was running with the 4.03 client on SQL2005
We converted this to NAV2009R2 build 32982
Everything is running fine in the Classic client.
But of course we want to use the new feature as webservices and pages.
So we try to Alter database to "Enable for Dynamics NAV Server"
The client will then compile all objects, but there the problem occurs:
Microsoft Dynamics NAV Classic
The following SQL Server error or errors occurred when accessing the Object Metadata table:
515,"23000",[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot insert the value NULL into column 'Object Key', table 'NAVISION_TEST.dbo.Object Metadata'; column does not allow nulls. INSERT fails.
3621,"01000",[Microsoft][ODBC SQL Server Driver][SQL Server]The statement has been terminated.
SQL:
INSERT INTO "NAVISION_TEST"."dbo"."Object Metadata" WITH (REPEATABLEREAD) ("Object Type","Object ID","Metadata","Version List","User Code","Metadata Version") VALUES (1,3, NULL,'', NULL,60300)
OK
How is this funtion called? And how can I change this function so it will not insert NULL values in the [Object Metadata]
Are there some dll's that I should install on SQL-server?
I tried to change the field [enabledforserver] in table $ndo$dbproperty (just set in manually to 1, you never know)
but the effect is the same: no object can be changed, cause the compile function will try to insert data in then Object Metadata table with NULL values in the fields [Metadata] and [User Code]
A 3.70 SQL database that was running with the 4.03 client on SQL2005
We converted this to NAV2009R2 build 32982
Everything is running fine in the Classic client.
But of course we want to use the new feature as webservices and pages.
So we try to Alter database to "Enable for Dynamics NAV Server"
The client will then compile all objects, but there the problem occurs:
Microsoft Dynamics NAV Classic
The following SQL Server error or errors occurred when accessing the Object Metadata table:
515,"23000",[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot insert the value NULL into column 'Object Key', table 'NAVISION_TEST.dbo.Object Metadata'; column does not allow nulls. INSERT fails.
3621,"01000",[Microsoft][ODBC SQL Server Driver][SQL Server]The statement has been terminated.
SQL:
INSERT INTO "NAVISION_TEST"."dbo"."Object Metadata" WITH (REPEATABLEREAD) ("Object Type","Object ID","Metadata","Version List","User Code","Metadata Version") VALUES (1,3, NULL,'', NULL,60300)
OK
How is this funtion called? And how can I change this function so it will not insert NULL values in the [Object Metadata]
Are there some dll's that I should install on SQL-server?
I tried to change the field [enabledforserver] in table $ndo$dbproperty (just set in manually to 1, you never know)
but the effect is the same: no object can be changed, cause the compile function will try to insert data in then Object Metadata table with NULL values in the fields [Metadata] and [User Code]
0
Comments
-
with help from Lars Lohndorf from Microsoft I could solve the problem.
by adding the following contraint
ALTER TABLE [dbo].[Object Metadata] ADD CONSTRAINT [$ndodefault$1342497153$24] DEFAULT (newid()) FOR [Object Key]
it was done.
Also needed:
TRIGGER [dbo].[$ndo$objecttracking] ON [dbo].[Object Metadata] FOR DELETE, INSERT, UPDATE
ALTER TABLE [dbo].[Object] ADD DEFAULT ('') FOR [Locked By]
ALTER TABLE [dbo].[Object] ADD DEFAULT ((0)) FOR [Locked]
trigger definition can be found in a demo database installation.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions