Hi

Here i am giving some samples.same way you can implement other objects.

 Public Function GetCommandObject() As IDbCommand
     Dim s As String = ""
        Try
            s = CurPage.Session([Global].GC_sSESSION_SERVERTYPE).ToString()
        Catch ex As Exception
            s =
HttpContext.Current.Session([Global].GC_sSESSION_SERVERTYPE).ToString()
        End Try

        If CInt(s) = 3 Then 'Oracle Native
            Return New OracleCommand
        ElseIf CInt(s) = 1 Then 'Oracle OleDB
            Return New OleDbCommand
        ElseIf CInt(s) = 0 Or _
            CInt(s) = 2 Then 'SQL Server OleDB
            Return New OleDbCommand
        End If

    End Function
Thanks
Nakkeeran.k
On Tue, Nov 23, 2010 at 6:01 PM, jack me <[email protected]> wrote:

> Hi,
>
> I have to create a website, but according to some standards.
>
> - it should be compatible with any database with minimal changes, I googled
> and found that i need to implement abstract factory pattern. I have not used
> that.
>
> tell me Am I on right way ?
>
> any link Where I can found some information about this ..?
>
> regards,
>
>
>
>

Reply via email to