Cannot execute "create table" sql command

Posted by pisiith on 04-Nov-2008 05:41

I'm using c# to execute this sql command

string CreateEmpTableSQL = "CREATE TABLE emp (empno INT PRIMARY KEY NOT NULL,"

+ "ename VARCHAR(10) NOT NULL,"

+ "job VARCHAR(9) NOT NULL,"

+ "mgr INT,"

+ "hiredate DATETIME NOT NULL,"

+ "sal NUMERIC(7,2) NOT NULL,"

+ "comm NUMERIC(7,2),"

+ "dept INT NOT NULL)";

command.ExecuteNonQuery();

I had follow the sample from Data Direct website.

there is an error about "Access rule violation"

Do i need to set the access rules in any place ?

I want to use create table by sql command.

All Replies

Posted by jtownsen on 04-Nov-2008 07:32

Please try replacing word DATETIME with the SQL equivalent: TIMESTAMP.

This thread is closed