I am converting an access application to .net. We are keeping the date in access - oh joy...
Any way, I have a query that I am using to populate a gridview. Since gridviews will not display a blank row if there are no records I added a union to my query in access to select a blank row from the database. This worked when we did it in SQL but in access every time I add the union into my select I receive IErrorInfo.GetDescription failed with e_fail.
PARAMETERS intEmployeeKey Short, TaskDate DateTime;
SELECT TaskTime.Pkey, TaskTime.TaskDate, TaskTime.Hours, TaskTime.Notes, Task.TaskName
FROM Employee INNER JOIN (Task INNER JOIN ([Position] INNER JOIN (EmployeePosition INNER JOIN TaskTime ON EmployeePosition.Pkey=TaskTime.EmployeePositionKey) ON Position.Pkey=EmployeePosition.PositionKey) ON Task.Pkey=TaskTime.TaskKey) ON Employee.Pkey=EmployeePosition.Employee
WHERE (((Employee.Pkey)=[intEmployeeKey]) AND ((TaskTime.TaskDate)=[TaskDate]))
UNION
SELECT '', '', '', '', ''
FROM Employee INNER JOIN (Task INNER JOIN ([Position] INNER JOIN (EmployeePosition INNER JOIN TaskTime ON EmployeePosition.Pkey=TaskTime.EmployeePositionKey) ON Position.Pkey=EmployeePosition.PositionKey) ON Task.Pkey=TaskTime.TaskKey) ON Employee.Pkey=EmployeePosition.Employee
WHERE (((Employee.Pkey)=[intEmployeeKey]) AND ((TaskTime.TaskDate)=[TaskDate]));
Can I not do this in access?