H
hgood
Unregistered / Unconfirmed
GUEST, unregistred user!
如题,在网上找下以下代码,是VB的,请帮忙高手转换为delphi的,谢谢。Sub ShowUserRosterMultipleUsers()Dim cn As New ADODB.ConnectionDim rs As New ADODB.RecordsetDim i, j As LongSet cn = CurrentProject.Connection' The user roster is exposed as a provider-specific schema rowset' in the Jet 4.0 OLE DB provider. You have to use a GUID to' reference the schema, as provider-specific schemas are not' listed in ADO's type library for schema rowsetsSet rs = cn.OpenSchema(adSchemaProviderSpecific, _, "{947bb102-5d43-11d1-bdbf-00c04fb92675}")'Output the list of all users in the current database.Debug.Print rs.Fields(0).Name, "", rs.Fields(1).Name, _While Not rs.EOFDebug.Print rs.Fields(0), rs.Fields(1), _rs.Fields (2), rs.Fields(3)rs.MoveNextWendEnd Sub