Using number data type parameters 
Author Message
 Using number data type parameters

I keep getting an error message trying to design a report that uses a
number data type parameter in the query.

This query:
SELECT
    BankNumber.`Username`, BankNumber.`AccountNumber`,
BankNumber.`Checking`, BankNumber.`Savings`,
    Deposit.`Number`, Deposit.`Deposit`
FROM
    `BankNumber` BankNumber INNER JOIN `Deposit` Deposit ON
        BankNumber.`Username` = Deposit.`Username`
WHERE
    BankNumber.`Username` = '{?Name}' AND
    Deposit.`Number` >= 1 AND
    Deposit.`Number` <= 10

Works fine, the "Name" parameter field is accepted and used to run the
query... but if I try to sub in parameters for the numbers below that:

SELECT
    BankNumber.`Username`, BankNumber.`AccountNumber`,
BankNumber.`Checking`, BankNumber.`Savings`,
    Deposit.`Number`, Deposit.`Deposit`
FROM
    `BankNumber` BankNumber INNER JOIN `Deposit` Deposit ON
        BankNumber.`Username` = Deposit.`Username`
WHERE
    BankNumber.`Username` = '{?Name}' AND
    Deposit.`Number` >= {?RangeA} AND
    Deposit.`Number` <= {?RangeB}
ORDER BY

This produces an ODBC error message, I've tried this on two seperate
data bases (one SQL Server 7, the other Access97). In the Access97
database the field "Number" is setup as a Number data type, in the SQL7
database the field "Number" is setup as a Int data type.

Can anyone recommend a work around?

Sent via Deja.com http://www.*-*-*.com/
Share what you know. Learn what you don't.



Wed, 12 Dec 2001 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Using ADODB.Parameters and SQL Text Data type

2. host data type in data environment command parameters

3. Passing Parameters to stored parameter queries using VB 5's Data Controls

4. Data Types when using Access Types in VB6

5. Using types in a different assembly given that the type may be used or not used

6. Data Types using the Data Object

7. Passing Array or a user defined data type as a parameter to a storedprocedure in Oracle

8. data types in parameter query

9. Data types that retunrn whol number vlaues

10. Response.Write and Number data-type

11. VB 5.0 and Inter-language Data Type Conversions (COBOL) and Parameter Passing

12. menu control array = what parameter data type?

 

 
Powered by phpBB® Forum Software