Day 028 - Getting the analysis and the database in sync
I wondered yesterday how to actually work with data files in the HFS (HyperFileSQL - I'm getting tired of typing that) Control Center.
It appears you can't do much without an associated analysis, and I was running the Control Center standalone, not launched from the context of a current project in the IDE. Also I might have missed a step in my conversion; #11 in the list of points was "Generate the analysis" and I didn't remember that happening.
I brought up the Connections window for the analysis, and it confirmed that yes, my application was now pointed at the HFS server.
Then I went to the analysis Description and found the directory where the analysis is stored. In the Control Center I clicked on the Open an analysis button and supplied that directory. (There doesn't seem to be a text menu in the Control Center - all I could find were the buttons and I had to hover over them to see their purpose.)
At that point I could see all of my files.
But I had a problem. The Control Center showed my HFS Classic files, not the files on the server.
So my analysis said I had a connection to the server. But the analysis also said I didn't have any server files.
I went back and had another look at the previous section of the tutorial, which mentioned regenerating the analysis. I found that option under (surprise!) Analysis | Generation.
After regenerating the analysis and reopening the control center I was able to see my files. Oddly, the analysis for my original classic database was in
D:\WinDev\17\Tutorial\Answers\My accounts\My accounts.ana\My accounts.wdd
and the SQL analysis was in
D:\WinDev\17\Tutorial\Answers\My accounts\My accounts.wdd
Ours is not to reason why...
However I had another problem. Although I'd told the conversion process to copy across my data, the Control Center reported no records in any of my tables.
I asked for help in the Skype chat. Rob Berry asked if I'd actually looked at the SQL data. So I double-clicked on a table and got a window with the connection parameters. I clicked the check mark, the window went away and the table list refreshed. However I had seemingly drilled down to the database level and was no longer seeing the rest of the analysis information:
Still no data. I double-clicked again on the table again and this time I saw the table data and other information.
I couldn't see any way to get from this "level" back to the overall view I'd had when I first opened the analysis, except by reopening the analysis.
Rob also suggested I check Project | Description | Live Data. That indicated I was using the server:
And, if I needed any further confirmation, the analysis window was now displaying a prominent HFSQL C/S tag (I wonder how long that was there and I hadn't noticed?).
I finished up a little puzzled by the Control Center, but at least I now had an in-sync analysis in my project.