Re: ADO teething problems




Lyle Fairfield wrote:
My mind is too big to accept the amount of data you attempted to add.
Try inserting or pasting more data ... like the SQL of the Insert Query.

As you wish - although i dont think it will help much. It's one of many
dynamically generated queries based on a set of transalation tables for
transforming data for import into differently shapped database. The
generated SQL works in ADO for other seed values - so it's just really
a case of finding the offending field for this case and trimmimg the
size.
- the confusion is how DAO runs it fine, DoCmd.RunSQL has no problems
and Access query runs it fine. What is ADO's problem?!?

INSERT INTO [COUNTERPARTY]
(
VALID_ON,
STATUS,
LOT_TYPE_FK,
IDE_COUNTERPARTY_REF,
IDE_INTERNAL_PARTY_REF,
IDE_SOURCESYS_REF,
IDE_SWIFT_BIC,
CDE_ECONOMICAL_SECTOR,
CDE_INTERNAL_SECTOR,
CTY_RESIDENCE,
CTY_NATIONALITY,
DES_ADDRESS,
DES_CITY,
DES_LONGNAME,
DES_SHORTNAME,
DES_POSTALCODE,
TYP_CLIENT_STATUS,
TYP_CPTY_TYPE
)
SELECT
[GLOB_CUSTOMER].[VALID_ON],
"0" AS [Constant_2],
"1" AS [Constant_3],
[GLOB_CUSTOMER].[CUSTOMER_NO],
"100010" AS [Constant_5],
"GLOBUS" AS [Constant_6],
[GLOB_CUSTOMER].[BIC],
[MAP_ECONOMICAL_SECTOR].[FIREField],
[GLOB_CUSTOMER].[SECTOR],
[GLOB_CUSTOMER].[RESIDENCE],
[GLOB_CUSTOMER].[NATIONALITY],
[GLOB_CUSTOMER].[STREET],
[GLOB_CUSTOMER].[TOWN_COUNTRY],
[GLOB_CUSTOMER].[SHORT_NAME],
[GLOB_CUSTOMER].[MNEMONIC],
[GLOB_CUSTOMER].[POST_CODE],
"2" AS [Constant_17],
[MAP_CPTY_TYPE].[FIREField]
FROM ((
GLOB_CUSTOMER
LEFT JOIN MAP_ECONOMICAL_SECTOR ON [GLOB_CUSTOMER].[SECTOR] =
[MAP_ECONOMICAL_SECTOR].[GLOBUSField])
LEFT JOIN MAP_CPTY_TYPE ON [GLOB_CUSTOMER].[SECTOR] =
[MAP_CPTY_TYPE].[GLOBUSField]);

.



Relevant Pages

  • Re: Syntax error in INSERT INTO Statement
    ... I dont know what was wrong in my code ... running the query ... >keep a QueryDef set up as an SPT and stuff it w/ an SQL ... >> OrderHeaderId, OrderDetailId, CreatedDate, CreatedBy)" ...
    (microsoft.public.access.queries)
  • Re: Converting Queries to Code
    ... I have tried using this for an update query but with no ... No, not really, but then again, the sql has to be right in the first place. ... code working in the query builder first, and THEN try pasting it into your ...
    (microsoft.public.access.gettingstarted)
  • CSV Download
    ... I have created a script which connects to a SQL DB, runs a query, writes the ... results out to a file (Using FSO) then presents the user with a link to ... As the file contains sensitive data, I dont want to leave the file on the ...
    (microsoft.public.inetserver.asp.general)
  • SELECT STATEMENT
    ... Have you tried making it is a query, then copying the SQL ... from that query and pasting it where you need it? ... CUSTOMERS.CUSTOMER ID AND QUOTE .CUSTOMER ID ARE EQUAL. ...
    (microsoft.public.access.formscoding)
  • RE: Extract certain Columns for Report
    ... is what is needed, I just dont know what to do, I tried sql ... reports ng will bring some resolve, been working on this thing for weeks. ... macro, a query, vba..... ...
    (microsoft.public.access.reports)