Results 1 to 2 of 2

Thread: Can't store Dictionary(Of String, String), HashTable(Key,Value) objects.

  1. #1
    Junior Member
    Join Date
    Apr 2011
    Posts
    28

    Default Can't store Dictionary(Of String, String), HashTable(Key,Value) objects.

    I was trying to create an XTable for a Class which contains a Dictionary object, into the Database, but run-time exceptions came and the XTable was not created. Can't store a Class/create an XTable for a Class, which contains a Dictionary object, whether it is empty, or is filled. Please check that STSDB can store Dictionary objects, StringBuilder objects, HashTable objects, etc. Dictionary and HashTable objects are essentially required for storage, because they contain key/value pair system that is used in Applications sometimes, so definitely there must be a feature to store them directly with the Class instance, into an XTable in DB.

    
    Public Class LibertyPIMSearchableRoot
    
        Public Property myRowKey As Long = 0 ' This is the Key of the current Entry's Row in the specific XTable, in the specific Database.
        Public arrayFeatures As New ArrayList() ' This array contains the Feature Class instance objects, and every other children stuff.
        Public Property myTags As New Dictionary(Of String, String)
    
    End Class
    
    This run time exception came while I tried to create a new XTable for a Class which also contains a Dictionary object:

    {System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentException: Incorrect number of arguments supplied for call to method 'Void set_Item(System.String, System.String)'" & vbCrLf & " at System.Linq.Expressions.Expression.ValidateArgumen tCount(MethodBase method, ExpressionType nodeKind, Int32 count, ParameterInfo[] pis)" & vbCrLf & " at System.Linq.Expressions.Expression.ValidateArgumen tTypes(MethodBase method, ExpressionType nodeKind, ReadOnlyCollection`1& arguments)" & vbCrLf & " at System.Linq.Expressions.Expression.Call(Expression instance, MethodInfo method, IEnumerable`1 arguments)" & vbCrLf & " at System.Linq.Expressions.Expression.Call(Expression instance, MethodInfo method, Expression[] arguments)" & vbCrLf & " at STSdb.General.Reflection.PropertyReflector`2.MakeS et()" & vbCrLf & " at STSdb.General.Reflection.PropertyReflector`2..ctor (String propertyName)" & vbCrLf & " at STSdb.Data.DefaultColumnDefinition`2..ctor(String nestedProperty, Type persistType)" & vbCrLf & " --- End of inner exception stack trace ---" & vbCrLf & " at System.RuntimeMethodHandle._InvokeConstructor(IRun timeMethodInfo method, Object[] args, SignatureStruct& signature, RuntimeType declaringType)" & vbCrLf & " at System.RuntimeMethodHandle.InvokeConstructor(IRunt imeMethodInfo method, Object[] args, SignatureStruct signature, RuntimeType declaringType)" & vbCrLf & " at System.Reflection.RuntimeConstructorInfo.Invoke(Bi ndingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)" & vbCrLf & " at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)" & vbCrLf & " at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)" & vbCrLf & " at System.Activator.CreateInstance(Type type, Object[] args)" & vbCrLf & " at STSdb.Data.DefaultBinaryPersist`1.BuildDefinitions (Type dataType)" & vbCrLf & " at STSdb.Data.DefaultBinaryPersist`1..ctor(IColumnDef inition[] definitions)" & vbCrLf & " at STSdb.Data.FTable`2.LoadHeader(Byte activeHeader)" & vbCrLf & " at STSdb.Data.FTable`2..ctor(RawFile rawFile, UInt64 offset)" & vbCrLf & " at STSdb.Data.XTable`2..ctor(RawFile rawFile, UInt64 offset)" & vbCrLf & " at STSdb.Data.Scheme.CreateXTable[TKey,TRecord](Locator locator, RawFile rawFile)" & vbCrLf & " at STSdb.Data.Scheme.CreateXTable[TKey,TRecord](Locator locator)" & vbCrLf & " at LibertyPIMLib.LibertyPIMDBUsers.CreateDBUsersTable (LibertyPIMJournal& session, String strUserID, String strPwd) in L:\Project - LibertyPIM\LibertyPIM\LibertyPIM\sub-projects\LibertyPIMLib\LibertyPIMDBUsers.vb:line 58}
    Last edited by aroratushar; 11.05.2011 at 11:13.

  2. #2

    Default

    STSdb R3.5.9 supports the following (combination of) types:

    1.Primitive types:
    • Boolean
    • Char
    • SByte
    • Byte
    • Int16
    • UInt16
    • Int32
    • UInt32
    • Int64
    • UInt64
    • Single
    • Double
    • Decimal
    • DateTime
    • String
    • TimeSpan

    2.Other types:
    • Type
    • Byte[]
    • Image
    • MemoryStream
    • Guid
    • XElement

    3. Database specific types:
    • Locator
    • BlobStream

    4. Serializable objects;

    5. Structures with value-type fields.
    Last edited by k.dimova; 13.06.2013 at 18:09.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
2002 - 2014 STS Soft SC. All Rights reserved.
STSdb, Waterfall Tree and WTree are registered trademarks of STS Soft SC.