query1.close;
      query1.SQL.Clear;
      query1.SQL.Add('create view wword(word) as (select word from word  where word=:myword %)');
      Query1.ParamByName('myword').AsString:=c;
      query1.ExecSQL;
      if not query1.Locate('wword.word',w,[loPartialkey]) then n:=-1;
      while(len>2)and(n=-1) do

解决方案 »

  1.   

    运行的时候就出来这个错误:project project1.exe raised exception class EDBEngineError with message'table already exists.[microsoft][odbc microsoft access driver]对象'wword(word)'已存在.'process stopped.use step or run to contiue.请帮帮忙
      

  2.   

    加上这两句:
    query1.SQL.Add('if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[wword]') and OBJECTPROPERTY(id, N'IsView') = 1)');
    query1.SQL.Add('drop view [dbo].[wword]');
    你的表名和字段名实在太混乱,如果是我,没几天就会忘了各字段都是什么意思了。而且这个视图太简单了吧,个人认为没有必要。
      

  3.   

    create or replace view wword(word) as ...