B
Burak
Hello,
I am trying to retrieve the list of tables in local oracle database,
"SKILLS".
When I use the following set of commands
strsql = "select TABLE_NAME from user_tables"
objconnection = New OleDbConnection(strConnection)
da = New OleDbDataAdapter(strsql, objconnection)
da.Fill(ds, "tables")
DataGrid1.DataSource = ds
I get exactly the tables in the SKILLS schema.
However, when I try the same thing using
Dim dt As System.Data.DataTable
objconnection.Open()
dt = objconnection.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, New
Object() {Nothing, Nothing, Nothing, "TABLE"})
DataGrid1.DataSource = dt
objconnection.Close()
I get *all* the tables in the root database, not just those in the
SKILLS schema.
It looks like the GetOleDbSchemaTable command disregards the User ID
= "skills" that i pass into it. But in oracle, user id is the same
thing as the database name, so it is basically ignoring the database
name and returning every database.
Is there a way to just return the tables specified by the connection
string, without having to explicitly type
dt = objconnection.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, New
Object() {Nothing, "SKILLS", Nothing, "TABLE"})
Thank you,
Burak
I am trying to retrieve the list of tables in local oracle database,
"SKILLS".
When I use the following set of commands
strsql = "select TABLE_NAME from user_tables"
objconnection = New OleDbConnection(strConnection)
da = New OleDbDataAdapter(strsql, objconnection)
da.Fill(ds, "tables")
DataGrid1.DataSource = ds
I get exactly the tables in the SKILLS schema.
However, when I try the same thing using
Dim dt As System.Data.DataTable
objconnection.Open()
dt = objconnection.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, New
Object() {Nothing, Nothing, Nothing, "TABLE"})
DataGrid1.DataSource = dt
objconnection.Close()
I get *all* the tables in the root database, not just those in the
SKILLS schema.
It looks like the GetOleDbSchemaTable command disregards the User ID
= "skills" that i pass into it. But in oracle, user id is the same
thing as the database name, so it is basically ignoring the database
name and returning every database.
Is there a way to just return the tables specified by the connection
string, without having to explicitly type
dt = objconnection.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, New
Object() {Nothing, "SKILLS", Nothing, "TABLE"})
Thank you,
Burak