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

ListBox1.Items.Add(getAllTableNames)
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=")
        con.Open()
        com.Connection = con
        Dim dtable As DataTable
        Try

            dtable = con.GetOleDbSchemaTable(OleDb.OleDbSchemaGuid.Tables, New Object() {Nothing, Nothing, Nothing, "TABLE"})
            'Table_Catalog,table_Schema,table_name,table_type

            For i = 0 To dtable.Rows.Count - 1
                ReDim Preserve str(i)
                str(i) = dtable.Rows(i).Item(2).ToString
            Next
            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.