ADODB.Stream.Open now with VS2005 gives wrong type error message



Hi,

Sorry about the fragmented previous post. I tried to get rid of the extra
spacing but pressing Ctrl+Enter wound up sending my post. Ooops.

I have some code that with the previous vesion of Microsoft Visual Studio
2002 worked fine, but now I receive an error message.

public void MyFunction()

{

ADODB.Stream oStream;

oStream = null;

try

{

// Create a stream to save the XML structure.

oStream = new ADODB.Stream();

oStream.Open((object)System.Reflection.Missing.Value,
ConnectModeEnum.adModeWrite, StreamOpenOptionsEnum.adOpenStreamUnspecified,
"", "");

}

}

When I try to execute the oSTream.Open() line, I get the error message:

Arguments are of the wrong type, are out of acceptable range, or are in
conflict with one another, -2146825257

Since all the arguments are option, were optional, I am clueless to why
VS2005 complains.

Thoughts?

Thanks in advance,

Sarah



.