Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
ProjectWise
  • Product Communities
ProjectWise
ProjectWise PowerShell Extensions Forum "Export-DataTableToSQLiteDB : DataTable already belongs to another DataSet."
    • Sign In

    • State Verified Answer
    • Replies 4 replies
    • Subscribers 67 subscribers
    • Views 797 views
    • Users 0 members are here
    • pspw_pwdm
    • powershell
    • pspw_dab
    • DataTable

    "Export-DataTableToSQLiteDB : DataTable already belongs to another DataSet."

    Matt Blumenfeld
    Offline Matt Blumenfeld over 2 years ago

    I'm using PWPS_PWDM (which works pretty well) to gather info from Deliverables Management. With some assistance getting set up, I have been able to get a Submittals information dataset sorted into datatables, and from there into Excel. I'd like to just write the tables straight into a SQLite database, using the Export-DataTableToSQLiteDB cmdlet, but when I try to run the command I get an error message: "Export-DataTableToSQLiteDB : DataTable already belongs to another DataSet."

    I think I'm missing something obvious here. Can anyone tell me what's going on?

    • Sign in to reply
    • Cancel

    Top Replies

    • Zachary Kerr
      Offline Zachary Kerr Sun, Jun 20 2021 8:48 PM in reply to Matt Blumenfeld +1 verified
      Hey Matt, glad you got it working. A simple solution is to just copy the whole data table. Something like this: foreach ($table in $Dataset.Tables) { $table_copy = $table.Copy() Do-Whatever -InputTable…

    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