Question : I need to get all the table names in a schema then retrieve field names , datatype ,precision etc

Then Load them to a table like TABLENAME|FIELDNAME|FIELDTYPE|PRECISON in a SQL Server table, I have heard of GetOleDbSchemaTable, but don't now where to start

Answer : I need to get all the table names in a schema then retrieve field names , datatype ,precision etc

1:
2:
3:
4:
5:
6:
7:
8:
9:
SELECT table_name=sysobjects.name,
column_name=syscolumns.name,
datatype=systypes.name,
length=syscolumns.length
FROM sysobjects 
JOIN syscolumns ON sysobjects.id = syscolumns.id
JOIN systypes ON syscolumns.xtype=systypes.xtype
WHERE sysobjects.xtype='U'
ORDER BY sysobjects.name,syscolumns.colid
Random Solutions  
 
programming4us programming4us