For a Field object:
set conn = New ADODB.Connection
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open "F:\MaterialMaster\Material_Master.mdb"
set rs = New ADODB.Recordset
rs.open "SELECT * FROM tblAMSEA", conn
debug.print(rs.Fields(0).Type)
rs.Close
conn.close
For a Parameter object:
set comm=New ADODB.Command
set para=New ADODB.Parameter
para.Type=adVarChar
para.Size=25
para.Direction=adParamInput
para.Value=varfname
comm.Parameters.Append para
For a Property object:
set conn = New ADODB.Connection
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open "F:\MaterialMaster\Material_Master.mdb"
set rs = New ADODB.Recordset
rs.open "SELECT * FROM tblAMSEA", conn
set prop=New ADODB.Property
'Display the property attributes of the Orders Table
for each prop in rs.Properties
debug.print "Attr:" & prop.Attributes & VbCrLf
debug.print "Name:" & prop.Name & VbCrLf
debug.print "Value:" & prop.Value & VbCrLf
debug.print "Type:" & prop.Type
next
rs.close
conn.close
set rs=nothing
set conn=nothing
|