David Sandor
2003-07-31 01:36:13 UTC
Question:
This is what I want to do...
ADODB.Stream Stream = new ADODB.StreamClass();
Stream.Open();
There are 5 arguments for a Stream.Open() however they are all optional. You can not pass nulls to the arguments as it will not compile. Someone posted a solution some time ago that indicated to pass Type.Missing, however it will not compile because of a 'cannot convert from .. to.. ' error. Any solutions?
Object Browser Definition of ADODB.Stream.Open()
public abstract new void Open ( System.Object Source , ADODB.ConnectModeEnum Mode , ADODB.StreamOpenOptionsEnum Options , System.String UserName , System.String Password )
Tried:
Stream.Open(Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing);
compiler Errors:
Argument '2': cannot convert from 'object' to 'ADODB.ConnectModeEnum'
Argument '3': cannot convert from 'object' to 'ADODB.StreamOpenOptionsEnum'
Argument '4': cannot convert from 'object' to 'string'
Argument '5': cannot convert from 'object' to 'string'
Thanks,
David S.
This is what I want to do...
ADODB.Stream Stream = new ADODB.StreamClass();
Stream.Open();
There are 5 arguments for a Stream.Open() however they are all optional. You can not pass nulls to the arguments as it will not compile. Someone posted a solution some time ago that indicated to pass Type.Missing, however it will not compile because of a 'cannot convert from .. to.. ' error. Any solutions?
Object Browser Definition of ADODB.Stream.Open()
public abstract new void Open ( System.Object Source , ADODB.ConnectModeEnum Mode , ADODB.StreamOpenOptionsEnum Options , System.String UserName , System.String Password )
Tried:
Stream.Open(Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing);
compiler Errors:
Argument '2': cannot convert from 'object' to 'ADODB.ConnectModeEnum'
Argument '3': cannot convert from 'object' to 'ADODB.StreamOpenOptionsEnum'
Argument '4': cannot convert from 'object' to 'string'
Argument '5': cannot convert from 'object' to 'string'
Thanks,
David S.