#1
  1. No Profile Picture
    Contributing User
    ASP Discoverer (100 - 499 posts)

    Join Date
    Apr 2005
    Posts
    191
    Rep Power
    14

    Query help using microsoft text driver connection


    I'm having trouble setting up my queries using microsoft text driver to pull from a TSV text file. When I do the query:
    Code:
    SELECT EntryDate, Lot, Batch, Product, Operation, Recipe, Route, Entity, TimeNum, Flag, Template, Seg, Diagnostic, Val FROM Excursion.txt
    I pull everything fine with no issues, but when I try to add a condition as such:
    Code:
    SELECT EntryDate, Lot, Batch, Product, Operation, Recipe, Route, Entity, TimeNum, Flag, Template, Seg, Diagnostic, Val FROM Excursion.txt WHERE Flag= " & Flag1
    I get:
    Microsoft OLE DB Provider for ODBC Drivers error '80040e10'

    [Microsoft][ODBC Text Driver] Too few parameters. Expected 1.

    /comm/read_csv2.asp, line 26
    My Schema.ini file contains:
    Code:
    [Excursion.txt]
    Format=TabDelimited
    ColNameHeader=True
    MaxScanRows=0
    Col1=EntryDate DateTime
    Col2=Lot text
    Col3=Batch text
    Col4=Misc text
    Col5=Product text
    Col6=Operation text
    Col7=Recipe text
    Col8=Route text
    Col9=Entity text
    Col10=TimeNum text
    Col11=Flag text
    Col12=Template text
    Col13=Seg text
    Col14=Diagnostic text
    Col15=Val text
    in case that has any relevance. I'm not sure what I'm doing wrong here or why I would have too few parameters just by adding the condition to the query. This never happens to me when using jet engine, but I'm still very new to using the text driver. Any help at all would be a huge help. Thanks in advance. -ST
  2. #2
  3. No Profile Picture
    Contributing User
    ASP Mastermind (5000+ posts)

    Join Date
    Aug 2005
    Location
    North East, UK
    Posts
    6,191
    Rep Power
    141
    If it's text then you need enclose the value in single quotes

Similar Threads

  1. Problem with : Database Connection or Parameters ?
    By Elankathir in forum ASP Development
    Replies: 1
    Last Post: July 1st, 2004, 01:08 AM
  2. Crosstable query returns too many records
    By Palsam in forum ASP Development
    Replies: 7
    Last Post: March 12th, 2004, 09:07 AM
  3. Microsoft ACCESS Database connection error
    By chandhru in forum ASP Development
    Replies: 2
    Last Post: February 21st, 2004, 05:31 AM
  4. Unable to retrieve from a "Query" with Microsoft Access 97!
    By Steve Schofield in forum ASP Development
    Replies: 1
    Last Post: March 1st, 2000, 01:56 PM

IMN logo majestic logo threadwatch logo seochat tools logo