getmulti(nothing) crashes on one database not others

Posts   
 
    
tvoss avatar
tvoss
User
Posts: 192
Joined: 07-Dec-2003
# Posted on: 12-Dec-2008 03:42:51   

I have a real problem.

One of my clients has a database that crashes when you do: dim msgs as new communicationcollection msgs.getmulti(nothing)

With the error: Unable to cast object of type 'System.Boolean' to type 'System.String'

On my database the code works fine.

This is crippling the whole application.

Any ideas?

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 12-Dec-2008 03:54:03   

The first obvious question would be: the schema of the databases are equivalent? Also would be nice to track the exception in depth, or at least the offending generated sql, to know what field crashes.

David Elizondo | LLBLGen Support Team
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39859
Joined: 17-Aug-2003
# Posted on: 12-Dec-2008 09:46:16   

I indeed think the schema in the database isn't in sync with the database schema on your development machine, Terry. please enable tracing (see troubleshooting & debugging), then grab the generated query, run it using query analyzer on the target db and see which table is indeed wrong, compare the schema of that table with your version.

Frans Bouma | Lead developer LLBLGen Pro
tvoss avatar
tvoss
User
Posts: 192
Joined: 07-Dec-2003
# Posted on: 13-Dec-2008 00:23:17   

I regened to their database and then all the errors were explicitly mentioned so no problem.

Someone had just changed one field from varchar(255) to bit and dropped 3 relationships between tables.

Thanks for getting the idea to do this into my head simple_smile