New Posts New Posts RSS Feed: Custom datasourcekey
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Forum LockedCustom datasourcekey

 Post Reply Post Reply
Author
lars-erik View Drop Down
Newbie
Newbie
Avatar

Joined: 15-Oct-2007
Location: Norway
Posts: 19
Post Options Post Options   Quote lars-erik Quote  Post ReplyReply Direct Link To This Post Topic: Custom datasourcekey
    Posted: 04-Mar-2009 at 1:36am
I have just upgraded to 3.6.5.4. Now my custom datasourcekeyresolver in Apphelper no longer compiles.
I get errors:

Error    39    Class 'MyDataSourceKeyResolver' must implement 'Function GetKey(pKeyName As String, pKeyExtension As String) As Util.IDataSourceKey' for interface 'IdeaBlade.Persistence.IDataSourceKeyResolver'.    C:\Documents and Settings\Administrator.TIMPEXAS\My Documents\Visual Studio Projects\larserik\skanning_trunk\src\ScanFrbClient_lok\AppHelper\MyDataSourceKeyResolver.vb    6    51    AppHelper

Error    40    'GetKey' cannot implement 'GetKey' because there is no matching function on interface 'IdeaBlade.Persistence.IDataSourceKeyResolver'.    C:\Documents and Settings\Administrator.TIMPEXAS\My Documents\Visual Studio Projects\larserik\skanning_trunk\src\ScanFrbClient_lok\AppHelper\MyDataSourceKeyResolver.vb    9    129    AppHelper



This is my code:
Imports IdeaBlade.Persistence
Imports IdeaBlade.Util
Imports IdeaBlade.Rdb

<Serializable()> _
Public Class MyDataSourceKeyResolver : Implements IDataSourceKeyResolver


    Public Function GetKey(ByVal pKeyName As String, ByVal pKeyExtension As String) As IdeaBlade.Util.IDataSourceKey Implements IdeaBlade.Persistence.IDataSourceKeyResolver.GetKey
        If (pKeyExtension.ToLower() <> "default") Then

            Dim connectionString As String = pKeyExtension
            Return New IdeaBlade.Rdb.RdbKey(pKeyName, connectionString)
        Else
            Return Nothing ' Didn't build key; DefaultDataSourceKeyResolver takes over
        End If

    End Function

End Class


 
Back to Top
kimj View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 1390
Post Options Post Options   Quote kimj Quote  Post ReplyReply Direct Link To This Post Posted: 04-Mar-2009 at 2:39pm
The IDataSourceKeyResolver and IDataSourceKey interfaces haven't changed in several years, so I'm not sure what's going on here.  Double check that references to the AppHelper project are correct. 
 
Also, since in another thread you indicate you've got a problem with a license violation, it's possible that your install was somehow corrupt, so you may want to uninstall and re-install to see if that fixes things.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down