Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
OpenUtilities
  • Product Communities
OpenUtilities
OpenUtilities Wiki Error on backup - ExecuteSQL error...Syntax error in INSERT INTO Device_Partnumber
    • Sign In
    • +OpenUtilities
    • Access Service Request Manager
    • +Bentley sisHYD Multi Utility
    • Design Features - promis.e Functionality - Promis.e Standard
    • +OpenUtilities sisNET - English
    • +OpenUtilities Substation
    • Promis.e Paths
    • -Promis.e Wiki
      • +CONNECT Edition - Promis.e
      • About Promis.e
      • +Administration Features - Promis.e
      • +APIs_VBA - Promis.e
      • +Automation Features - Promis.e
      • +Component Features - Promis.e
      • +Component Management - Promis.e
      • +CONNECT Services - Promis.e
      • +Data Manager - Promis.e
      • +Database Platform Support - Promis.e
      • +Display - Promis.e
      • +Drawing Management - Promis.e
      • +Engineering Design Considerations - Promis.e
      • Error - Object reference...General
      • +Find_Replace - Promis.e
      • Finding the Tutorial
      • +Installation_Configuration - Promis.e
      • +Interoperability - Promis.e
      • +Licensing - Promis.e
      • +Maintenance Features - Promis.e
      • +Migration - Promis.e
      • +OS Support - Promis.e
      • +Panel Layout - Promis.e
      • +Performance - Promis.e
      • +PowerPlatform Support - Promis.e
      • +Print_Publish Features - Promis.e
      • +ProjectWise Integration - Promis.e
      • Promis.e Help file
      • +Reports_Output Features - Promis.e
      • +Template Management - Promis.e
      • +Text Tools - Promis.e
      • Training FAQs
      • +Wire Numbering - Promis.e
      • +Wiring Features - Promis.e
      • -Project Management - Promis.e
        • -Backup and Restore Project - Project Management - Promis.e
          • Backup Project
          • Backup Your Data
          • Error - DB_Restore_BlkInfo on project restore
          • Error - Project was created in database version
          • Error - There are error during restore, rebuild this project to fix it
          • Error - Unable to restore project, project's database version is newer
          • Error on backup - ExecuteSQL error...Syntax error in INSERT INTO Device_Partnumber
          • Error on backup - ODBC connection
          • Error on Backup - The field is too small
          • Error on Backup - You still have page(s) active belong to the project
          • Error on Backup and Restore: System cannot find the file specified
          • Error on project restore - index outside bounds of array
          • Install SQL Server Management Studio
          • Moving Projects
          • Restore Project
          • Restore Sample Projects
          • Submittal Bill Of Materials (SBOM)
        • +BOM Explorer - Project Management - Promis.e
        • +Project Manager - Project Management - Promis.e
      • Promis.e Title
      • Working from home with Promise.e
    • Replace Family - Find_Replace - Promis.e
    • SQL Server Login

     
     Questions about this article, topic, or product? Click here. 

    Error on backup - ExecuteSQL error...Syntax error in INSERT INTO Device_Partnumber

      Product(s): Promis.e, Bentley Substation
      Version(s): through 08.11.12.137
      Environment: N\A
      Area: Project Management
      Subarea: Backup and Restore Project

    Error or Warning Message

    When attempting to backup a particular project, the following error messages occur or similar are displayed and the project is not backed up.

    Internal Error
    Error Message:  ExecuteSQL error, insert into Device_Partnumber
    (id,device_id,partnumber,quantity,mainpartnoflag,balloon,bomflag) values(123,,'MyPart Number',1,1,'','')
    Syntax error in INSERT INTO statement.
    TargetSite: Void BackupMSSQLProject(Int32, System.String, System.String)
    DeclaringType: ECT.ECAD.DAL.BackupData
    Attributes: private
    MemberType: Method

    Information
    System Exception: ExecuteSQL error, insert into Device_Partnumber
    (id,device_id,partnumber,quantity,mainpartnoflag,balloon,bomflag) values (123,,'MyPart Number',1,1,'','')
    Syntax error in INSERT INTO statement.  --> System.Data.OleDb.OleDbException:  Syntax error in INSERT INTO statement.
       at MDBProxy.ConnectionManager.ExecuteSQL(Int32, nConnectionID, String strSQL)
       at MDBProxy.LocalTools.ExecuteSQL(Int32, nConnectionID, String strSQL)
       --- End of inner exception stack trace ---
       at MDBProxy.LocalTools.ExecuteSQL(Int32, nConnectionID, String strSQL)
       at ECT.ECAD.DAL.BackupData.BackupMSSQLProject(Int32 projectId, String connectString, String path)

    Explanation

    The "Syntax error in INSERT INTO statement" portion of the messages indicate the problem is occurring as the software is trying to insert data from the SQL project database into the database in the backup file. The problem could be that the data violates some constraint, causing the insertion to fail.

    In the example messages above, there is no value present to be inserted into the device_id column, which violates a constraint of the database. It also indicates that an instance of the part number exists in the project with no association to any device ID, which should not be the case.

    How to Avoid

    Option 1 - Remove unplaced devices from the project

    1. Perform the steps described in the Remove Unplaced Devices article.

    2. Back up the project.

    Option 2 - Copy the project

    1. Use Project Manager to copy the project.
    2. Back up the copy.

    Option 3 - Copy the pages

    1. Open Project Manager.
    2. Create a new project based on the same project options as the problem project.
    3. Select all the pages in the problem project.
    4. Right-click the selection and choose Copy.
    5. Specify the new project as the destination project and set remaining options. Generally in this situation, choose Keep Existing and Maintain / Complete where applicable.
    6. Click OK.
    7. Back up the new project.

      Original Author: Matt_P
    • Backup and Restore Project
    • promis.e
    • error message
    • Bentley Substation
    • en
    • Project Management
    • Share
    • History
    • More
    • Cancel
    • Matt_P Created by Communities MVP Matt_P
    • When: Mon, Nov 2 2015 10:36 AM
    • Satish Saptasagar Last revision by Bentley Colleague Satish Saptasagar
    • When: Fri, Apr 3 2020 6:47 AM
    • Revisions: 4
    • Comments: 0
    Recommended
    Related
    Communities
    • Home
    • Getting Started
    • Community Central
    • Products
    • Support
    • Secure File Upload
    • Feedback
    Support and Services
    • Home
    • Product Support
    • Downloads
    • Subscription Services Portal
    Training and Learning
    • Home
    • About Bentley Institute
    • My Learning History
    • Reference Books
    Social Media
    •    LinkedIn
    •    Facebook
    •    Twitter
    •    YouTube
    •    RSS Feed
    •    Email

    © 2023 Bentley Systems, Incorporated  |  Contact Us  |  Privacy |  Terms of Use  |  Cookies