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:

http://support.microsoft.com/kb/910696

-------------------------------------
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 2007 12:26:37 -0700

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





.



Relevant Pages

  • Error 07002 - SQLBindParameter Problem Shorter Example
    ... Here is a shorter code example since the last message I posted got ... 'Data Access VB App.exe': Loaded ... The majority of the code was generated by Visual Studio and based on the ... error message it would seem that I have to add SQLBindParameter ...
    (microsoft.public.dotnet.languages.vb)
  • Error 07002 - SQLBindParameter Problem Shorter Example
    ... Here is a shorter code example since the last one I posted was ... 'Data Access VB App.exe': Loaded ... The majority of the code was generated by Visual Studio and based on the ... error message it would seem that I have to add SQLBindParameter ...
    (microsoft.public.sqlserver.odbc)
  • Re: Error 07002 - SQLBindParameter Problem Shorter Example
    ... Cor ... Here is a shorter code example since the last message I posted got ... > The majority of the code was generated by Visual Studio and based on the ... > error message it would seem that I have to add SQLBindParameter ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Configuration Error / Access denied after compiling asp.net c# project
    ... You mean that you are still getting this error message: ... > It's not the data access application block which causes the error. ... > Martin Strojek ... On Windows 2003 Server i ...
    (microsoft.public.dotnet.framework.aspnet)
  • RE: Deployment problem with cached documents
    ... has been saved during a debug session within Visual Studio. ... > I attempted to reproduce the problem, however, opening a Word document ... > Visual Studio Tools for Office Forum ... >> the error message "The customization assembly could not be found or could not ...
    (microsoft.public.vsnet.vstools.office)