CSLA Gen not showing Database Schemas

11 views
Skip to first unread message

Vinod

unread,
Feb 15, 2007, 3:09:04 AM2/15/07
to CslaGenerator
I will create a google account and post this complete post there.
Kindly note I'm using schemas like Orders, Costing etc. and adventure
works is also doing the same.

Is your code only checking the default schema i.e. dbo, that can be
one of the reasons it is not working..


--------------------------------------------------------------------------------

From: Andrés
Sent: Wednesday, February 14, 2007 6:53 PM
To: Vinod Hotmail
Subject: Re: CSLA Gen

Hi Vinod.
Please ask questions in the group ( http://groups.google.com/group/CslaGenerator
) and not to me directly, so that we can keep a history of issues.

Anyway, are you possibly trying to connect to AdventureWorks??
Someone once told me that AdventureWorks didn't work with cslagen, and
he was right.

As for the reason, I'm clueless, since we internally use a codesmith
dll to read the schema from the db. It is very strange.
Other than that, I work on SQL 2005 and there hasn't been a single DB
that hasn't worked for me (other than adventureworks for some reason)
or anybody else in the group.

Let me know if you can give me more details, and please try sending
messages to the group.

On 2/14/07, Vinod Hotmail wrote:


Dear Andres,


I just downloaded the most recent version of csla gen from google
group.
This is the first time, I'm trying your software.

When I connect to my database, it doesn't show me any error but it is
not
showing any schema.

I tried to contact to my local machine (which is having SQL Server
2005
Developer Edition) and on the Server (which is having SQL Server 2005
standard Edition) but in both cases it is not showing any schemas or
tables.

Can you pls help in this.

Regards,
Vinod


--
Andrés

Ngo, Tien Leok

unread,
Feb 15, 2007, 5:26:00 AM2/15/07
to CslaGe...@googlegroups.com
Just to share my experience with CSLAgen.

I have a few SPs that takes some time to return their result sets. When reading the schema, CSLAgen will timeout on those SPs and they will not show up in the schema tree.

My work around is to clear all the records in the database.

Andrés

unread,
Feb 15, 2007, 9:38:08 AM2/15/07
to CslaGe...@googlegroups.com
Unfortunately, we currently rely on codesmith's schema explorer to gather information from the database. That is -apparently- not checking for tables with other owners, so it's a tough spot.
At the moment there is not much I can do about it. There have always been plans to replace that with something that suited more our needs, but time and lack of resources make that difficult to happen.

The only thing I can think of right now is:
a) Create views that match the tables.
b) Generate from stored procedures.

This is not ideal, but will get you half way there at least. Otherwise, you can try the templates available in CodePlex.

I'm sorry I can't provide a solution for this right now.

Andrés


On 2/15/07, Vinod <vino...@hotmail.com > wrote:

I will create a google account and post this complete post there.
Kindly note I'm using schemas like Orders, Costing etc. and adventure
works is also doing the same.



Is your code only checking the default schema i.e. dbo, that can be
one of the reasons it is not working..





--
Andrés

Vinod

unread,
Feb 17, 2007, 4:59:42 AM2/17/07
to CslaGenerator
i'm using a little dangerous approach and now it is working !!!

I took backup of database and created a script to transfer objects
from individual schemes to dbo and then drop that scheme !!

this way it is working.. once code is generated i will restore the
database from original backup..


On Feb 15, 4:38 pm, "Andrés" <xal1...@gmail.com> wrote:
> Unfortunately, we currently rely on codesmith's schema explorer to gather
> information from the database. That is -apparently- not checking for tables
> with other owners, so it's a tough spot.
> At the moment there is not much I can do about it. There have always been
> plans to replace that with something that suited more our needs, but time
> and lack of resources make that difficult to happen.
>
> The only thing I can think of right now is:
> a) Create views that match the tables.
> b) Generate from stored procedures.
>
> This is not ideal, but will get you half way there at least. Otherwise, you
> can try the templates available in CodePlex.
>
> I'm sorry I can't provide a solution for this right now.
>
> Andrés
>

David A. Leedom

unread,
Feb 17, 2007, 8:02:54 AM2/17/07
to CslaGe...@googlegroups.com
My target database is actually Firebird.  So I create a duplicate schema in SQL Server.  I also replaced the SQL Server objects in the template files with Firebird objects.  The Generated code connects and works with Firebird with not problems.  It is a few extra steps, but a lot less painful than doing it all by hand.
-- 
<hr>
The Hightower Group, Inc.
Custom Software Solutions Designed To Fit Your Business Like A Glove.
Box 50/Lititz, PA 17543
V:717-560-4002, 877-560-4002 x: 114
F:866-349-2306
www.hightowergroup.com

Vinod

unread,
Feb 17, 2007, 8:47:14 AM2/17/07
to CslaGenerator
i have a new problem. as soon as i try to generate objects, it gives a
error report and prompts me whether i want to send report to
microsoft.

following is pasted from that error report..

EventType : clr20r3 P1 : cslagenerator.exe P2 :
1.0.2586.20163
P3 : 45bf5237 P4 : mscorlib P5 : 2.0.0.0 P6 : 4333ab80
P7 : 2c57
P8 : 2e P9 : system.notsupportedexception


On Feb 17, 3:02 pm, "David A. Leedom" <dalee...@hightowergroup.com>
wrote:


> My target database is actually Firebird. So I create a duplicate schema in SQL Server. I also replaced the SQL Server objects in the template files with Firebird objects. The Generated code connects and works with Firebird with not problems. It is a few extra steps, but a lot less painful than doing it all by hand.

> Vinod wrote:i'm using a little dangerous approach and now it is working !!! I took backup of database and created a script to transfer objects from individual schemes to dbo and then drop that scheme !! this way it is working.. once code is generated i will restore the database from original backup.. On Feb 15, 4:38 pm, "Andrés"<xal1...@gmail.com>wrote:Unfortunately, we currently rely on codesmith's schema explorer to gather information from the database. That is -apparently- not checking for tables with other owners, so it's a tough spot. At the moment there is not much I can do about it. There have always been plans to replace that with something that suited more our needs, but time and lack of resources make that difficult to happen. The only thing I can think of right now is: a) Create views that match the tables. b) Generate from stored procedures. This is not ideal, but will get you half way there at least. Otherwise, you can try the templates available in CodePlex. I'm sorry I can't provide a solution for this right now. Andrés On 2/15/07, Vinod<vinodo...@hotmail.com>wrote:I will create a google account and post this complete post there. Kindly note I'm using schemas like Orders, Costing etc. and adventure works is also doing the same.Is your code only checking the default schema i.e. dbo, that can be one of the reasons it is not working..-- Andrés-- <hr> The Hightower Group, Inc. Custom Software Solutions Designed To Fit Your Business Like A Glove. Box 50/Lititz, PA 17543 V:717-560-4002, 877-560-4002 x: 114 F:866-349-2306www.hightowergroup.com

Andrés

unread,
Feb 19, 2007, 8:32:23 AM2/19/07
to CslaGe...@googlegroups.com
That isn't enough information. Could you tell us what you're trying to generate?
Does the app crash and close?
Does it show that in the output window?
What class is it generating when it crashes?
How did you create your class?

On 2/17/07, Vinod <vino...@hotmail.com> wrote:

i have a new problem. as soon as i try to generate objects, it gives a
error report and prompts me whether i want to send report to
microsoft.

following is pasted from that error report..

EventType : clr20r3     P1 : cslagenerator.exe     P2 :
1.0.2586.20163
P3 : 45bf5237     P4 : mscorlib     P5 : 2.0.0.0     P6 : 4333ab80
P7 : 2c57
P8 : 2e     P9 : system.notsupportedexception


--
Andrés

Vinod

unread,
Feb 19, 2007, 10:52:42 AM2/19/07
to CslaGenerator
i have emailed snapshot of error, as you can see i'm simply trying to
generate code and before it can start it is crashing..

This can be due to schemas in database but now i hv moved all my
tables in dbo scheme but still this error is coming.

On Feb 19, 3:32 pm, "Andrés" <xal1...@gmail.com> wrote:
> That isn't enough information. Could you tell us what you're trying to
> generate?
> Does the app crash and close?
> Does it show that in the output window?
> What class is it generating when it crashes?
> How did you create your class?
>

Andrés

unread,
Feb 19, 2007, 12:06:19 PM2/19/07
to CslaGe...@googlegroups.com
It's still not clear what you're trying to do and why it crashes. It's certainly not because of the schemas thing, because you're not using different schemas...
If you want, send the xml file and I'll try to reproduce your error...

Vinod

unread,
Feb 19, 2007, 1:29:47 PM2/19/07
to CslaGenerator
i will have to check what exactly is written in those xml files as i
don't want to share my company's database structure, i will have to
check and get back on this tomorrow. Secondly how the error can be
reproduced if there is no corresponding database..

i just want to repeat what i requested before that pls try to post the
source code as soon as possible on some sharing site. Will highly
appreciate that.

Best part about open source is that all can share idea and make a
stable product which can be useful for all..


On Feb 19, 7:06 pm, "Andrés" <xal1...@gmail.com> wrote:
> It's still not clear what you're trying to do and why it crashes. It's
> certainly not because of the schemas thing, because you're not using
> different schemas...
> If you want, send the xml file and I'll try to reproduce your error...
>

> On 2/19/07, Vinod <vinodo...@hotmail.com> wrote:
>
>
>
>
>
>
>
> > i have emailed snapshot of error, as you can see i'm simply trying to
> > generate code and before it can start it is crashing..
>
> > This can be due to schemas in database but now i hv moved all my
> > tables in dbo scheme but still this error is coming.
>
> > On Feb 19, 3:32 pm, "Andrés" <xal1...@gmail.com> wrote:
> > > That isn't enough information. Could you tell us what you're trying to
> > > generate?
> > > Does the app crash and close?
> > > Does it show that in the output window?
> > > What class is it generating when it crashes?
> > > How did you create your class?
>
> > > On 2/17/07, Vinod <vinodo...@hotmail.com> wrote:
>
> > > > i have a new problem. as soon as i try to generate objects, it gives a
> > > > error report and prompts me whether i want to send report to
> > > > microsoft.
>
> > > > following is pasted from that error report..
>
> > > > EventType : clr20r3 P1 : cslagenerator.exe P2 :
> > > > 1.0.2586.20163
> > > > P3 : 45bf5237 P4 : mscorlib P5 : 2.0.0.0 P6 : 4333ab80
> > > > P7 : 2c57
> > > > P8 : 2e P9 : system.notsupportedexception
>
> > > --
> > > Andrés
>

> --
> Andrés- Hide quoted text -
>
> - Show quoted text -

Andrés

unread,
Feb 19, 2007, 1:43:07 PM2/19/07
to CslaGe...@googlegroups.com
The software doesn't connect to the db while generating classes (I'm not so sure if the same is true for stored procs). Anyway, having the db is not necessary to test that crash, specially if it's happening before starting to generate as you say.

You could also create a different table that mimics the original table and send me a test case for me to reproduce with a different xml and perhaps a create table script...

On 2/19/07, Vinod <vino...@hotmail.com> wrote:

Joakim Hallberg

unread,
Feb 19, 2007, 1:59:34 PM2/19/07
to CslaGe...@googlegroups.com
Have you copied you CSLAGen.exe to the CodeSmith directory.
Have your environment been working before and it's only this xml file that
doesn't work?

Just some questions to shed some light on potential problems.

Sceptical Swede

> -----Original Message-----
> From: CslaGe...@googlegroups.com
> [mailto:CslaGe...@googlegroups.com] On Behalf Of Vinod

Vinod

unread,
Feb 19, 2007, 2:00:25 PM2/19/07
to CslaGenerator
This all is fine. i will try to provide you the files which u need by
tomorrow as i really want to use this software.

you didn't replied on second part of my request about source code...
Don't you think it will be far more comfortable, if i can run the code
in the debugger and test it myself.. instead of transferring all these
files and simulating tables..

On Feb 19, 8:43 pm, "Andrés" <xal1...@gmail.com> wrote:
> The software doesn't connect to the db while generating classes (I'm not so
> sure if the same is true for stored procs). Anyway, having the db is not
> necessary to test that crash, specially if it's happening before starting to
> generate as you say.
>
> You could also create a different table that mimics the original table and
> send me a test case for me to reproduce with a different xml and perhaps a
> create table script...
>

Vinod

unread,
Feb 20, 2007, 11:15:49 AM2/20/07
to CslaGenerator
Pls refer to the snapshot which i emailed. As soon as generate button
is clicked, it pops up the error msg which is shown in snapshot and
then i have to end the program.

It's a normal table and i have even tried out tables with very less
columns like 3 and result is same. Even i have tested it on other
computer and result is same. I'm trying to generate vb code..

> > - Show quoted text -- Hide quoted text -

Reply all
Reply to author
Forward
0 new messages