sql编程实例(编辑修改稿)内容摘要:

nder: TObject)。 begin := crHourglass。 try { First, disable the TTable object. } if then。 { Open the selected table } with ListBox1 do := [ItemIndex]。 with ListBox2 do := [ItemIndex]。 { Open the table and put a list of the field names in the Fields list box. }。 if then ()。 finally := crDefault。 end。 end。 procedure (Sender: TObject)。 var strAlias, { Alias name selected by the user } strTable, { Table name selected by the user } strField, { Field name selected by the user } strValue, { Field Value entered by the user } strWhere, { WHERE clause for the user39。 s query } strQuote, { Holds quotes is the query field is text } strQuery: string。 { String used to construct the query } frmQuery: TResultForm。 { The Results form } type { The following type is used with the Type dropdown list. The text values corresponding with each item is described in ments, along with the relevant SQL operators. } etSQLOps = (soNoCondition, { not field conditions: no WHERE clause } soEqual, { equals: = } soNotEqual, { is not equal to: } soLessThan, { is less than: } soLessEqual, { is less than or equal to: = } soMoreThan, { is greater than: } soMoreEqual, { is greater than or equal to: = } soStartsWith, { starts with: LIKE xx% } soNoStartsWith, { doesn39。 t start with: NOT LIKE xx% } soEndsWith, { ends with: LIKE %xx } soNoEndsWith, { doesn39。 t end with: NOT LIKE %xx } soContains, { contains: LIKE %xx% } soNoContains, { doesn39。 t contain: NOT LIKE %xx% } soBlank, { is blank: } soNotBlank, { is not blank: } soInside, { contains only: IN ( xx, yy, zz ) } soOutside)。 { doesn39。 t contain: NOT IN (xx, yy, zz) } begin { Initialize the variables needed to run the query } with ListBox1 do if ItemIndex = 1 then raise (39。 Can39。 39。 t Run Query: No Alias Selected39。 ) else strAlias := [ItemIndex]。 with ListBox2 do if ItemIndex = 1 then raise (39。 Can39。 39。 t Run Query: No Table Selected39。 ) else strTable := [ItemIndex]。 with ListBox3 do if ItemIndex = 1 then begin if Ord(soNocondition) then raise (39。 Can39。 39。 t Run Query: No Field Select。
阅读剩余 0%
本站所有文章资讯、展示的图片素材等内容均为注册用户上传(部分报媒/平媒内容转载自网络合作媒体),仅供学习参考。 用户通过本站上传、发布的任何内容的知识产权归属用户或原始著作权人所有。如有侵犯您的版权,请联系我们反馈本站将在三个工作日内改正。