Hi ,
How can i get the Data Definition Language ( scripts for CREATE TABLE ) from MS Access , using C Sharp.
Thanks in Advance
How to get DDL ( create table script ) from MS Access using C Sharp
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Mahesh ChandRank #1 · 393K pointsPosted Dec 30, 2010, 5:15 AM EST
Here is an article on getting database information from Aceess using ADO.NET.
Getting a Database Schema
You can also use Schema and GetSchema methods added later to the Connection objects. Here is an article:
http://msdn.microsoft.com/en-us/library/ms254934.aspx
Here are more articles on related topics:
http://msdn.microsoft.com/en-us/library/kcax58fh.aspx
Mahesh ChandRank #1 · 393K pointsPosted Dec 30, 2010, 5:17 AM EST
http://www.c-sharpcorner.com/UploadFile/scottlysle/DBstructure01122008011151AM/DBstructure.aspx
FEBY JOSEPH3 pointsPosted Dec 30, 2010, 8:25 PM EST
In fact I am looking some thing like "SHOW CREATE TABLE MY_TABLE_NAME in MySQL ". If you fire this command you will see the following ....
CREATE TABLE `feby_employee` (
`PK_ID` int(10) unsigned NOT NULL auto_increment,
`TagNo` varchar(500) default NULL,
`SSN` varchar(500) default NULL,
`NAME` varchar(500) default NULL,
PRIMARY KEY (`PK_ID`)
) ENGINE=InnoDB AUTO_INCREMENT=113 DEFAULT CHARSET=latin1
Is there anyway that i can achieve this in C#.
Thanks again.