 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Jeremy Collins Guest
|
Posted: Fri Aug 20, 2004 10:30 am Post subject: Open method of ADO Stream Object |
|
|
Hi all,
Going round in circles here; can anyone spot why I get an "Arguments
are of the wrong type, out of acceptable range or in conflict with
one another" error when calling the Open method of an ADO stream
object?
Stm := CoStream.Create;
Stm.Type_ := adTypeBinary;
Stm.Open(EmptyParam, adModeReadWrite, adOpenStreamUnspecified, '', '');
In theory one should be able to pass no values at all in the Open
method:
Stm.Open(EmptyParam, EmptyParam, EmptyParam, EmptyParam, EmptyParam);
but this raises an "Invalid Variant Type Conversion" exception.
Any ideas?
Cheers,
--
jc
Remove the -not from email
|
|
| Back to top |
|
 |
ozbear Guest
|
Posted: Fri Aug 20, 2004 10:16 pm Post subject: Re: Open method of ADO Stream Object |
|
|
On Fri, 20 Aug 2004 11:30:10 +0100, Jeremy Collins
<jd.collins (AT) ntlworld-not (DOT) com> wrote:
| Quote: | Hi all,
Going round in circles here; can anyone spot why I get an "Arguments
are of the wrong type, out of acceptable range or in conflict with
one another" error when calling the Open method of an ADO stream
object?
Stm := CoStream.Create;
Stm.Type_ := adTypeBinary;
Stm.Open(EmptyParam, adModeReadWrite, adOpenStreamUnspecified, '', '');
In theory one should be able to pass no values at all in the Open
method:
Stm.Open(EmptyParam, EmptyParam, EmptyParam, EmptyParam, EmptyParam);
but this raises an "Invalid Variant Type Conversion" exception.
|
I can't answer your question directly but perhaps if you took a
look at http://www.thedelphimagazine.com/samples/1507/1507.htm
it would shed some light. There is example Delphi code that
does ADO stream opens.
Oz
--
A: Because it fouls the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
|
|
| Back to top |
|
 |
Dennis Passmore Guest
|
Posted: Sat Aug 21, 2004 5:19 pm Post subject: Re: Open method of ADO Stream Object |
|
|
try this:
Stm.Open(EmptyParam, cardinal(adModeReadWrite),
cardinal(adOpenStreamUnspecified), '', '');
Dennis Passmore
Ultimate Software, Inc.
|
|
| Back to top |
|
 |
Jeremy Collins Guest
|
Posted: Tue Aug 24, 2004 8:15 am Post subject: Re: Open method of ADO Stream Object |
|
|
ozbear wrote:
| Quote: | On Fri, 20 Aug 2004 11:30:10 +0100, Jeremy Collins
[email]jd.collins (AT) ntlworld-not (DOT) com[/email]> wrote:
Going round in circles here; can anyone spot why I get an "Arguments
are of the wrong type, out of acceptable range or in conflict with
one another" error when calling the Open method of an ADO stream
object?
I can't answer your question directly but perhaps if you took a
look at http://www.thedelphimagazine.com/samples/1507/1507.htm
it would shed some light. There is example Delphi code that
does ADO stream opens.
|
Interesting article; thanks. This seems to have fixed my
problem, even though the author of the article seems to
have a quite different ADODB_TLB.pas to me!
I get a "constant expression violates subrange bounds"
warning when I specify the recommended ADO constant,
but at least it works now!
Thanks,
--
jc
Remove the -not from email
|
|
| Back to top |
|
 |
Jeremy Collins Guest
|
Posted: Tue Aug 24, 2004 8:17 am Post subject: Re: Open method of ADO Stream Object |
|
|
Dennis Passmore wrote:
| Quote: | try this:
Stm.Open(EmptyParam, cardinal(adModeReadWrite),
cardinal(adOpenStreamUnspecified), '', '');
|
Thanks Dennis, this is indeed the set of parameters that
work. Any particular reason for the typecast? I'm using
D4, so it's possible my ADODB_TLB file is different, but
I get a "constant expression violates subrange bounds"
whether I typecast or not.
Cheers,
--
jc
Remove the -not from email
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|