我想知道
ADOQuery中的Q_course.Parameters[0].Asstring:=F_login.i_user.Text
TQuery中的Q_course.Params[0].Asstring:=F_login.i_user.Text有区别吗?
Q_course.Params[0].Asstring:=F_login.i_user.Text同ADOQuery中的什么等同呢?

解决方案 »

  1.   

    虽然两个的属性的类型不同一个是TParameters,一个是TParams,但他的作用是相同的,没有区别,主要的区别在于,一个是用于ADO,一个是用于DBE,看帮助可以知道。这是TQuery.Params帮助中最后的一句话:
    “Note: When working with an ADO-enabled dataset, use TParameters instead.”TADOQuery.Parameters是 TParametersUse the properties and methods of TParameters to:Access a specific parameter.
    Add or delete field parameters from the list.
    Get or set the values of individual parameters.
    Compare collections of parameters.
    Iterate through all parameters.
    Copy a collection of parameters to another parameter collection.TQuery.Params是  TParams Use TParams to manage a list of TParam objects for a BDE-enabled object that uses field parameters. For example, TStoredProc objects and TQuery objects use TParams objects to create and access their parameters. Use the properties and methods of TParams to:Access a specific field parameter.
    Add or delete field parameters from the list.
    Get or set the values of individual field parameters.
    Compare field parameters.
    Iterate through all field parameters.
    Copy a set of field parameters to another parameter list.Note: When working with an ADO-enabled dataset, use TParameters instead.