C# .NET - looping through tables - Asked By Seema Nandi on 12-May-06 03:44 AM

i want to get the different tables in database using c#.net 
i am using

ADOX.CatalogClass    odxc  =new ADOX.CatalogClass() ; 

odxc.ActiveConnection  =oMainConn1 ; 
foreach(ADOX.Table    tblName in odxc.Tables  )

i get the tables but what will be the sort order 
i want the first created table in database to come first 
and the last created table in database to come last
the order should be ascending table created

use this query - Asked By Venkat K on 12-May-06 03:53 AM

to get that and then iterate loop
[CODE]
select * from sysobjects where type='u' order by crdate
[/CODE]

for access database - Asked By Seema Nandi on 12-May-06 04:18 AM

for access database sysobjects is not there how can i implement this

Link - Asked By Shallu Gupta on 12-May-06 05:25 AM

see this link
http://www.mcse.ms/archive104-2004-5-666232.html
Asked By Shallu Gupta on 12-May-06 05:29 AM
Can Use this Query
SELECT Name
FROM MSysObjects
WHERE (Name Not Like "MSys*")
AND (Type In (1,4,6))
ORDER BY Name
re - Asked By Rupali Randhave Kolhe on 12-May-06 07:41 AM
http://www.dotnetspider.com/qa/Question30309.aspx
http://msdn.microsoft.com/msdnmag/issues/03/09/NET/
re - Asked By Rupali Randhave Kolhe on 12-May-06 07:42 AM
wrong post
sorry