realbasic-nug
[Top] [All Lists]

Re: [Database Problem] mdb -> MySQL

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: [Database Problem] mdb -> MySQL
From: Tom Benson <tombenson at mac dot com>
Date: Tue, 31 May 2005 12:57:56 +1000
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <1BB40778E8B10444B742109270B97B0E67AA43 at OWBSW2KVX2 dot jostens dot com>
Yes, I'm using UTE.asp to view my Access DB (I'm on a mac, and the DB's are online) and CocoaMySQL to do same for my MySQL database.

Weirdly I hadn't tried running the statement straight from the viewer until you suggested it. Sure enough it works fine..

There has to be a reason why this is killing my asp script though... There must be some code it is executing when it uses an Access DB (or not executing) that is different from the MySQL execution block, but be damned if I can see it anywhere...

The hunt continues, but thanks heaps for the support Tom. Simple suggestions like this eliminate possibilities, which is a step in the right direction.

Will let you know if I can't track it down. If you don't hear from me in a few days I've probably gone insane....

Cheers,
Tom

________________________________________________________

God is REAL, unless explicitly declared INTEGER.




On 31/05/2005, at 11:37 AM, Dixon, Tom wrote:

Tom,

That does sound very weird!

Do you have any third party tools like EMS MyManager to just view data
and do test queries? What happens when you do 'SELECT * from stores'? Do
you still get the same error.

If you care to send me a SQL Dump I can install the DB and take a look
as a different pair of eyes.

HTH

Tom


Right... mostly because this table is not designed to be
added to outside of development...

I tried what you said anyway just for kicks, but still no go.
Remeber this is a SELECT statement, and a very simple one,
that is causing the error.

Just can't wrap my head around this.. v. weird

Cheers,
Tom

On 31/05/2005, at 12:28 AM, Dixon, Tom wrote:


Hmmm... Why would you want a table that allows one to insert a
completely Null record. If you change your record id "idstore" to
NotNull then this may fix your problem. You probably would

want to set

it to AutoNumber also...

HTH

Tom



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

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


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

<Prev in Thread] Current Thread [Next in Thread>