ADO ConnectionString dialog as a property in my component?
From: nisbus (vk_at_elea.is)
Date: 12/20/03
- Next message: Brian Bushay TeamB: "Re: Calculation"
- Previous message: Ashim: "ForBrian, Ms access and Delphi"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 20 Dec 2003 01:50:03 -0000
Hi,
I don't know if this is a good idea or not but I'm in the process of writing
a component that includes TADODataSets and a TADOConnection. It works great
so far but the only problem is the connectionString property of the
TADOConnection.
I've published the ConnectionString property but I don't know how to make
the options dialog appear in the object inspector.
I tried this:
procedure TIndustry.SetFConnectionStr(const Value: WideString);
begin
if Connect.ConnectionString = '' then
Connect.ConnectionString := PromptDataSource(0,'');
end;
It works in so far as when I clear the field in the object inspector and
press enter, I get the dialog, but it doesn't seem to save the settings to
the component. Do I have to save parts of the String to it's corresponding
properties or what?
Also, is this something you would strongly advise me not to do or could this
actually be a good idea?
The component is a copy of an interface I've written to do certain things
with an MSSQL server and I thought that if I could create a component for
all of the work I'd save my self tons of work when I create more databases
on the server for my app to connect to.
Thanks,
nisbus
- Next message: Brian Bushay TeamB: "Re: Calculation"
- Previous message: Ashim: "ForBrian, Ms access and Delphi"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|