Tom,
try
`idStore` int(4) default 0 not NULL
and the others with default '' not null
using the null may save some disk space, not sure, but i do know if
you use them on strings you always have to add stuff to your select
statements like 'where xx='' or xx is null' and it's easy to not get
records, cuz sometimes fields you think are null are not....
and the Int makes the field a 0 (zero) if it's null anyways
i've gotten rid of all my nulls in my gigabytes of databases and have
many less problems now then i did with nulls
-loren
On May 30, 2005, at 6:52 AM, Tom Benson wrote:
I've dumped a fairly hefty mdb database into MySQL (4.0.20a ->
provided by hosting service) with some difficulty, however I'm
having a weird issue with one particular table.
the error is coming back as:
Invalid use of Null - Err.Number:94 - SQL:SELECT idCategoryStart
FROM stores WHERE idStore=1
stores is a VERY basic table, with the schema lifted straight over
from the MDB database.
It looks like this under MySQL:
`idStore` int(4) default NULL,
`storeDescription` varchar(50) default NULL,
`idCategoryStart` int(4) default NULL
and looks like this under JET / MDB
idStore integer(4) precision(10) may defer, unknown
updatable, fixed, may be NULL
storeDescription VarWChar(50) precision(255) may defer,
unknown updatable, can be set to NULL, may be NULL
idCategoryStart integer(4) precision(10) may defer,
unknown updatable, fixed, can be set to NULL, may be NULL
As far as I can tell, these two schema are directly equivalent
Both have the record
1 English 1
The query works fine under the MDB database, but I get the "invalid
use of NULL' under MySQL.
Help me, I'm going insane!
Cheers,
Tom
____________________________________________________
Programming is an art form that fights back.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
_/ | \________________________________
Loren
RB 555P Mac n Win Ide
Einhugarfied and monkey'd up
Tigger 10.4.1 - g5 2g
W2000 on Virt Pc and some junky laptop
discodj a~t mac _ c~o~m
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|