This is a migrated thread and some comments may be shown as answers.
Create Database Failed
11 Answers 53 Views
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
William Hanafin
Top achievements
Rank 1
William Hanafin asked on 19 Sep 2013, 11:13 AM
I am getting a FileNotFoundException when trying to create a new database. I've tried the demo app and created my own. Both the same.

This is the error msg: 
An exception of type 'System.IO.FileNotFoundException' occurred in Telerik.Storage.Extensions.DLL but was not handled in user code

This is my code which fails on the first line in the constructor.
private Context context;

public BikesDatabase()
{
    context = new Context("BikesDB");
    //table: Bikes {BikeID , BikeModelName, BikeType, BikeModelYear}; BikeID field is autoincremental and auto generated
  context.Insert(new Bikes() { BikeModelName = "BlueBird", BikeType = BikeTypes.Track, BikeModelYear = 2012 });
context.Insert(new Bikes() { BikeModelName = "SeaWind", BikeType = BikeTypes.Track, BikeModelYear = 2011 });
      context.Insert(new Bikes() { BikeModelName = "StormLightening", BikeType = BikeTypes.Track, BikeModelYear = 2010 });
      context.Insert(new Bikes() { BikeModelName = "Master", BikeType = BikeTypes.Road, BikeModelYear = 2012 });
context.Insert(new Bikes() { BikeModelName = "ProRace", BikeType = BikeTypes.Road, BikeModelYear = 2011 });
//persist data 
context.SaveChanges(); 
}

I have attached an image of the stacktrace.

In case you were wondering I have tried the overloaded constructor 
context = new Context("BikesDB", DatabaseLocation.Local);

Also I thought it might have to do with the Package capabilities in appx manifest but no avail.

I have also tried the following option:
string dbPath = Path.Combine(Windows.Storage.ApplicationData.Current.LocalFolder.Path, "BikesDB");
context = new Context(dbPath, DatabaseLocation.Fullpath);

This have been developed with the latest build "Telerik_Data_Storage_8.1_XAML_2013_2_814" on VS2013 Preview.

I only have a reference to the Telerik Component (not SQLite).

Is there a workaround?
Thanks

11 Answers, 1 is accepted

Sort by
0
Bulent
Telerik team
answered on 19 Sep 2013, 01:09 PM
Hi William,

Thank you for using Data Storage for Windows 8!

I am not able to reproduce this crash but it may be a dependency issue related to missing VC++ Run-time libraries. Could you please check if your machine has VC++ redistributables installed?
You can find them here: VC++ Redistributables 2013 Preview
If this is not your case, can you please share more information about your current project and development environment.

I am looking forward to your reply.

Regards,
Bulent
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
William Hanafin
Top achievements
Rank 1
answered on 19 Sep 2013, 01:33 PM
Hi Bulent

Thanks for your reply

I have referenced the following assemblies (Also see attached image):

Microsoft Visual C++ Runtime Package (12.0) - C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1\ExtensionSDKs\Microsoft.VCLibs\12.0\
RadControls for Windows 8 (2013.2.806)
Telerik Data Storage for Windows 8 XAML (2013.2.814)

I am also trying to run your demo project (DataStorageDemoXAML) included in the vsix download zip file (Telerik_Data_Storage_8.1_XAML_2013_2_814.zip) without success.The references is exactly the same.

I have also attached Visual Studio Version information.
Microsoft Visual Studio Ultimate 2013 Preview
Version 12.0.20623.01

My operating System is:
Windows 8.1 Pro Preview x64

Could it not have something to do with perissions on my local profile? My machine is connected to our company domain.

Thanks
 


0
William Hanafin
Top achievements
Rank 1
answered on 19 Sep 2013, 01:54 PM
I am also just looking at this post and specifically a post made by Tim Heuer.

http://stackoverflow.com/questions/17971532/migrating-windows-8-store-app-to-8-1-sqlite-issue/17976135#17976135

 I notice you have a Unicode char in your user name, and hence your local app data path. Can you use the overload SqliteConnection method that requires you to pass in Flags in this case? This might be a false positive from SQLite given the Unicode file path. – Tim Heuer Aug 2 at 15:35

I've noticed the same on my machine. I have the following two folders created in my local profile

user.domain (eg. jaco.pch)
user~domain (eg. jaco~pch)

Might be a sqlite bug?

Thanks
0
William Hanafin
Top achievements
Rank 1
answered on 19 Sep 2013, 02:57 PM
I've confirmed this is happening for other developers working on the same project as well.

The same exception for me. I even tried to manually add reference to C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1\ExtensionSDKs\Telerik.Storage.XAML\2013.2.814\References\CommonConfiguration\x86\Telerik.Storage.Extensions.dll  and also checked it’s in the output dir.  Probably some issue with versions / signing (?)


Thanks
0
William Hanafin
Top achievements
Rank 1
answered on 19 Sep 2013, 03:21 PM
Hi Bulent

I have reinstalled the VC++ redistributables as recommended by you without success. Same error!
Please see details of my machine configuration on a different post on this forum.

Regards
0
Bulent
Telerik team
answered on 20 Sep 2013, 01:27 PM
Hi William,

Thank you for your effort to clarify the circumstances related to the issue. 

I've prepared the same environment with Windows 8.1 Pro Preview and VS 2013 Public Preview and managed to launch the demo application without any problem.
The only difference is the version of your VS2013 Preview, because it is updated. I did my tests of the demo application  Data Storage for Windows 8.1. package. You can see the public preview version of VS2013 that I I've used previously to prepare the the attached image. 

Can you tell me how to update my Visual Studio to your version?
The symbols like '~' shouldn't cause any problem, I tested this too. 

I am looking forward to your reply.

Regards,
Bulent
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
William Hanafin
Top achievements
Rank 1
answered on 23 Sep 2013, 07:10 AM
Hi Bulent

Thanks so much for going through all the effort to try and resolve our issue. 

We have manually installed the Visual Studio 2013 Preview Update 2 from within Visual Studio. I have checked again and these are the different versions:
12.0.20617.1 Preview - Bulent
12.0.20623.01 Update - PCH

I have asked our developer again to try and get this to work without any success. The Telerik components we have installed are:
03197RadControls_for_Windows8_XAML_2013_2_806_Dev
Telerik_Data_Storage_8.1_XAML_2013_2_814

One thing to note though is that the latest version of SQLite is not working either. I had to uninstall the latest version and settle with an older version.
sqlite-winrt81-3080002  (NOT WORKING)
sqlite-winrt81-201307110309 (WORKING)

In the meantime I have reinstalled my personal machine with Windows 8.1 Enterprise and Visual Studio 2013 RC and can confirm that this is working fine here. Currently we cannot develop with your control because we can't get it to work on all machines.

Thanks

0
Bulent
Telerik team
answered on 23 Sep 2013, 01:44 PM
Hello William,

Thank you for the useful information in your reply.

I'm pretty sure that the problem is related to breaking changes in VC++ run-time libraries provided with the Update 2 of  VS2013 Preview. I'm not able to apply this update, since Visual Studio offers me only to update to the RC version that is not compatible with Windows 8.1 Preview too.

The version 2013_2_814 of Data Storage wraps the SQLite version 3.7.17. and the next release will wrap version 3.8.x . Having your comment related to the non working SQLite engine we will test carefully for any compatibility issues.

We are going to provide an updated version of the Data Storage for VS2013 RC and Windows 8.1. straight after they are publicly released. This should happen in a period of  3 to 4 weeks.

Thank you once again for your valuable feedback. Do not hesitate to write us back should you have any other suggestions and/or issues with our components.

Regards,

Bulent
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Will
Top achievements
Rank 1
answered on 01 Jul 2015, 01:07 AM

Bulent - I know this is an old post, but hopefully there was some resolution to this. 

I am currently having this same issue with the FileNotFoundException. I am using the 2015.1.420.45 release of Data Storage for Windows Universal (targeting Windows Phone 8.1).

 I am able to run this on the emulator and deploy to a device if I build in debug mode. If I build in Release, I get the same error on both the emulator and when deployed to device.

    at System.StubHelpers.StubHelpers.GetWinRTFactoryObject(IntPtr pCPCMD)
   at Telerik_Storage.Database.GetOrCreateDatabase(String databaseName, DatabaseLocation location)
   at Telerik.Storage.Extensions.Context..ctor(String databaseName, DatabaseLocation location)

 

0
Will
Top achievements
Rank 1
answered on 01 Jul 2015, 03:28 PM

In case anyone stumbles across this, I've found a more relevant thread and am working from it now.

http://www.telerik.com/forums/urgent-release-configuration-throws-exception-0x8007007e#3hzaJf3fb0y5BcXz7miMog

0
Rosy Topchiyska
Telerik team
answered on 06 Jul 2015, 06:55 AM
Hi All,

This is the correct the link from the previous post: http://www.telerik.com/forums/urgent-release-configuration-throws-exception-0x8007007e 

Regards,
Rosy Topchiyska
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Data Storage for XAML
Asked by
William Hanafin
Top achievements
Rank 1
Answers by
Bulent
Telerik team
William Hanafin
Top achievements
Rank 1
Will
Top achievements
Rank 1
Rosy Topchiyska
Telerik team
Share this question
or