![]() | Products |
| Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
| Messages 1 to 3 of 3 total |
| Thu, Jul 2 2009 1:51 PM | Permanent Link |
Pete Hollyer | Tim
Like everyone else here I cannot get past the error 300 "Cannot lock the database ListBuilder fore exculsive access" So...my solution was to write a standalone program...one 1 class...with 1 connection..and still I get this error. The EDBManager is NOT open. What gives? I am 100% certain that there is ONLY 1 connection to the database.... I create it.. Create the Store Close Connection Open Connection Do the Restore and I get the error. It seems to me that it is seeing its OWN Connection...my only other thought is that there is some obscure parameter needed for this connection that is not mentioned anywhere //make my own connection EDBConnectionStringBuilder csb = new EDBConnectionStringBuilder(); csb.Name = "ListBuilderConnection"; csb.Description = "ListBuilder Connection Object"; csb.Type = "LOCAL"; csb.ConfigPath = WorkAppPath.AppPath + "\\Database"; csb.Database = "ListBuilder"; csb.UID = "Administrator"; csb.PWD = "EDBDefault"; EDBConnection DBConn = new EDBConnection(csb.ConnectionString); EDBCommand dbCommand = new EDBCommand(); DBConn.Open(); //Create Store SQL = "CREATE STORE \"Backups\""; SQL += " as LOCAL PATH '" + WorkAppPath.AppPath + "\\Backups\\' "; SQL += " DESCRIPTION 'ListBuilder Database Backup' "; dbCommand = new EDBCommand(SQL, DBConn); dbCommand.ExecuteNonQuery(); DBConn.Close(); DBConn.Open(); SQL = "RESTORE DATABASE ListBuilder "; SQL += " FROM \"Martha\" "; SQL += " IN STORE \"Backups\" "; dbCommand = new EDBCommand(SQL, DBConn); dbCommand.ExecuteNonQuery(); |
| Thu, Jul 2 2009 10:22 PM | Permanent Link |
Pete Hollyer | Okay Tim
Confirm my findings.... The reason I was getting the error 300 "Cannot lock the database ListBuilder fore exculsive access" was because the connection I was using to DO the RESTORE was on the Database I was trying to restore...My solution was to build a second Database called BackUpDB in the same folder...and when I restored my Listbuilder Database I use a connection to the BackupDB (which has no tables or anything)...this allows the SQL Command to execute on the ListBuilder Database because it now has NO connections open on him!! Pete |
| Fri, Jul 3 2009 1:50 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. | Pete,
<< Like everyone else here I cannot get past the error 300 "Cannot lock the database ListBuilder fore exculsive access" >> See my other post on this - it's your code and is not an issue with EDB. -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Monday, November 9, 2026 at 05:14 AM | Privacy Policy © 2026 Elevate Software, Inc. All Rights Reserved Questions or comments ? |

