Hi ,
How can i get the Data Definition Language ( scripts for CREATE TABLE ) from MS Access , using C Sharp.
Thanks in Advance
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
FEBY JOSEPHPosted Dec 31, 2010, 1:25 AM
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.
Mahesh ChandPosted Dec 30, 2010, 10:17 AM
http://www.c-sharpcorner.com/UploadFile/scottlysle/DBstructure01122008011151AM/DBstructure.aspx
Mahesh ChandPosted Dec 30, 2010, 10:15 AM
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