Ming_Lei Posted October 30, 2004 Posted October 30, 2004 How do I create a new database and some tables using C#? - Thanks. Quote
Administrators PlausiblyDamp Posted October 30, 2004 Administrators Posted October 30, 2004 What database are you using? Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Ming_Lei Posted October 30, 2004 Author Posted October 30, 2004 I am using Access database. Thanks!! Or is there a better type of database I should be using?? Quote
Administrators PlausiblyDamp Posted October 30, 2004 Administrators Posted October 30, 2004 http://www.xtremedotnettalk.com/showthread.php?t=86228&highlight=create+access+database May be worth a look Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Ming_Lei Posted October 31, 2004 Author Posted October 31, 2004 I've read and now can create tables. Thanks!! But here I got error when I try the following code to create database: ========================== OleDbConnection conn1 = new OleDbConnection(); conn1.Open(); string cmdstr = "create database MyDatabase"; OleDbCommand cmd = new OleDbCommand(cmdstr, conn1); cmd.ExecuteNonQuery(); ==================================== Obviously there are several problems in there. But where are they?? Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.