what's up when i call the function below i get an error that says that oledb is not regstered on this machine

i am calling the function like this

Public Shared Function getAllTableNames() As String()
        Dim con As OleDb.OleDbConnection
        Dim com As New OleDbCommand

        Dim i As Integer
        Dim str() As String
        'Give your database path
        'ConnectionString = "provider=OleDb;server=;uid=;pwd=;database="
        con = New OleDb.OleDbConnection("provider=OleDb;server;uid=;pwd=;database=")
        com.Connection = con
        Dim dtable As DataTable

            dtable = con.GetOleDbSchemaTable(OleDb.OleDbSchemaGuid.Tables, New Object() {Nothing, Nothing, Nothing, "TABLE"})

            For i = 0 To dtable.Rows.Count - 1
                ReDim Preserve str(i)
                str(i) = dtable.Rows(i).Item(2).ToString
            Return str
        Catch ex As Exception
            Return Nothing
        End Try
    End Function

I have removed the server name and other sensitive infor but it looks a little like this:

con = New OleDb.OleDbConnection("provider=OleDb;server=sql...;uid=....;pwd=....;database=.....")
This question has already been answered. Start a new discussion instead.