Re: C# 2.0 + MS Access == Error
- From: "Omer" <omer.mush@xxxxxxxxx>
- Date: 20 Oct 2006 11:34:57 -0700
Hi Dave,
Thanks for your reply.
All the tokens are perfectly fine.
SELECT TOP 10 * FROM COMPANY_ITEM_PRICE, ITEM
is working.
BUT
SELECT TOP 10 * FROM COMPANY_ITEM_PRICE, ITEM
WHERE COMPANY_ITEM_PRICE.ITEM_ID = ITEM.ITEM_ID
is giving me the same error. It seem as if Jet has some problem with
comparing two table fields. :(
Dave Sexton wrote:
Hi,
I believe the error is indicating that one or more of the tokens that you are
using does not correspond with any of the DB objects that are currently in
scope.
Is COMPANY_ITEM_PRICE correct?
I'm not sure if this error would occur even when explicitly scoping an object,
such as I.ITEM_ID, but you should probably verify each field name as well and
check to make sure that the fields do exist on the tables that you're
referencing. e.g., Ensure ITEM exists, ITEM_ID is in ITEM and CIP, COMPANY_ID
is in CIP and NAME is in ITEM.
If you are completely sure that the query tokens are all correct, then try to
simplify the query just for the sake of debugging.
i.e., Does the following work for you?
SELECT TOP 10 * FROM COMPANY_ITEM_PRICE, ITEM
If so, then try:
SELECT TOP 10 * FROM COMPANY_ITEM_PRICE, ITEM
WHERE COMPANY_ITEM_PRICE.ITEM_ID = ITEM.ITEM_ID
etc...
--
Dave Sexton
"Omer" <omer.mush@xxxxxxxxx> wrote in message
news:1161354282.288794.153580@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi,
I am using C# 2.0 along with MS Access database. All my queries are
working perfectly fine, but one inner join query is ocntinously
throwing. I ahve tried it both from code and running explicitly throw
query builder, but to no avail. Query is
"SELECT * FROM COMPANY_ITEM_PRICE as CIP
INNER JOIN ITEM as I ON I.ITEM_ID = CIP.ITEM_ID WHERE CIP.COMPANY_ID =
1 ORDER BY I.NAME"
The error its throwing is,
System.Data.OleDb.OleDbException: No value given for one or more
required parameters.
at
System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS
dbParams, Object& executeResult)
at System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object&
executeResult)
at System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior
behavior, Object& executeResult)
at
System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior
behavior, String method)
at System.Data.OleDb.OleDbCommand.ExecuteReader(CommandBehavior
behavior)
at
System.Data.OleDb.OleDbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior
behavior)
at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset,
DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String
srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
Can anyone please tell me whats wrong iwth the query.
.
- Follow-Ups:
- Re: C# 2.0 + MS Access == Error
- From: Dave Sexton
- Re: C# 2.0 + MS Access == Error
- References:
- C# 2.0 + MS Access == Error
- From: Omer
- Re: C# 2.0 + MS Access == Error
- From: Dave Sexton
- C# 2.0 + MS Access == Error
- Prev by Date: Re: Trying to understand interfaces
- Next by Date: Re: Trying to understand interfaces
- Previous by thread: Re: C# 2.0 + MS Access == Error
- Next by thread: Re: C# 2.0 + MS Access == Error
- Index(es):
Relevant Pages
|