adoquery1.Close;
adoquery1.SQL.clear;
adoquery1.SQL.Add('create table new ( ''号码'' char (20)not null,''姓名'' char(10) null,''电子邮件'' char(20) null)');
adoquery1.execsql;

解决方案 »

  1.   

    Call ExecSQL to execute the SQL statement currently assigned to the SQL property. Use ExecSQL to execute queries that do not return a cursor to data (such as INSERT, UPDATE, DELETE, and CREATE TABLE).Note: For SELECT statements, call Open instead of ExecSQL or set the Active property to True.
      

  2.   

    当执行的查询有返回结果时,使用open
    当执行的查询没有返回结果的时候,使用execsql
      

  3.   

    lyc800105(小新)说得可以创建但是有一个问题,字段名左右中出现‘’例如:
    ‘姓名’,‘号码’和‘电子邮件’而不是 姓名,号码,电子邮件。
    还有能在创建前检测是否已经存在如果存在删除掉在建立。