Hi there,
Anyone know the correct syntax for writing up an SQL statement that'll return me a list of tables in a database?
I use ADO code to write SQL statements. I'd like to know what I need to write in the line where I equate the sql string.
Regards.
Anyone know the correct syntax for writing up an SQL statement that'll return me a list of tables in a database?
I use ADO code to write SQL statements. I'd like to know what I need to write in the line where I equate the sql string.
Code:
Private Sub listDBTables()
Dim sql As String, rst As New ADODB.Recordset
sql = "SELECT fname, lname, email FROM tCustomerInfo"
rst.Open sql, CurrentProject.Connection, adOpenKeyset
' do something with recordset object...
rst.Close
Set rst = Nothing
End Sub
Regards.