This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

run time wrong

when i use vs2012 compile the solution named  DomainReporter  one of  the samples given by WaterObjects.NET,it works successfully, but when i click the button named report ,the bug occur, the wrong message is "  database format not recognized or read-only it could not be opened"  how can i resolve it?

"

  • the databasefile i use is a file extend name .mdb,i can use access open it
  • Gang,

    Are you using the Access Database (MDB) version of the Waterobjects.NET sample?

    Is the MDB file you're trying to open a valid WaterGEMS model? (does it open in WaterGEMS Standalone?)

    Have you tried placing the file in a location that you have read/write permissions to, and have you tried running your tool as admin?


    Regards,

    Jesse Dringoli
    Technical Support Manager, OpenFlows
    Bentley Communities Site Administrator
    Bentley Systems, Inc.

  • can you give me a right .mdb file by email, i use it to try again
  • Gang,

    If you're using a version of WaterGEMS that uses the .MDB extension for model files (V8i SS3 and below) then you can find example models in the "Samples" folder within the WaterGEMS installation folder.

    If you're using a version of WaterGEMS that uses the .SQLITE extension for model files (V8i SS4 and above), then you'll need the SQLITE version of the Waterobjects.NET SDK (currently in beta). A link can be provided if needed.

    If this does not help, please provide answers to the questions in my previous reply.


    Regards,

    Jesse Dringoli
    Technical Support Manager, OpenFlows
    Bentley Communities Site Administrator
    Bentley Systems, Inc.

  • In the "Samples" folder within the WaterGEMS installation folder,there isn't the .MDB extension model files. The code trigger the bug is below:
    GenericDataSource adatasoure =new GenericDataSource ();
    adatasoure .SetConnectionProperty(ConnectionProperty.FileName,DatabasePath);
    adatasoure .SetConnectionProperty(ConnectionProperty.ConnectionType,ConnectionType.Jet4pt0);
    adatasoure .SetConnectionProperty(ConnectionProperty.EnableSchemaUpdate,false);
    adatasoure .Open();//run here the bug occur