VistaDB Support Center

Start a new topic

iOS - cannot create database

Hi - using 5.7 in a Xamarin IOS application, attempting to run the following command:


 

CREATE DATABASE 'iPediosDefault.ptped', PAGE SIZE 8, LCID 1033, CASE SENSITIVE FALSE;

 

I get an error: 

 

{VistaDB.Diagnostic.VistaDBException (0x00000071): Encoding 1252 data could not be found. Make sure you have correct international codeset assembly installed and enabled.
Error 113 (Provider v. 5.7.4.0): Cannot create database:  iPediosDefault.ptped
Error 113 (Provider v. 5.7.4.0): Cannot create database:  
 ---> VistaDB.Diagnostic.VistaDBException (0x00000071): Encoding 1252 data could not be found. Make sure you have correct international codeset assembly installed and enabled.
Error 113 (Provider v. 5.7.4.0): Cannot create database:  iPediosDefault.ptped
 ---> System.NotSupportedException: Encoding 1252 data could not be found. Make sure you have correct international codeset assembly installed and enabled.
  at System.Text.Encoding.GetEncoding (System.Int32 codepage) [0x0022f] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.1.0.15/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/text/encoding.cs:554 
  at VistaDB.Engine.Core.CharColumn..ctor (System.String val, System.Int32 maxLength, System.Int32 codePage, System.Globalization.CultureInfo culture, System.Boolean caseInsensitive) [0x00009] in C:\Agent\_work\11\s\src\Engine\VistaDB.Engine.Core.Row.cs:177 
  at VistaDB.Engine.Core.Database+DatabaseHeader..ctor (VistaDB.Engine.Core.DataStorage parentDatabase, VistaDB.Engine.Core.Header+HeaderId id, VistaDB.Engine.Core.Indexing.Index+Type type, System.Int32 pageSize, System.Globalization.CultureInfo culture) [0x000a5] in C:\Agent\_work\11\s\src\Engine\VistaDB.Engine.Core.Database.cs:2178 
  at VistaDB.Engine.Core.Database+DatabaseHeader.CreateInstance (VistaDB.Engine.Core.DataStorage parentDatabase, System.Int32 pageSize, System.Globalization.CultureInfo culture) [0x00000] in C:\Agent\_work\11\s\src\Engine\VistaDB.Engine.Core.Database.cs:2142 
  at VistaDB.Engine.Core.Database.DoCreateHeaderInstance (System.Int32 pageSize, System.Globalization.CultureInfo culture, VistaDB.Engine.Core.DataStorage clonedStorage) [0x0000c] in C:\Agent\_work\11\s\src\Engine\VistaDB.Engine.Core.Database.cs:6407 
  at VistaDB.Engine.Core.DataStorage.DoAfterConstruction (System.Int32 pageSize, System.Globalization.CultureInfo culture) [0x0002a] in C:\Agent\_work\11\s\src\Engine\VistaDB.Engine.Core.DataStorage.cs:3237 
  at VistaDB.Engine.Core.Database.CreateInstance (System.String fileName, VistaDB.Engine.Internal.DirectConnection parentConnection, VistaDB.Engine.Core.Cryptography.EncryptionKey cryptoKey, System.Int32 pageSize, System.Int32 LCID, System.Boolean caseSensitive, System.Boolean toPack) [0x00037] in C:\Agent\_work\11\s\src\Engine\VistaDB.Engine.Core.Database.cs:2824 
  at VistaDB.Engine.Core.DatabaseMetaTable.CreateInstance (System.String fileName, VistaDB.Engine.Internal.DirectConnection parentConnection, VistaDB.Engine.Core.Cryptography.EncryptionKey cryptoKey, System.Int32 pageSize, System.Int32 LCID, System.Boolean caseSensitive, System.Boolean toPack) [0x00021] in C:\Agent\_work\11\s\src\Engine\VistaDB.Engine.Core.Database.cs:9454 
  at VistaDB.Engine.Internal.DirectConnection.CreateDatabase (System.String fileName, System.Boolean stayExclusive, System.String cryptoKeyString, System.Int32 pageSize, System.Int32 LCID, System.Boolean caseSensitive, System.Boolean inMemory, System.Boolean isolated) [0x00014] in C:\Agent\_work\11\s\src\Engine\VistaDB.Engine.Internal.Connection.cs:2065 
  at VistaDB.Engine.Internal.DirectConnection.CreateDatabase (System.String fileName, System.Boolean stayExclusive, System.String cryptoKeyString, System.Int32 pageSize, System.Int32 LCID, System.Boolean caseSensitive, System.Boolean inMemory, System.Boolean isolated) [0x00046] in C:\Agent\_work\11\s\src\Engine\VistaDB.Engine.Internal.Connection.cs:2076 
  at VistaDB.Engine.Internal.DirectConnection.CreateDatabase (System.String fileName, System.Boolean stayExclusive, System.String cryptoKeyString, System.Int32 pageSize, System.Int32 LCID, System.Boolean caseSensitive) [0x00000] in C:\Agent\_work\11\s\src\Engine\VistaDB.Engine.Internal.Connection.cs:2128 
  at VistaDB.Engine.SQL.CreateDatabaseStatement.OnExecuteQuery () [0x0003b] in C:\Agent\_work\11\s\src
…

 

Goodness!  How do I get past this now?  

 


I'll check with our DB engine developers, I seem to recall this came up with us in testing and the solution was to add a reference in your iOS project to another assembly that contained standard ISO culture information but let me dig up the details.   


BTW: Fastest way to get answers to questions like this is to open a support ticket; we don't always prowl the forums looking for questions and I'd hate for something like this to just hang around out there!

Can you review this Stack Overflow article and see if this resolves the issue?  If so we'll be sure to add this to our documentation for iOS:


No data available for encoding 1252 - Xamarin

Login to post a comment