Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!nstn.ns.ca!news.cs.indiana.edu!samsung!zaphod.mps.ohio-state.edu!swrinde!elroy.jpl.nasa.gov!ames!uhccux!bigtuna!pegasus!tleylan From: tleylan@pegasus.com (Tom Leylan) Newsgroups: comp.databases Subject: Re: Clipper 'S87 TYPE MISMATCH Keywords: TYPE MISMATCH Message-ID: <1991Jan28.125745.19241@pegasus.com> Date: 28 Jan 91 12:57:45 GMT References: <1991Jan25.031035.4546@micor.OCUnix.On.Ca> Organization: Pegasus, Honolulu Lines: 29 In article <1991Jan25.031035.4546@micor.OCUnix.On.Ca> mcormier@micor.OCUnix.On.Ca (Michel B. Cormier) writes: > >I have a routine that basically does a SELECT JUNKY (the databases are all >opened a long time before) followed by some more works. This routines works >MOST of the time. In one particular instance however I get a >TYPE MISMATCH ERROR on the select statement. Changing that particular >SELECT to SELECT 8 makes the problem vanish. Also, marking at least one >record as non-deleted (which I don't want to do) solves the problem. > Michel, It has to be something major that is in your code since it isn't caused by anything Clipper is doing wrong. For the most part you will want to always reference a file by it's alias. The only reason I can see that you lose an alias is that the file got closed somehow. Could it be that it doesn't happen when you're testing the SELECT 8 but that if you used the program longer it might ? You can setup a test as you enter the module and before you do the SELECT command. Add a line similar to @ 0, 0 SAY JUNKY->(USED()) which will print a .T. or .F. in the corner of the screen. JUNKY by the way has to be an ALIAS and not a string variable, you wouldn't happen to be doing JUNKY = "myfile" USE &JUNKY. are you ? Keep looking, trace through your code. tom leylan ex-senior systems analyst / Nantucket Corp.