Search content:

 

Personal Menu
Username:
Password:
Save password

Become a member

Forgot Password?

 

Don't miss these
FreeRegEdit
sequenceXtra
SiteSearch Indexer
GkSetup
Tic Tac Toe
Quit Message
Getting full error messages
Firefly CD Burning Xtra
Blend Images
MelixDB Xtra version 1.0 released.
MediaMacros Xtras Mall
 

 

 

Behavior Show Recordset's Current Record

Added on 4/7/2001

 

Compatibilities:
D7 D8 PC Script Shockwave

Required Xtras:
ADOXtra

This item has not yet been rated

Author: Eugene Shoustrov (website)

Script outputs the detailed information about the contents of the current record of a Recordset object.

-- Coded by Eugene Shoustrov
-- author@adoxtra.com

-- Shows the detailed info about the current record
-- rst is ADOxtra wrapper object of ADODB.Recordset
on ShowRecord rst
  if rst.state=0 then
    put "Recordset is closed."
  else if rst.bof or rst.eof then
    put "Current record does not exist."
  else
    repeat with i=0 to rst.Fields.Count-1
      desc=""
      desc=desc&&GetTypeName(rst.Fields[i].type)
      attributes=rst.Fields[i].Attributes
      if CheckBit(attributes,rst.adFldIsNullable) then
        desc=desc&&"Nullable"
      end if
      if CheckBit(attributes,rst.adFldMayBeNull) then
        desc=desc&&"MayBeNull"
      end if
      if CheckBit(attributes,rst.adFldRowID) then
        desc=desc&&"RowId"
      end if
      if CheckBit(attributes,rst.adFldUpdatable) then
        desc=desc&&"Updatable"
      else
        desc=desc&&"Readonly"
      end if
      
      name=rst.Fields[i].Name
      val=rst.Fields[i]
      put name&&"="&"E&val"E&desc
    end repeat
  end if
end

-- Handler returns the string description of the type
-- returned by the type property of ADO objects
on GetTypeName type
  case type of
    11: return "boolean"
    8,129,203,202,200,130: return "string"
    6: return "currency"
    7: return "date"
    14,131,139: return "numeric"
    5,4: return "float"
    0: return "empty"
    3,2,16,19,18,17: return "integer"
    72: return "GUID"
    132: return "user-defined"
    204: return "binary"
    otherwise: return "unknown:"type
  end case
end

-- Handler returns true if all bits in bitMask
-- are set in val
on CheckBit val, bitMask
  return BitAnd(val,bitMask)=bitMask
end

 


Upload Provided by ABCUpload ASP

Contact

MMI
22 West Court Sq
Suite 2C
Newnan, GA 30263
USA

Fax - (206) 339-5833

Send e-mail