Hi,
Thank you all first of all...
System.Reflection.Missing.Value still throws the same exception...
This is the function that I'm trying to use (Taken from ADO help) :
Gets the permissions for a group or user on an object.
Syntax
ReturnValue = GroupOrUser.GetPermissions(Name, ObjectType
[, ObjectTypeId])
Return Value
Returns a Long value specifying a bitmask containing the permissions that
the group or user has on the object.
Parameters
Name A String value specifying the name of the object for which to set
permissions.
ObjectType A Long value specifying the type of the object for which to
get permissions. The following constants are valid values for ObjectType:
Constant Description
adPermObjProviderSpecific Object is of a provider-defined type. An
error will occur if the ObjectType is adPermObjProviderSpecific and an
ObjectTypeId is not supplied.
adPermObjTable Object is a table.
adPermObjColumn Object is a column.
adPermObjDatabase Object is a database.
adPermObjProcedure Object is a procedure.
adPermObjView Object is a view.
adPermObjSchema Object is a schema.
adPermObjDomain Object is a domain.
adPermObjCollation Object is a collation.
adPermObjSchemaRowset Object is a schema rowset.
adPermObjCharacterSet Object is a character set.
adPermObjTranslation Object is a translation.
ObjectTypeId Optional. A Variant value specifying the GUID for a
provider object type not defined by the OLE DB specification. This
parameter is required if ObjectType is set to adPermObjProviderSpecific;
otherwise, it is not used.
The exception detail is this :
System.Runtime.InteropServices.COMException was unhandled
Regards,
Özden
Özden Irmak said:
Hi,
In my C# applicaiton, I use ADOX to reach and check the user permissions
in my Access database. To do this, there is a function named
"GetPermissions". This function gets 3 arguments where the 3rd one is
optional. But the C# compiler doesn't accept giving only 2 parameters and
whatever I put into the third one (null, "", etc.) I get an exception.
I want to ask whether anybody knows how to handle those optional
parameters in C#?
Thanks in advance...
Regards,
Özden