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'


> 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.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.