Re: Catalog.GetObjectOwner()
IMHO this is a syntax error.
The first argument to getObjectOwner is of type String. You cannot pass NULL in this case. Use an empty string ("") instead.
Re: Catalog.GetObjectOwner()
Hi and thank you for the reply.
I've tried passing all known forms of null (0, "", '', etc) but none of them work. Any other suggestions?
Re: Catalog.GetObjectOwner()
well, the "" wouldn't cause a compile-time error.
Still, in MSDN I found 2 different descriptions for GetobjectOwner. One says, that the first parameter is of type Variant (which would allow you to specify NULL), the other says, the first parameter is of type string.
The first version is from the Office2000 SDK.
may be you can get that version of the ADOX.DLL?
Re: Catalog.GetObjectOwner()
I've tried both using a variant data type, and setting that to both NULL and "" without any success.. I still can't seem to get the function to work..
When using emptystring (""), I get the message "The application is using arguments that are of the wrong type..."
Re: Catalog.GetObjectOwner()
I tried out a simplified version of your code, set a connection object to the sample DB for Access2000 and called the function with the constant you provided and vbNullString. It gave me the same error you mentioned. BUT I when I switched to vbNullChar it gave me an error message that said "This object has no owner." I have no idea what the owner of a DB might be but from the error message I got, it seems that the function is working correctly with vbNullChar. ( I used ado2.1 and OLEDB for Jet 4.0 in my connection string.)