Reply to Re: Problem with HOST_NAME Function with Linked View

Your name:

Reply:


Posted by Neil on 10/31/05 05:43

Hello, everyone.

I've made some progress with this strange situation. I played around with
different scenarios of the view with HOST_NAME that won't work when linked
to the MDB file, removing most fields, trying just one table, then the
other, and kept getting the "#Deleted" results. However, I found then when I
didn't assign a logical primary key when I linked the view, the results
displayed fine!

That only makes the situation stranger. But there it is.

In another post here I noted that I had created a test table with a
two-field PK, one of which contained the HOST_NAME value, and created a view
which returned records from this test table, with HOST_NAME() as a parameter
for that field. When I linked that view to the MDB file, selecting the two
PK fields as the logical primary key, it worked fine. So it's not all
logical primary keys that it has problems with.

Neil

"Neil" <nospam@nospam.net> wrote in message
news:lra9f.1731$8c5.1137@newsread3.news.pas.earthlink.net...
>I have an Access 2000 MDB file with a SQL 7 back end. I have a main table
>with 50,000 records; and I have a selections table with 50,000 records for
>each machine that uses the database (about 25-50). This allows each user to
>have their own set of selections.
>
> The selections table has three fields: ID (int), Sel (bit), MachName
> (varchar). ID and MachName comprise the primary key.
>
> I have a view that combines the main table and the entries for the
> selections table for the current machine (SQL below). The view works fine
> when opened in EM and QA. And if I create a pass-through query from my
> Access MDB file, the results are displayed fine.
>
> However, if I link the view to the Access MDB file, I get "#Deleted" in
> every field of every record (which seems to indicate that the records were
> there and then they were gone). However, if I hard-code the machine name
> into the same view instead of using HOST_NAME and then relink the view to
> the MDB file, the linked view opens fine. Only when I use HOST_NAME as a
> parameter in the view is there a problem with it.
>
> Anyone have any idea what's going on here, or have heard of any issues
> with HOST_NAME and ODBC linked objects? SQL for the view is below.
>
> Thanks!
>
> Neil
>
> SELECT INVTRY.*, InvtrySelections.Sel, InvtrySelections.MachName
> FROM dbo.INVTRY INNER JOIN
> dbo.InvtrySelections ON
> dbo.INVTRY.ID = dbo.InvtrySelections.ID
> WHERE (dbo.InvtrySelections.MachName = HOST_NAME())
>

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация