Question getting schema of the table

mathumathi

Member
Joined
Mar 25, 2009
Messages
9
Programming Experience
Beginner
hai,
i am doing a application in vb.net for that i need to get the schema of tables available in user space. i am using oracle 10g express edition. thanks.
 
You can create a connection, in your case an OracleConnection, and call its GetSchema method, which returns a DataTable. I suggest that you experiment with it by binding the result to a DataGridView to see what it returns.

If you pass no arguments it will return information about all collections that you can query. I've never tried it with Oracle so I'm not 100% sure what you'll get, but I'd imagine it will be similar to SQL Server. With SQL Server there is a Tables collection and a Columns collection. There's also a Restrictions collection, which provides information about what filters you can apply to reduce the amount of data returned, e.g. querying the Columns collection and specifying a table name to get only the columns for that table.
 
I have no idea what getdbschemaguid is. Did you call GetSchema on your connection? Was there a Tables collection or the like? Did the result have a column that indicated whether the tables where system or user tables?
 
hai,
i am doing a application in vb.net for that i need to get the schema of tables available in user space. i am using oracle 10g express edition. thanks.

If you cannot work out GetSchema, try select * from user_tab_cols instead
 
Back
Top