Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio
This is the forum to discuss the Wrox book ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solution by Vincent Varallo; ISBN: 9780470396865
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 19th, 2009, 06:13 PM
Authorized User
 
Join Date: Jun 2009
Posts: 11
Thanks: 1
Thanked 2 Times in 2 Posts
Default Code Generator

Care to tell us where we're supposed to "install" it to use on other projects?

Do I need to add the one produced from the book to every subsequent project I make?

Also, it doesn't seem to work when it loads. Nothing loads in the dropdownlists even though there are connection strings/database connections in the web config.

Can someone give me a step by step on how to go about using it?

Thanks.
  #2 (permalink)  
Old June 28th, 2009, 09:30 PM
Wrox Author
 
Join Date: Jan 2009
Posts: 73
Thanks: 0
Thanked 7 Times in 7 Posts
Default

Page 464 tells you where to save the .vsz files. The should be in the c:\Program Files\Microsoft Visual Studio 9.0\VC#\CSharpProjectItems folder.
The Following User Says Thank You to varallov For This Useful Post:
GenXisT (June 29th, 2009)
  #3 (permalink)  
Old June 29th, 2009, 05:02 PM
Authorized User
 
Join Date: Jun 2009
Posts: 11
Thanks: 1
Thanked 2 Times in 2 Posts
Default

Ok, I was able to work this out to use on the new project I've started using this format.

A follow up question:

In order to use this type of set up in a production environment, would it be best to start a new all-inclusive project and then use the base tables, adding new tables where needed, or would it be better to replicate the base tables in each individual project?

We have several databases going already with data being added daily... but it appears to me that tables such as the ENTUserAccount, or ENTMenuItem, Role, WorkFlow etc would all be the same, over and over.

So I'm thinking that I should start a "BASE" database, include all the "base" tables and go on from there. That way, each dept can have their own workflows/tables/processes and I only have to do most of the stuff once.

Thoughts?
  #4 (permalink)  
Old June 30th, 2009, 07:23 AM
Wrox Author
 
Join Date: Jan 2009
Posts: 73
Thanks: 0
Thanked 7 Times in 7 Posts
Default

I understand where you are coming from. I've done this both ways. I've put the security and menu tables into a common database and added a new table called Application. Each application that uses the common database must have a record in the Application table and then a foreign key must be added to the other tables. For example, the menu items need to be associated with an application so they only show up for the application requesting data.
If you work at a place with a lot of developers you'll need to coordinate the maintenance of the common database with the other developers or have one person control that database.
One of the nice features of having a common database is that you only need to add the users once and then you can associate them with a role for a specific application. This makes maintenance of users easier.
A drawback of this approach is that you now have a single point of failure for all the applications that use this database.
  #5 (permalink)  
Old July 9th, 2009, 12:26 PM
Registered User
 
Join Date: Jul 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am having a similiar problem where the generator does not show anything in the dialog box. It also does not appear as options in the V2.PaidTimeOffBLL V2.PaidTimeOffDAL, or http://localhost/PaidTimeOffUI/ projects.

Does anyone have any guidance?
  #6 (permalink)  
Old October 30th, 2009, 12:21 AM
Registered User
 
Join Date: Oct 2009
Posts: 4
Thanks: 0
Thanked 1 Time in 1 Post
Default

I have the same problem as GenXisT , I see the options, can select them but the connection list box does not list anything except for localsqlserver even though there are other connections. What did I miss in the install?

Thanks in advance
Richard
  #7 (permalink)  
Old October 31st, 2009, 11:15 AM
Registered User
 
Join Date: Oct 2009
Posts: 4
Thanks: 0
Thanked 1 Time in 1 Post
Default

Figured this one out, if you don't have a connection entry in your webconfig you will not get the pick list.

The next problem I ran into was "invalid type" this was due to the fact that a money type was not defined in the generator.

To isolate the problem I added + dr["DataType"].ToString() to the exception code so I could see what the type was.

I added for the SQL (private string GetSQLType(DataRow dr))
case "System.Decimal":
return " money";
and for the C# (private string GetCSharpType(DataRow dr))
case "System.Decimal":
return " decimal";
  #8 (permalink)  
Old November 3rd, 2009, 06:54 AM
Authorized User
 
Join Date: Nov 2009
Posts: 14
Thanks: 4
Thanked 0 Times in 0 Posts
Default Code generator and web.config

Hi,

I'm having a very similar issue. I cannot get anything to appear in the drop downs. I have used the connection strings in the web.config to successfully build test pages etc. I'm using VS2008 Stnd, SQL2005 Exp, on Windows 7 Ultimate and IIS7.

I have tried different app pools and logins for SQL but no luck. I have reverted to windows authorisation for simplicity but no luck in getting any connections to appear in the Database Selector. VSZ file in place with blank lines etc all as page 464.

Any further guidance greatly appreciated.

Gilbo
  #9 (permalink)  
Old November 3rd, 2009, 11:48 AM
Registered User
 
Join Date: Oct 2009
Posts: 4
Thanks: 0
Thanked 1 Time in 1 Post
Default

Don't know if I can help but I will try.

You have a solution that contains a website?

Are you using localhost or an remote website? I am at work now, but from what I remember when I was looking a the code I think "localhost" is where it looks for the web.config.

One thing I did while I was tring to figure this out was to add a new text box to the control and disabled the drop down and the code for populating the drop down and used the text box to manually add the connection string. It worked but....


Richard
The Following User Says Thank You to rbygrave For This Useful Post:
Gilbo79 (November 4th, 2009)
  #10 (permalink)  
Old November 3rd, 2009, 11:52 AM
Authorized User
 
Join Date: Nov 2009
Posts: 14
Thanks: 4
Thanked 0 Times in 0 Posts
Default

Hi Richard,

I was just about to post an update and your right, I was using the internal webserver from VS2008 and as soon as I put the UI on IIS as a virtual directory and application it springs into life.

Andrew
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
BLL Object Created by Code Generator ZeroFactorial BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio 3 March 31st, 2009 10:56 AM
Product code generator yogeshyl Excel VBA 1 October 3rd, 2007 10:50 AM
Code generator and some other things Hyzac BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 13 October 9th, 2006 02:06 PM
The best code documentation generator for .VS 2005 woojtii C# 2005 1 July 3rd, 2006 01:17 PM
XSLT code generator for C# asap XSLT 0 April 14th, 2006 03:54 PM



All times are GMT -4. The time now is 11:56 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.