August 28th, 2003, 1:33 pm
There aren't really any good books. Books (at least those written about specific subjects such as ADO) are always outdated and usually just rephrase the vendor documentation (i.e. MSDN) with different examples. Actually, that's not quite true: many books are "too-up-to-date," emphasizing using the latest features, which can be a compatability problem, and moreover very often really don't add a lot of benefit). If you must read books, get an account at safaribooksonline and read them there.The MS ADO documentation is great if you are using Visual Basic. That's no good because Visual Basic sucks and when I am elected President of Califonia use of VB will be punishable by fine and imprisonment. Also, the MS docs focus on using the detailed API of the ADO objects, which in this case is the wrong thing to do.Your best bet is to plagiarize well-written working code from someone who knows what they are doing.You second best bet is to plagiarize code from me. Attached to this message please find the source code for a working C++ ADO application that reads from a database, creates a new set of database tables, and then transforms streams of data from the source tables to the target tables (this is called Extract/Transform/Load or ETL). It includes a database that the program reads from in SQL server 2000 format. I will not swear that the format of the included database is compatible with this version of the application, but if you take time to dig into the code I'll take the time to extract some real data. I also include a spreadsheet of extracted data.As you will see from the code - and the opposite of what they do in all the C++ ADO documentation - the secret to ADO is that you only use one or two API functions, and let most of the work be done by straight SQL strings in your code. I like to do ADO in C++ - I usually separate all the SQL strings into a separate .h file. I have tried using more esoteric functions of the ADO API with zero luck. And the nice thing about approaching it from a SQL string point of view is that you can test all your calls in the query analyzer before you paste them into your .h file.email me if you have questions. or post them here. whatever.enjoy!
-
Attachments
-
SampleETLSpreadSheet.zip
- (50.25 KiB) Downloaded 77 times
-
LivETL.zip
- (211.5 KiB) Downloaded 72 times
Last edited by
psychicfriend on August 27th, 2003, 10:00 pm, edited 1 time in total.