Kevin,
If you look at the docs for IDBConnection, you'll see that the ChangeDatabase() method requires a parameter and you have no paramter in your method. I don't know if it's a typo on your part, or in the book, but fix that (and also implement the property that you're erroring on, ConnectionString) and you should be good to go.
~~Bonnie
>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