I get this anytime I save the defaults for the metatags, basically anytime it would post into metatag_config. I can't find any reports for this error, not sure why.

Drupal 7.8. Metatag alpha3. MSSQL if that even matters.

PDOException: SQLSTATE[23000]: [Microsoft][SQL Server Native Client 10.0][SQL Server]Cannot insert the value NULL into column 'cid', table '---.dbo.metatag_config'; column does not allow nulls. INSERT fails. in drupal_write_record() (line 6868 of C:\inetpub\Web\---\includes\common.inc).

I can live with it for now, I just overrode the table's defaults and removed the Identity on that column, I have to delete the row to update it, but it's not a huge deal.

I just recently migrated from a testing instance, I tried it there, same thing, not sure why I'm the only one with the issue.

CommentFileSizeAuthor
#1 snap.png4.77 KBd.novikov
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

d.novikov’s picture

FileSize
4.77 KB

You have to check table design in SSMS. For tables with auto-increment there should be identity specification as showed on the attached snapshot.

marcoka’s picture

Status: Active » Closed (cannot reproduce)

can not reproduce, alpha6. please reopen if still happening with the latest version.

prashanth’s picture

Issue summary: View changes

I am using SQL server in my drupal site. The above error is happening to me .. Could you please let me know what should be the solution ???

PDOException: SQLSTATE[23000]: [Microsoft][SQL Server Native Client 11.0][SQL Server]Cannot insert the value NULL into column 'status', table 'DB_NAME.dbo.system'; column does not allow nulls. INSERT fails. in system_update_files_database() (line 2308 of E:\drupal\usda-art\modules\system\system.module)

DamienMcKenna’s picture

Title: PDOException: SQLSTATE[23000] » SQL Server compatibility
Version: 7.x-1.0-alpha3 » 7.x-1.0-beta9
Component: User interface » Code
Status: Closed (cannot reproduce) » Active
Issue tags: +SQL Server

I think this is related to a bug with dbtng not assigning default values when using SQL Server and might be a bug in the SQL Server module.

DamienMcKenna’s picture

Title: SQL Server compatibility » Primary key autocomplete fields not being set correctly?
Project: Metatag » Drupal driver for SQL Server and SQL Azure
Version: 7.x-1.0-beta9 » 7.x-1.x-dev
Issue tags: -SQL Server +metatag

Moving this to the SQL Server module - unless someone can show that there's a problem only in Metatag I suspect it's a bug in either the SQL Server driver or in Drupal core itself.

Beakerboy’s picture

Status: Active » Closed (won't fix)

This was a core bug, and fixed in Drupal 8 Don't know about D7.
The 7.x branch is unsupported. If this is still an issue, please file a report against the core entity system. Entities were including primary key fields in UPDATE statements despite the fact that 1) key fields cannot be changed in SQL Server, and 2) That Drupal does not offer users the ability to update the key value.