This topic is locked

ODBC Drivers error '80040e10'

11/6/2005 8:02:06 AM
ASPRunnerPro General questions
N
nollaig author

Hi
I am getting the following error when I attempt to add a new record to RecTable:
<quote>

Microsoft OLE DB Provider for ODBC Drivers error '80040e10'
[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 2.
<End Quote>
I have 4 tables in my Database - Customers, Jobs, StockItems and ReqTable (a Requisitions Table). The SQL statement on ReqTable is as follows:
[I]SELECT Customers.CustName,

reqTable.ReqNo,

reqTable.RJobNumber,

reqTable.RDescription as RDescription,

reqTable.RQty as RQty,

reqTable.RS_Code,

reqTable.RLength as RLength,

reqTable.RWidth as RWidth,

reqTable.RPurchase,

reqTable.RPItem_Cost as RPItem_Cost,

StockItems.S_Code,

StockItems.S_Item,

StockItems.S_Value as RS_Value,

StockItems.S_Weight as RS_Weight,

StockItems.S_RawFin,

jobs.JobNumber,

jobs.Description as jobDescription,

IIf([reqTable].[RPurchase]=1,[RPItem_Cost] ,[RS_Value]) AS tmpTotal,

IIf([StockItems].[S_RawFin]='Purchased',[RQty] [RLength] [RWidth] [tmpTotal]) AS pTotal,

IIf([StockItems].[S_RawFin]='Raw',[RQty]
[RLength] [RWidth] [tmpTotal]) AS rTotal,

IIf([StockItems].[S_RawFin]='Finished',[RQty] [RLength] [RWidth] * [tmpTotal]) AS fTotal

FROM StockItems INNER JOIN ((Customers INNER JOIN jobs ON Customers.CustID = jobs.CustomerID) INNER JOIN reqTable ON jobs.JobNumber = reqTable.RJobNumber) ON StockItems.S_Code = reqTable.RS_Code
While I can Add, EDIT and DELETE Records from all the other tables I cannot ADD records to the reqTable (I can edit, voew, delete etc).
Any Suggestions would be most welcome.
Thanks in Advance
Nollaig

Sergey Kornilov admin 11/7/2005

Nollaig,
it seems that your query is too complex for ODBC Microsoft Access Driver to add a record to it.

I can recommend the following:

  1. Ensure that you don't show any calculated or joined fields on Add page.
  2. Try to regroup your query to make it more clear to Access.

    I.e. change the last phrase this way:
    ...

    FROM reqTable INNER JOIN ((Customers INNER JOIN jobs ON Customers.CustID = jobs.CustomerID) INNER JOIN StockItems ON jobs.JobNumber = reqTable.RJobNumber) ON StockItems.S_Code = reqTable.RS_Code