Text import works in Access but not in code - parameters issue?

From: Radu Stanciu (urgur_at_home.ro)
Date: 03/29/05

  • Next message: bill: "TADOStoredProc and XML"
    Date: Tue, 29 Mar 2005 19:32:40 +0200
    
    

    Hi,

    I'm having a strange issue with importing a csv file into an access
    database. This is the query I'm using:

    SELECT * FROM [Text;DATABASE=D:\test].[file.txt]

    And more complete, it's CREATE VIEW My_View AS SELECT * FROM
    [Text;DATABASE=D:\test].[file.txt], but let's stick to the select for now.

    When I run that query from access, it works ok, all the fields are
    imported just right. When I'm using Delphi to run it (tried both ADO 2.7
    and 2.8 versions), it gives me the following error: "Parameter object is
    improperly defined. Inconsistent or incomplete information was
    provided". I also made a schema.ini file which takes care of all the
    formatting options, and I know it's ok since it works from access.

    Why do I get that error when running it from code? Any ideas? Also, as a
    side question, any idea why can't I use CREATE VIEW in a query from
    inside access? It keeps bugging me about the CREATE TABLE syntax,
    although I'm using CREATE VIEW.

    Thanks,

    Radu Stanciu


  • Next message: bill: "TADOStoredProc and XML"

    Relevant Pages

    • RE: Showing data based on other values
      ... Importing and linking have two different purposes. ... data not in the local database and that you do not want in the database. ... To create an append query you start out creating a regular ...
      (microsoft.public.access.dataaccess.pages)
    • Re: Best design for importing montlhly data
      ... Can I link excel files to the database even if the xls is a new file each ... should I run a make table query and overwrite it? ... If the data you are importing ... I have basically the same question for the excel files. ...
      (microsoft.public.access.tablesdbdesign)
    • Re: Running Update Macro disables switchboard
      ... What are the reports and query that you are deleing and importing? ... The macro begins with 'setwarnings' to 'no,' and echo turned off. ... As mentioned in my first message, I placed a final line in to close the database, as a work around. ...
      (microsoft.public.access.macros)
    • RE: Auto Numbering
      ... importing to Excel on my mind. ... Select Queries in the database window. ... Select all fields and drag into the query matrix. ... "Andrea Stimson" wrote: ...
      (microsoft.public.access.tablesdbdesign)
    • Re: SQL Delete Function
      ... >an access database, overwriting the information from the previous week. ... >spreadsheet contains duplicate entries for some lines however. ... >importing the data, a macro runs a query that displays all lines that are ...
      (microsoft.public.access.gettingstarted)