The sections below will help guide you through using and configuring various Schema Providers that ship with CodeSmith Generator.
...
CodeSmith Generator
...
.
Creating a new connection string
...
For all SchemaProviders, please be sure to use the proper ConnectionString for the Database Provider you are using. A great resource for building database ConnectionStrings can be found here.
Configuring Schema Providers behavior
A schema provider may contain additional configurable logic that changes how the schema provider behaves. For example, you may only want to show the various schema objects for the current logged in user or allow CommandResultSchema information to be retrieved.
These settings can be configured in the Generator Options Schema Provider section as shown above.
Oracle Schema Provider
If you are trying to use the Oracle Schema Provider you may be presented with an error message that states a BadImageFormatException was thrown. This can be resolved by installing the ODAC libraries.
...
Installing Oracle Data Access Components (ODAC)
Warning |
---|
CodeSmith Generator is compiled as AnyCPU. This means that Generator will run as a 64bit process when you launch Generator outside of Visual Studio. If you are generating from within Visual Studio (32bit process), then CodeSmith Generator libraries will run as a 32bit process. This is very important to understand as it determines which Schema Provider dependencies are resolved at run-time. |
If you are trying to use the Oracle Schema Provider you may be presented with an error message that states a BadImageFormatException was thrown. This can be resolved by installing the ODAC libraries.
...
Installing System.Data.SQLite
Info |
---|
Warning |
CodeSmith Generator is compiled as AnyCPU. This means that Generator will run as a 64bit process when you launch Generator outside of Visual Studio. If you are generating from within Visual Studio (32bit process), then CodeSmith Generator libraries will run as a 32bit process. This is very important to understand as it determines which Schema Provider dependencies are resolved at run-time. |
The first step is to ensure that you download and install the latest .NET Framework 4.0 version of System.Data.SQLite.
Info |
---|
If you are running a 64bit version of windows, please install both the 32bit and 64bit versions. |
Info |
---|
You can skip the following configuration steps if you install the legacy version of System.Data.SQLite here. The older version configures itself by adding entries into your machine.config. |
...
The .NET Framework 4.0 machine.config's can be found here:
- %windir%\Microsoft.NET\Framework\v4.0.30319\Config\machine.config
- %windir%\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config
Info |
---|
You should copy the 64bit SQLite assemblies if you are using 64 bit windows. |
Finally, you are ready to start using the SQLite Schema Provider!