Mike, Does it work correctly in MS Query, but throws an error when doing the download to your application? If so, this seems to be an error in MS's products; they seem to cast the parameter's data type incorrectly. Usually when I've had problems it's because I'm trying to use a parameterized query with a numeric field being one of the parameters. This doesn't seem to be your case, but I'll share what I do anyways. Use the Digits() function to turn your numeric field into an alpha/numeric field and then compare to a character value. In your case, the Where statement should be changed to: Digits(PZBSB) > '00000000' Bill > I'm trying to run a sql statement using ODBC through a VBA. The Database on > the 400 has a Numeric field defined 8.0p(used as a date field). > i've created a SQL statement that lets me select records from the file, > however, when i try to condition the select based on the date field i get > cryptic errors. > > Here is my select statement. > SQLstr = "create view DISPATCH_V as select * from UFDB,UFDBS,UCSRFD where > PZBSB = P1BSB and P1MTR = PWMTR and PZBSB > 0" _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com
As an Amazon Associate we earn from qualifying purchases.
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.