 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Gary Wardell Guest
|
Posted: Mon Apr 23, 2007 8:11 am Post subject: TConnection.Open question |
|
|
Hi,
I've imported the ADO 2.6 type library into Delphi 6 and successfully gotten
it to work. (This is for use with a legacy application.)
However, the MS documentation says that all of the parameters on the
connection open method are optional. Indeed, I'm used to setting the
connection properties instead of using the open; specifically with the user
ID and password in the connection that I retrieve from an ini file.
However, this is the only definition of the open in the imported type
library:
Procedure TConnection.Open(Const ConnectionString: WideString; Const
UserID: WideString;
Const Password: WideString; Options: Integer);
That is, there is no implementation without the parameters.
So, is there something I can pass, maybe a null string or NIL, that tells
ADO the parameter is not there or do I have to pass everything in the open,
thus making the various properties irrelevant.
Gary |
|
| Back to top |
|
 |
Brian Bushay TeamB Guest
|
Posted: Wed Apr 25, 2007 7:46 am Post subject: Re: TConnection.Open question |
|
|
| Quote: | However, this is the only definition of the open in the imported type
library:
Procedure TConnection.Open(Const ConnectionString: WideString; Const
UserID: WideString;
Const Password: WideString; Options: Integer);
That is, there is no implementation without the parameters.
So, is there something I can pass, maybe a null string or NIL, that tells
ADO the parameter is not there or do I have to pass everything in the open,
thus making the various properties irrelevant.
|
try EmptyParam
--
Brian Bushay (TeamB)
Bbushay (AT) NMPLS (DOT) com |
|
| Back to top |
|
 |
Gary Wardell Guest
|
Posted: Thu May 03, 2007 6:51 am Post subject: Re: TConnection.Open question |
|
|
That gives this error:
Could not convert variant of type (Error) into type (Integer) |
|
| Back to top |
|
 |
Brian Bushay TeamB Guest
|
Posted: Fri May 04, 2007 8:11 am Post subject: Re: TConnection.Open question |
|
|
| Quote: | That gives this error:
Could not convert variant of type (Error) into type (Integer)
Try 0 for the last parameter |
--
Brian Bushay (TeamB)
Bbushay (AT) NMPLS (DOT) com |
|
| 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
|
|