Wednesday, July 01, 2015

Vinyl log 17 - 1 July

DayMonthYearArtistTitle
1July1970Fairport ConventionLiege and Lief

45 years have passed since I bought "the most important folk album of all time". I don't remember buying this, I don't remember listening to it and I certainly don't remember what I thought about it then. I know that my guitar playing improved immensely through playing along with L&L, I know that I was impressed with Richard Thompson who played guitar solos on the low frets of the low strings, I know that the record even influenced my very early songs.

Of course, this record was the first in a very long line of Fairport family recordings which I have bought. Why, even this morning I belatedly ordered RT's new "Still" album. I had already seen Fairport live before buying this record, but that was the 'Full House' line up; apart from "Matty Groves" and the instrumental medley, nothing the chaps played in February came from this record.

I still don't like "Reynardine" and am not particularly fond of "Tam Lin", but the other songs on this record still take my breath away. As an exercise, I have just put the disc in the player to see whether listening to the songs brings back any particular memories; "Come all ye" conjures up a certain mood but no more. Thinking about it, this song is quite atypical; although an excellent calling on song, there isn't really anything else like it in the canon.

"Farewell, farewell" is so modest and so perfect; if one wants to find fault, then the wah-wah guitar hidden behind everything else seems unnecessary. On the other hand, the Leslie toned guitar on "Crazy man Michael" is sublime. Thinking about it now, it's interesting that Richard was trying some contemporary sounds which weren't in the Fairport tone palette - and never returned.

In view of the sad news this morning, it is good to remember that the nucleus of the original Fairport - Richard, Ashley and Simon - are all doing well. Swarb, despite his premature obituary and ill health, seems to hang on. I haven't heard anything about DM in years, which is a shame. Of course, Sandy left us years ago. Listening to her singing again, her voice seems so clean and open, possibly a little vulnerable, free of all the melismatic trimmings which so weigh down today's divas. Swarb's playing too is simpler and less frantic than his later style; this is easier to listen to.

I suppose that this record is in my DNA.


Bruce Rowland, Chris Squire RIP

A few days ago I learnt of the death of Chris Squire, eternal bassist with Yes, and this morning I learnt of the death of Bruce Rowland, drummer with the late 70s Fairport Convention. The latter was not unexpected as a few weeks ago it was announced that Bruce was entering a hospice. Squire's death was unexpected: apparently six weeks ago he was diagnosed with a special form of leukemia.

Bruce was a music veteran, a drummer who had played at Woodstock (in Joe Cocker's Grease Band) and supported many other artists. He was drafted into Fairport in 1974 during the "Rising for the moon" sessions after Dave Mattacks left. He stayed for the next few albums: the unfortunate "Gottle o'gear", the splendid "Bonny bunch of roses" and the hit and miss "Tipplers tales". Then Fairport split for what seemed to be the final time and Bruce apparently gave up the drums to become a farmer in Denmark. That at least is the lore; I don't know how true that is. Bruce was a steady drummer and played what was required of him; the evidence shows that his Fairport work places him behind all the other Fairport drummers.

My contact with Chris Squire was only during 1971: I attended a Yes concert at the beginning of the year (actually, they were supporting Iron Butterfly), bought their breakthrough "Yes Album" shortly after and lost interest after "Fragile", which was released later on that year. On stage he was a dominant figure: tall, playing a Rickenbacker bass, dressed in a cape and pom pom boots. His sound on record was similarly dominant. Yes were the subject of a television documentary which I remembered watching; coincidentally I found this on YouTube about two weeks ago and enjoyed watching it. It contains much footage of Squire in his prime.

Monday, June 29, 2015

Saving grid column widths

The OP returned from America a few days ago and on Friday we had our first meeting. After reviewing the various problems which had arisen during her absence, we turned to the few pieces of code which I had developed. The following request was then made: the ubiquitous dbGrid in the management program always shows each column being displayed with the appropriate width, although sometimes this width is wrong (especially when digits or English characters are displayed with Hebrew letters). The grid allows one to change a column's width, but these changes are not recorded. The OP wanted that once a column width is changed, it should always be displayed with that new width.

I have no experience of this so I had to research the subject. At first, it seemed very easy - simply write code which would store the column widths of a grid to the database when the form closes, then retrieve those widths when the form is opened. I considered the possibility of storing only data for columns whose width has changed, but found it very hard to determine when a change had been made. So I decided to store all the column widths of the grid.

But then I discovered that I was getting errors when I tried restoring those widths. Naturally I was working on the most complicated form in the entire program - but it's also the most heavily used. Data in the grid is often redisplayed by means of dynamic parametric queries and I had great difficulty in determining when to load the saved values. After knocking my head against the wall for at least an hour, I realised that instead of saving values from the grid, I should save (and load) values for the underlying dataset. Once I made this change, the task became much easier: before closing the dataset, I save the column widths, and after opening the dataset, I load the widths. The dataset has suitable events (BeforeClose and AfterPost), so the call to the library code need be written only once per dataset.

Naturally, the actual code to save the widths in the database is stored in a library procedure so every dataset can use it. The actual code to save widths is very simple; basically one iterates over the fields in the dataset and saves each width to the database.
with tsqlquery.create (nil) do begin sqlconnection:= dm.sqlConnection1; sql.add ('insert into usergridwidths (usergrid, colnum, colwidth) '); sql.Add ('values (:p1, :p2, :p3)'); params[0].asinteger:= gridnum; prepared:= true; for i:= 0 to cd.fields.count - 1 do begin params[1].asinteger:= i; params[2].asinteger:= cd.fields[i].displayWidth; execsql end; free end;
The loading code is very similar. 

I'm not sure that this is the best solution - the tdbgrid component has an event called 'OnColumnMoved'  which should provide a trigger for detecting a change in a column's width - but I couldn't get this to work. So the above solution should be taken with a grain of salt: it works, but I'm sure it's not optimal.