Re: INSERT/SELECT and DataType Mismatch
- From: "Michael Jacobs" <iq193@xxxxxxxxxxxxx>
- Date: Thu, 14 Jul 2005 08:35:38 -0400
Hi Serge,
The columns listed in the 'SELECT' portion of the statement have a colon
(':') at the beginning of their names, this indicates that they are
parameters and not columns selected from a table.
If this is correct, are you setting the 'datatype' and 'values' for the
parameters before executing the SQL statement?
HTH,
Michael
"Serge Myrand" <info@xxxxxxxxxxxxxxxxxx> wrote in message
news:42D544D8.F3A7DD68@xxxxxxxxxxxxxxxxxxxxx
> Hi,
>
> I get a "Datatype mismatch in criteria expression" error when i execute
> this INSERT query. I use Delphi 7 ADO 2.8 jet 4.0 sp8 Access 2002.
> Parameters are in the good order and are of the good data type. Can you
> see anything else wrong with that query.
>
> INSERT INTO CLIENT_SELL_HIST (PART_NO, MOD_TYPE, QTY, QTY_1,
> INCREASED, X_VALUE, FORMAT_STRING, SELL_MESURE_UNIT, REMARK, REV_NO,
> CLIENT_NO)
> SELECT DISTINCT i.PART_NO, :MOD_TYPE, :QTY, :QTY_1, :INCREASED,
> :X_VALUE, FORMAT_STRING, SELL_MESURE_UNIT, :REMARK, i.REV_NO, CLIENT_NO
> FROM CLIENT_SELL AS cs INNER JOIN INVENTORY AS i ON CS.PART_NO =
> i.PART_NO AND
> CS.REV_NO = i.REV_NO
> WHERE i.PART_NO = :PART_NO AND i.REV_NO = :REV_NO AND CLIENT_NO =
> :CLIENT_NO
>
> Thank you very much for your time
> serge
>
>
>
.
- Follow-Ups:
- Re: INSERT/SELECT and DataType Mismatch
- From: Serge Myrand
- Re: INSERT/SELECT and DataType Mismatch
- References:
- INSERT/SELECT and DataType Mismatch
- From: Serge Myrand
- INSERT/SELECT and DataType Mismatch
- Prev by Date: Re: Deleting records from TADOTable
- Next by Date: Re: UpdateBatch - taking a while
- Previous by thread: INSERT/SELECT and DataType Mismatch
- Next by thread: Re: INSERT/SELECT and DataType Mismatch
- Index(es):