Use .NULL. instead of {} for DefaultValue dates, datetimes (VFP-to-SQL Server)

I updated my post from yesterday to set the default value for date and datetime fields. A better choice than {} is .NULL., since SQL Server doesn’t understand empty dates the same way VFP does.

Advertisements

DbgetProp( cName, “View”, “Tables”) fails…more often than I thought (VFP 9.0)

In an earlier post, I noted what  I thought was an anomoly: DBGetProp(cName,”VIEW”,”Tables”) unexpectedly returned an empty string. I rebuilt the view, and since it seemed to be an isolated issue in a view that had been around for years, I dismissed it as a glitch. Today I’ve discovered it again in a view I’ve been modifying. I don’t know at what point the DBC stopped recognizing all the tables, or even if there is expected, albeit inconvenient, behavior. The documentation sure doesn’t seem to cover it.

Is it an unreliable command? Or am I misusing it? Or just misunderstanding it? For now I’ll have to assume it’s unreliable and hard code the constituent cursors in the interest of moving along.

Phooey.

DBGetProp fails (VFP 9.0)

Ugh. Ever have DbGetProp( cViewName, “VIEW”, “TABLES”) return an empty string? Yes, the view is really a view, in the current database. Works perfectly fine in every regard. (It’s a very simple query that selects the year of a date field, and groups by it.) One table. One field. Weird. Took out the year function, and the DbGetProp still returned blank.

Rebuilding the view fixed it. But, um, what the hell?