SIMONBRATT
asked on
DATABASE DATA TYPES
in vb5, using a database i created in access 97, i am having
trouble with data types when i use the refresh command.
Basically, in vb5 i've defined a integer variable (a%), assigned it a number, (a=4),
Now, i have a field in a access database with the data type 'number' containing only whole numbers
When i use, in vb5, an SQL to search the database using the variable 'a' (insted of putting a number in)
ie SELECT * FROM table WHERE field1 = '" & a & "'"
the use a refresh command, it comes up with a data type error
If i change the field data type in access to be 'text' it works but i don't want to, or if i change
the SQL to field=2 it works but whats wrong with how i want to do it.
trouble with data types when i use the refresh command.
Basically, in vb5 i've defined a integer variable (a%), assigned it a number, (a=4),
Now, i have a field in a access database with the data type 'number' containing only whole numbers
When i use, in vb5, an SQL to search the database using the variable 'a' (insted of putting a number in)
ie SELECT * FROM table WHERE field1 = '" & a & "'"
the use a refresh command, it comes up with a data type error
If i change the field data type in access to be 'text' it works but i don't want to, or if i change
the SQL to field=2 it works but whats wrong with how i want to do it.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER