To get thedata type of column, you can query the syscolumns table. First, get the id of the table you want from the sysobjects table, then query the syscolumns table using that id. For example:
SELECT * FROM SysColumns WHERE id = 21575115
The column you are looking for in the syscolumns table is the xtype column. However, this column doesn't list the data types as "varchar" or "int" but as a number. For example, 56 is an int, and 61 is a datetime data type. 60 is a money data type.
You could store the link as varchar and you should be good.
Scott
|