想做一个函数,功能如下:通过传递的参数生成一条SQL语句要尽量满足各种情况的查询返回结果集

解决方案 »

  1.   

    x -> function myselect(var x:string):ur sequeltype
         begin result:= {select * from x where ...} end;
    ......
    y -> function myselect(var y:string):ur sequeltype
         begin result:= {update ...} end;大概就是这样喽。
      

  2.   

    to insert2003(高级打字员)
     
    我想可能要用数组,例如字段名什么的
      

  3.   

    最好不要用字符数组
    用variant数组,这样能判断该字段值是什么类型的,就容易匹配sql字符串了
    都是字符,和你手写有什么区别呢?
      

  4.   

    用variant数组
    x -> function myselect(var x:string):ur sequeltype
         begin result:= {select * from x where ...} end;
    ......
    y -> function myselect(var y:string):ur sequeltype
         begin result:= {update ...} end;呵呵