Error accessing Access View via ODBC

  • Thread starter Thread starter Herbert Barkmann
  • Start date Start date
H

Herbert Barkmann

When I access a view defined in Access 2000 through the MS ODBC Driver for
Access I get the message "2 Parameters where expected but less parameters
where provided" (or similar, I am using the german version and this my
translation of the message).
The error does not occur when accessing the view within Access, i.e. from
another view but does occur when accessing the view from excel or ms query.
Anybody any idea ?

Thanks
Herbert
 
It sounds as though your query is expecting some values to be provided to
it. Are they perhaps coming from a form, which would explain why they work
when you call the query from within Access?
 
Doug,

thanks for having a look at it.

As far as I can see no forms are involved.

The view is this:

SELECT [dbItemSeries].[dbfItemID] AS RecordIdentifier,
[dbItemSeries].[dbfMasterID] AS SetID,
[Select_SetTitlesForONIXExport].[Title] AS TitleOfSet,
[dbItemSeries].[dbfNoWithin] AS ItemNumberWithinSet
FROM dbItemSeries RIGHT JOIN Select_SetTitlesForONIXExport ON
[dbItemSeries].[dbfMasterID]=[Select_SetTitlesForONIXExport].[MasterID]
ORDER BY [dbItemSeries].[dbfItemID];

and

select "ISBN" as Type, dbfISBN_ISSN as MasterID, dbfTitle as Title from
dbItem as ItemTable where dbfMaster = -1
UNION select "XNr" as Type, dbfSeriesID as MasterID, dbfTitle as Title from
dbSeries where dbfType= 0;

The fields are all existing within the tables, else it would not work within
access either.

Do you see any problem ?

Regards

Herbert
 
Ok, I got it.
It works when I remove the "Type" column from the second query, no idea why.
Thanks
Herbert

Herbert Barkmann said:
Doug,

thanks for having a look at it.

As far as I can see no forms are involved.

The view is this:

SELECT [dbItemSeries].[dbfItemID] AS RecordIdentifier,
[dbItemSeries].[dbfMasterID] AS SetID,
[Select_SetTitlesForONIXExport].[Title] AS TitleOfSet,
[dbItemSeries].[dbfNoWithin] AS ItemNumberWithinSet
FROM dbItemSeries RIGHT JOIN Select_SetTitlesForONIXExport ON
[dbItemSeries].[dbfMasterID]=[Select_SetTitlesForONIXExport].[MasterID]
ORDER BY [dbItemSeries].[dbfItemID];

and

select "ISBN" as Type, dbfISBN_ISSN as MasterID, dbfTitle as Title from
dbItem as ItemTable where dbfMaster = -1
UNION select "XNr" as Type, dbfSeriesID as MasterID, dbfTitle as Title from
dbSeries where dbfType= 0;

The fields are all existing within the tables, else it would not work within
access either.

Do you see any problem ?

Regards

Herbert

Douglas J. Steele said:
It sounds as though your query is expecting some values to be provided to
it. Are they perhaps coming from a form, which would explain why they work
when you call the query from within Access?
 
Back
Top