G
Guest
Hi
I'm attempting to connect to my SQL Server DB get a dataset containing all
tables in the database, then for each table get the columns and access the
column definitions.
The reason I need to do this is to try and automate creation of skeleton
stored procedures for insert, updata and delete. Once I can retrieve the
column defs I can write a basic stored proc using the column names as
parameters, with appropriate data types, lengths etc.
I've created code by using the examples in this article
http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q309488#6 which shows
how to retrieve tables and columns but where I've come unstuck is attempting
to find how I can get the column SQL data type and length.
Any help would be greatly appreciated.
I'm attempting to connect to my SQL Server DB get a dataset containing all
tables in the database, then for each table get the columns and access the
column definitions.
The reason I need to do this is to try and automate creation of skeleton
stored procedures for insert, updata and delete. Once I can retrieve the
column defs I can write a basic stored proc using the column names as
parameters, with appropriate data types, lengths etc.
I've created code by using the examples in this article
http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q309488#6 which shows
how to retrieve tables and columns but where I've come unstuck is attempting
to find how I can get the column SQL data type and length.
Any help would be greatly appreciated.