Array Issue

Thread is closed for posting
4 posts, 0 answers
  1. Jnchaves
    Jnchaves avatar
    19 posts
    Member since:
    Dec 2008

    Posted 13 May 2010 Link to this post

    Hi,
      Please see the code below... It gives me a "Error 2 Value of type '1-dimensional array of Char' cannot be converted to 'Char'. C:\Development\VBNET\abcDB\MatrixExceptionOther.Telerik.OpenAccess.vb 55 34 abcDB". Can someone tell me how I can resolve this?

    Thanks...
    Amin



     

    Public Sub New(s As String)

     

     

    Dim i As Integer

     

     

    Dim p As Integer

     

    p = 0

    i = s.IndexOf(

    "-"c, p)

     

    _exceptionType = s.ToCharArray(p,1)[0]

    p = i + 1

    i = s.IndexOf(

    "-"c, p)

     

    _feeType = System.SByte.Parse(s.Substring(p, i-p))

    p = i + 1

    i = s.IndexOf(

    "-"c, p)

     

    _seqNoOne = System.SByte.Parse(s.Substring(p))

     

    End Sub

     


  2. Zoran
    Admin
    Zoran avatar
    534 posts

    Posted 14 May 2010 Link to this post

    Hi Amin Kanji,

     This appears to be a glitch on our side in scenarios where composite primary keys are used in vb and one of them is of type char. We will fix the bug for the next minor release. At the moment you could alter manually the generated code by replacing the following line:

    _exceptionType = s.ToCharArray(p,1)[0]

    with:
    _exceptionType = s.ToCharArray(p,1)(0)

    The only thing that has to be changed are the brackets for the indexer. They should be changed from square brackets "[ ]" to round ones "( )".

    All the best,
    Zoran
    the Telerik team

    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 Public Issue Tracking system and vote to affect the priority of the items.
  3. Jnchaves
    Jnchaves avatar
    19 posts
    Member since:
    Dec 2008

    Posted 14 May 2010 Link to this post

    Thanks for the quick response...
    I also found this..

    "OpenAccess error: No primary key fields specified. "


    is not commented....
    Shouldn't it be ' "OpenAccess error: No primary key fields specified. "
  4. Zoran
    Admin
    Zoran avatar
    534 posts

    Posted 17 May 2010 Link to this post

    Hi Amin Kanji,

     Are you getting this error on the class that we discussed in the previous posts? If you have it there then indeed this error should be commented out as there are three primary key fields specified for the class. If you have some classes that do not really have primary keys, then the error is valid one as it is not possible for OpenAccess to correctly manage and persist such classes.

    Kind regards,
    Zoran
    the Telerik team

    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 Public Issue Tracking system and vote to affect the priority of the items.
Back to Top