Posts Topics Forums Images
Search videos from message boards Videos Search messages from microblogs Microblogs Search messages from imdb.com Imdb Search messages from yuku.com Yuku Search messages from lefora.com (free forums) Lefora
My account: Login | Sign Up
Loading... 

Thread: displaying a table's column name

Started 1 month ago by redhat22
Hi!! tnx for the info that uve given me before with regards to databases.. i just want to know if there is a way to display a table's column name using vb6.. my database is in access 2003 format tnx!
Site: VBForums - Visual Basic and VB .NET Discussions and More!  VBForums - Visual Basic and VB .NET Discussions and More! - site profile
Forum: Database Development  Database Development - forum profile
Total authors: 3 authors
Total thread posts: 5 posts
Thread activity: no new posts during last week
Domain info for: vbforums.com

Other posts in this thread:

si_the_geek replied 1 month ago
There are several ways, but like with most things to do with database related code, which one(s) are valid depend on which connection technology you are using - such as ADO code/ADO control/DAO control/...

redhat22 replied 1 month ago
Im using Ado Code..

si_the_geek replied 1 month ago
One way is to open a recordset containing all columns, but no rows: Code: Dim strSQL as String Dim intField as Integer Dim objRS as ADODB.Recordset strSQL = "SELECT * FROM Table1 WHERE False" objRS.Open strSQL, objCN , adOpenForwardOnly, adLockReadOnly, adCmdText For intField = 0 To objRS.Fields.Count -1 MsgBox objRS.Fields(intField).Name Next intField objRS.Close ...

abhijit replied 1 month ago
Querying the data dictionary is helpful, if you're using Oracle. sql Code: SELECT column_name FROM dba_tab_columns WHERE table_name = 'TABLE'

 

Top contributing authors

Name
Posts
redhat22
2
user's latest post:
displaying a table's column...
Published (2009-11-13 09:05:00)
Im using Ado Code..
si_the_geek
2
user's latest post:
displaying a table's column...
Published (2009-11-13 09:13:00)
One way is to open a recordset containing all columns, but no rows: Code: Dim strSQL as String Dim intField as Integer Dim objRS as ADODB.Recordset strSQL = "SELECT * FROM Table1 WHERE False" objRS.Open strSQL, objCN , adOpenForwardOnly, adLockReadOnly, adCmdText For intField = 0 To objRS.Fields.Count -1 MsgBox objRS.Fields(intField).Name Next intField objRS.Close Set objRS = Nothing Another is to use OpenSchema. You can see...
abhijit
1
user's latest post:
displaying a table's column...
Published (2009-11-13 10:57:00)
Querying the data dictionary is helpful, if you're using Oracle. sql Code: SELECT column_name FROM dba_tab_columns WHERE table_name = 'TABLE'

Related threads on "VBForums - Visual Basic and VB .NET Discussions and More!":

Related threads on other sites:

Thread profile page for "displaying a table's column name" on http://www.vbforums.com. This report page is a snippet summary view from a single thread "displaying a table's column name", located on the Message Board at http://www.vbforums.com. This thread profile page shows the thread statistics for: Total Authors, Total Thread Posts, and Thread Activity