Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Another Newby Question
Message
General information
Forum:
ASP.NET
Category:
Other
Title:
Another Newby Question
Miscellaneous
Thread ID:
00950317
Message ID:
00950317
Views:
58
I have Kevin McNeish' book '.Net for Visual FoxPro Developers' and I typed in the
code on page 141 (pasted below) into a VB class.

When I compile, I get the following errors:
'ChangeDatabase' cannot implement 'ChangeDatabase' because there is no matching sub on interface 'IDbConnection'.
'ConnectionString' cannot implement 'ConnectionString'...
'ConnectionTimeOut' cannot implement 'ConnectionTimeOut'...
'State' cannot implement 'State'...

and 5 more like this:

'VfpConnection.VfpConnection' must implement 'Overridable Property ConnectionString() As String' for interface 'System.Data.IDbConnection'. Implementing property must have matching 'ReadOnly'/'WriteOnly' specifiers.


What am I doing wrong?
Public Class VfpConnection

    Implements System.Data.IDbConnection

    ' Properties
    Public Function ConnectionString() As String() _
        Implements IDbConnection.ConnectionString
        ' Place code here
        Return Nothing
    End Function

    Public Function ConnectionTimeOut() As String() _
        Implements IDbConnection.ConnectionTimeOut
        ' Place code here
        Return Nothing
    End Function

    Public Function Database() As String() _
        Implements IDbConnection.Database
        ' Place code here
        Return Nothing
    End Function

    Public Function State() As String() _
        Implements IDbConnection.State
        ' Place code here
        Return Nothing
    End Function

    Public Overloads Function BeginTransaction() As IDbTransaction _
        Implements IDbConnection.BeginTransaction
        ' Place code here
        Return Nothing
    End Function

    Public Overloads Function BeginTransaction(ByVal level As System.Data.IsolationLevel) _
        As IDbTransaction _
        Implements IDbConnection.BeginTransaction
        ' Place code here
        Return Nothing
    End Function

    Public Sub ChangeDatabase() _
        Implements IDbConnection.ChangeDatabase
        ' Place code here
    End Sub

    Public Sub Close() _
        Implements IDbConnection.Close
    End Sub

    Public Function CreateCommand() As IDbCommand _
        Implements IDbConnection.CreateCommand
        ' Place code here
        Return Nothing
    End Function

    Public Sub Open() _
        Implements IDbConnection.Open
        ' Place code here
    End Sub

End Class 'VfpConnection
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Next
Reply
Map
View

Click here to load this message in the networking platform