Saturday, March 31, 2012

Table structure from database.

Hi,

Is it possible to retrieve in C# the table structure (primary key, type of data, ...) ?

Thanks a lot.

Sébfrom what database?
from sql server 2000 for example ...
From sql server sir :)
I am not sure that my suggests will solve your problems,
I think that you should write a Sql statement as follow:

ALTER DATABASE database
{ ADD FILE < filespec > [ ,...n ] [ TO FILEGROUP filegroup_name ]
| ADD LOG FILE < filespec > [ ,...n ]
| REMOVE FILE logical_file_name
| ADD FILEGROUP filegroup_name
| REMOVE FILEGROUP filegroup_name
| MODIFY FILE < filespec >
| MODIFY NAME = new_dbname
| MODIFY FILEGROUP filegroup_name {filegroup_property | NAME = new_filegroup_name }
| SET < optionspec > [ ,...n ] [ WITH < termination > ]
| COLLATE < collation_name >
}

SqlClient.ExcuteNonQuery(......);
SQL server 2000 why ?

Thanks

Séb
I'm interested in the structure of Access and SQL databases

0 comments:

Post a Comment