This is a migrated thread and some comments may be shown as answers.

Array Issue

3 Answers 85 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jnchaves
Top achievements
Rank 1
Jnchaves asked on 13 May 2010, 11:15 PM
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

 


3 Answers, 1 is accepted

Sort by
0
Zoran
Telerik team
answered on 14 May 2010, 01:16 PM
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.
0
Jnchaves
Top achievements
Rank 1
answered on 14 May 2010, 07:11 PM
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. "
0
Zoran
Telerik team
answered on 17 May 2010, 08:34 AM
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.
Tags
General Discussions
Asked by
Jnchaves
Top achievements
Rank 1
Answers by
Zoran
Telerik team
Jnchaves
Top achievements
Rank 1
Share this question
or