Error accessing Access View via ODBC

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
 
D

Douglas J. Steele

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?
 
H

Herbert Barkmann

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
 
H

Herbert Barkmann

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top