|
Posted by Erland Sommarskog on 10/30/05 19:54
Neil (nospam@nospam.net) writes:
> Had strange results with using HOST_NAME. I added "=HOST_NAME()" to the
> criteria column of the view's MachineName field. The view worked fine.
> Similarly, if I open the view using a pass-through query in the front
> end, it opens fine. But if I link the view to the front end, it opens
> with "#Deleted" showing in each field (that's what Access displays when
> records in a recordset have been deleted, but the recordset hasn't been
> requeried).
>
> If, on the other hand, I hard-code the machine name into the view, then
> it opens fine when linked to the front end. But something about the
> HOST_NAME function that's causing it to not be able to get the records
> (or it gets the records and then loses them).
Not sure I understand this (I still haven't learn Access :-), but there
is a gotcha here: which datatype is MachineName? I should be nvarchar
to avoid implicit conversions that precludes use of indexes. Not that I
can see that this explains behaviour you see above.
--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp
Navigation:
[Reply to this message]
|