in

CodeSmith Community

Your Code. Your Way. Faster!

zip MySQL 5.0 Schema Provider for CodeSmith 3.1.x

Downloads: 1,140 File Size: 52.7kB
Posted By: ChristianASPNET Views: 4,628
Date Added: 12-28-2005
Custom schema provider for MySQL 5.0. The provider takes advantage of the latest MySQL features, including INFORMATION_SCHEMA tables, stored procedures, and so forth.

Be sure to read the included readme.txt for instructions on requirements and how to set up the provider.

Release Notes

Release 0.9.2 : 2006-02-17
  • Updated GetTableKeys() to provide not only the foreign keys for the table but also the foreign keys of other tables that point to the given table. Updated code graciously provided by Douglas R. Steen.  Thanks!
  • Added .NET 2.0 version for CodeSmith 3.2.5 or higher (unless recompiled)
  • .NET 1.1 version requires CodeSmith 3.1.6 (unless recompiled)
Release 0.9.1 : 2005-12-29
  • Added support for Extended Properties CS_IsIdentity
  • Bug fix for GetTableData()
  • Requires CodeSmith v3.1.4
Release 0.9.0 : 2005-11-27
  • Initial Release

Comments

 

eggcaker said:

thanks for you share
07-20-2006 11:48 PM
 

adrianhedley said:

when running the schema test from Codesmith 3.2.7 and i am getting the following error: I have .net v2.0 System.InvalidCastException: Specified cast is not valid. at ChristianASPNet.MySQLSchemaProvider.MySQLSchemaProvider.GetTableIndexes(String connectionString, TableSchema table) at _CodeSmith.SchemaTest_cst.WriteTableIndexes(String table, String cnnString) at _CodeSmith.SchemaTest_cst.WriteTableNames() at _CodeSmith.SchemaTest_cst.__RenderMethod1(TextWriter writer, Control control) at CodeSmith.Engine.DelegateControl.Render(TextWriter writer) at CodeSmith.Engine.Control.RenderChildren(TextWriter writer) at CodeSmith.Engine.CodeTemplate.Render(TextWriter writer) at CodeSmith.Engine.CodeTemplate.RenderToString() at ej.s() any tips pls
02-02-2007 3:59 AM
 

Stoo said:

We had the same problem as adrianhedley above. If you take a look at the source code for the GetTableIndexes. the two lines below (found near the top of the foreach loop) bool isPrimaryKey = ((long)ndxRow["IS_PRIMARY"] == 1); bool isUnique = !((long)ndxRow["NON_UNIQUE"] == 1); Had to be changed to: bool isPrimaryKey = ((int)ndxRow["IS_PRIMARY"] == 1); bool isUnique = !((long)ndxRow["NON_UNIQUE"] == 1); To get this working on our system, I guess it might be to do with the MySQL driver or something that returns a int when a long was expected....or something. Anyways this fixed it for us.
02-09-2007 9:45 AM
 

phosphor said:

Hi I was ownderinf if anyone else had this problem, and if so how they solved it. I started work on writing some SP generation templates for MySQL, and the provider was working, but not it isn't. Now I get the invalid cast operation. I could use some advice on a) Building a schema provider b)debugging a schema provider
02-13-2007 8:43 AM
Copyright © 2008 CodeSmith Tools, LLC
Powered by Community Server (Commercial Edition), by Telligent Systems