Re: Jawin MS ADO 2.1 contribution
Morten Andersen <[email protected]>
| Newsgroups | gmane.comp.windows.devel.jawin |
|---|---|
| Message-ID | <[email protected]> |
Hi Alex
First sorry for being so slow in answering.
Alex Kotchnev wrote:
> Morten,
> attached is some code generated using the Jawin browser for MS ADO
> 2.1 that I have been using for the last couple of months with great
> success. It has been very useful in being able to connect to MSSQL servers
> using the built in Windows authentication (which I don't think was
> possible using the standard jdbc drivers, at least until recently). I have
> added an example of how I use it and if you like it, we could add it to
> the contrib section of Jawin.
It been quite some time since I have worked MSSQL-server, so I am not
able to come with much input on this. But if you are correct that this
is the only way to connect to MSSQL-server using the auth-method you
describe, I assume that there are probably other developers that will
think these stubs are great.
I just did a quick check on MSDN, is it correct that the newest
ADO-version is 2.8? How come that you have choosen version 2.1 (this is
probably a stupid question, but I don't really know much about the MS
DB-access technologies).
I think the best way to commit your example is probably to add a
standard Javadoc package.html file in the msado21-package and add the
BarcodeManager-source in it, together with some additional explanations,
like (some of this should probably just be references to the appropriate
MSDN pages):
- supported MS versions (is MS ADO 2.1 bundled with W2K, XP, etc.?).
- supported MS SQL versions (6.0, 7.0, etc).
- where the help is located, at MSDN, locally in the
/WINNT/HELP/ado210.chm file as you have documented in the javadoc (but
is this the case on all Windows systems? - it is present at my W2K machine).
You could also in this package.html file write what the example "shows"
and how it works, e.g. you could write something on:
- what the two methods does. Some of the source in them are
"dublicated". Can the example be refactored to be more simple and still
"show" what you intend the example to show.
- insert additional comments, so the reader can follow how it works.
- document what SQL-table layout it works on.
Finally, since potentially, a lot of other developers will perhaps use
these donated stubs, I think it would be nice to clean up the generated
source a little bit before commit'ing it to CVS (I know that we should
probably clean up a bit in the xslt generator files instead, but that
must come in the future). This includes:
- in most of the classes extending DispatchPtr (e.g. Recordset20), there
are a lot of outcommented source. This should be removed.
- in at least a couple of the classes extending COMPtr
(RecordsetEventsVt, ConnectionEventsVt, ADORecordsetConstruction,
ADOConnectionConstruction15, ADOCommandConstruction,
ADOConnectionConstruction) there are only not-implemented methods, like:
public int RecordChangeComplete
that throws a
UnsupportedOperationException();
Classes like this should be removed if possible. No reason to commit
non-implemented stubs.
- Some classes contains only a CLSID (e.g. RecordSet, Parameter,
Connection and Command). Are these generated from socalled
"CoClass"-object in the type browser? They are probably needed to
compile, but I don't like that they don't extend DispatchPtr. Perhaps we
could let them extend _RecordSet, _Parameter, _Connection and _Command
which I assume are there default interfaces. I don't know if this gives
compile or run-time problems though.
- The class SearchDirection is empty? If there is no good reason for it
to be present it should be removed.
But all in all, I think it would be kind of you to donate the source to
the Jawin project (if I remember correctly, you do have CVS commit
rigths? - so you can handle it yourself?).
Oh, and you should of course also add an entry describing it in the
revision history at docs/jawinrevisions.html.
Best Regards
Morten