JetDupCursor is missing from WinRT version, ok?

Sep 6, 2012 at 4:14 PM

I am new to ManagedEsent.  I am trying to compile the StockSample code using Microsoft.Isam.Esent.Interop.Windows8. 

It seems to be missing JetDupCursor function.  Is this OK?  Can I move on with it?

This is a fantastic product.  Thank you very much

Kamran

Developer
Sep 6, 2012 at 5:37 PM

JetDupCursor() is still available in Windows8 for desktop applications, but it isn't available in the Immersive (Metro/WinRT) environment.

JetDupCursor() is really just a convenience function. You can simply use JetOpenTable() to open a new cursor. When we stripped the API set down for Immersive, it didn't seem to make sense to include it.

-martin

Sep 6, 2012 at 5:42 PM

Thank you for quick reply.  I am trying to use your product in WinRT (testing for MS-Surface product).  I am having a hard time getting the CreateDatabase method to work as well.  I get "File is being used by another process".  I am guessing that the Async method is not being used?

Any help would be appreciated.

Developer
Sep 6, 2012 at 6:12 PM

I'm not sure what you mean by using the Async method?

The database should only be Create'd once. Usually code should try to Attach the database (once per instance), and then only if it fails with FileNotFound, then use CreateDatabase. (But note that CreateDatabase() also returns a DBID).

Pseudo-code:

AttachDatabase();
if (failed with FileNotFound)
{
  CreateDatabase(out dbid);
}
else
{
  OpenDatabase(out dbid);
}

Does that make sense?

-martin

Sep 6, 2012 at 6:22 PM

I was confused between desktop and WinRT file path.   I was trying to place the new db using @"c:\temp\stocksample.edb" and it wasn't working.  I took out the specific path and allowed the system to place it in the local folder, and it worked.

Very hard to stop thinking in terms of desktop forms.

 

Mar 13, 2013 at 8:55 PM
bayganik


Here is a database compatible with WinRT:
https://www.kellermansoftware.com/p-49-ninja-winrt-database.aspx