⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readme.txt

📁 script language
💻 TXT
字号:
{**********************************************************************}
{    DWS2 ADO Library  - Version 1.01                                  }
{    Developed by Fabrizio Vita (http://web.tiscali.it/bizio)          }
{                                                                      }
{    "The contents of this file are subject to the Mozilla Public      }
{    License Version 1.1 (the "License"); you may not use this         }
{    file except in compliance with the License. You may obtain        }
{    a copy of the License at                                          }
{                                                                      }
{    http://www.mozilla.org/MPL/                                       }
{                                                                      }
{    Software distributed under the License is distributed on an       }
{    "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express       }
{    or implied. See the License for the specific language             }
{    governing rights and limitations under the License.               }
{                                                                      }
{    The Original Code is DWS2-IBO-Library released January 1, 2001    }
{    (http://www.dwscript.com) and translated to ADO on September 2002 }
{                                                                      }
{**********************************************************************}

The DWS2-ADO-Library brings you 1 component for database access in DWS2, 
Tdws2ADOlib, that introduces the classes TADOConnectionto and TADODataset;
they are similar to the original classes of Delphi VCL.
There are some extra properties (more will follow).



TADOConnetion   = class
    .Create(ConnectionString: String): String;
    .Open;
    .Close;
    .Execute(sSQL: string): TADODataset;
    .BeginTrans;
    .CommitTrans;
    .RollbackTrans;
    .ExecuteSQL;
    .GetDataset(sSQL: string): TADODataset;
    .Version: string;
    .State: integer;
    .DatasetCount: integer;
    .Free;
   properties
    .ConnectionString: String;
    .CommandTimeout: integer;


TDBField   = class
    .IsNull: Boolean;
    .DataType: Integer;
    .DataSize: integer;
    .FieldName: string;
   properties
    .Value: Variant;
    .AsString: String;
    .AsInteger: Integer;
    .AsFloat: Float;
    .AsDateTime: DateTime;


TADODataset   = class
    .Create;
    .Open;
    .Close;
    .First: boolean;
    .Next: boolean;
    .Last: boolean;
    .Eof: boolean;
    .FieldByName(Name: string): TDBField;
    .edit;
    .insert;
    .post;
    .cancel;
    .delete;
    .RecordCount: integer;
    .FieldCount: integer;
    .GetHTMLCombo: string;
    .Free;
   properties
    .SQL: String;
    .Connection: TADOConnection;
    .Fields[index]: TDBField;
    .Fieldisnull[index]: boolean;
    .FieldAsDateTime[index]: dateTime;
    .FieldAsFloat[index]: Float;
    .FieldAsString[index]: String;
    .FieldAsInteger[index]: Integer;
    .FieldAsVariant[index]: Variant;
    .CommandTimeout: integer;


   example:
<%
var conn: TADOConnection;
var rs: TADODataset;
var t: integer;

conn := TADOConnection.Create('DEMO_NEWS');
rs := conn.Execute('select * from accessi');

while not rs.Eof do
begin
   for t := 0 to rs.fieldcount - 1 do
   begin
      Send(rs.FieldAsString[t] + '---');
   end;  
   SendLn('<br>');
   rs.Next;
end;

rs.free;
conn.free;
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -