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

We do not recommend using ADODB interop to do data access in Visual Studio
2005. There are a lot of issues with that and the new ADO .NET classes
provide a much more stable and feature rich implementation to data.

Here is a KB Article that speaks of this:

Chris Alton, Microsoft Corp.
SQL Server Developer Support Engineer
This posting is provided "AS IS" with no warranties, and confers no rights.
From: "Sarah M. Weinberger" <mweinberger@xxxxxxxxxxx>
Subject: ADODB.Stream.Open now with VS2005 gives wrong type error message
Date: Fri, 5 Oct 2021 12:26:37 -0700


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;



// Create a stream to save the XML structure.

oStream = new ADODB.Stream();

"", "");



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.


Thanks in advance,