Sample Data Installer Class


Author
Message
Terry Bottorff
Terry Bottorff
Advanced StrataFrame User (656 reputation)Advanced StrataFrame User (656 reputation)Advanced StrataFrame User (656 reputation)Advanced StrataFrame User (656 reputation)Advanced StrataFrame User (656 reputation)Advanced StrataFrame User (656 reputation)Advanced StrataFrame User (656 reputation)Advanced StrataFrame User (656 reputation)Advanced StrataFrame User (656 reputation)
Group: Forum Members
Posts: 448, Visits: 12K
I am trying to use the "SampleDataInstallerClass" but the syntac for most of the statements are incorrect. Of course I am using one I found on the forum from a long time ago. Is there one later that will work with VS2010?

TIA.
Terry Bottorff
Terry Bottorff
Advanced StrataFrame User (656 reputation)Advanced StrataFrame User (656 reputation)Advanced StrataFrame User (656 reputation)Advanced StrataFrame User (656 reputation)Advanced StrataFrame User (656 reputation)Advanced StrataFrame User (656 reputation)Advanced StrataFrame User (656 reputation)Advanced StrataFrame User (656 reputation)Advanced StrataFrame User (656 reputation)
Group: Forum Members
Posts: 448, Visits: 12K
As a follow up. These statements do not work.

 

Dim loDeploy As MicroFour.StrataFrame.DBEngine.Deployment.MDDeployMain



'-- Create the deployment form

loDeploy =

New MicroFour.StrataFrame.DBEngine.Deployment.MDDeployMain(lcPath & "StrataFrameSample.pkg", "framework")


Edhy Rijo
E
StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi Terry,

Make sure you add the MicroFour StrataFrame DBEngine assembly to your project.

Edhy Rijo

Terry Bottorff
Terry Bottorff
Advanced StrataFrame User (656 reputation)Advanced StrataFrame User (656 reputation)Advanced StrataFrame User (656 reputation)Advanced StrataFrame User (656 reputation)Advanced StrataFrame User (656 reputation)Advanced StrataFrame User (656 reputation)Advanced StrataFrame User (656 reputation)Advanced StrataFrame User (656 reputation)Advanced StrataFrame User (656 reputation)
Group: Forum Members
Posts: 448, Visits: 12K
I'll do that as soon as I get back to my machine. Thank you and I'll let you know what happens.
Terry Bottorff
Terry Bottorff
Advanced StrataFrame User (656 reputation)Advanced StrataFrame User (656 reputation)Advanced StrataFrame User (656 reputation)Advanced StrataFrame User (656 reputation)Advanced StrataFrame User (656 reputation)Advanced StrataFrame User (656 reputation)Advanced StrataFrame User (656 reputation)Advanced StrataFrame User (656 reputation)Advanced StrataFrame User (656 reputation)
Group: Forum Members
Posts: 448, Visits: 12K
These are the Imports for This Project.

MicroFour.StrataFrame.Strings.StringBasics

MicroFour.StrataFrame.DBEngine

MicroFour.StrataFrame.DBEngine.SQL.SQLManagerEventArgs

 

But These are All of the Errors I am getting now. Ug.... Oh and by the way I am now trying to use the sample I found with my current version of SF 1.7



Error      6              'DatabaseMigrator' is notdeclared. It may be inaccessible due to its protection level.

1                    The primary reference "MicroFourStrataFrame DBEngine, Version=1.7.0.0, Culture=neutral,PublicKeyToken=99fe9917f71608a7, processorArchitecture=MSIL" could not beresolved because it has an indirect dependency on the framework assembly"System.Core, Version=3.5.0.0, Culture=neutral,PublicKeyToken=b77a5c561934e089" which could not be resolved in thecurrently targeted framework. ".NETFramework,Version=v2.0". Toresolve this problem, either remove the reference "MicroFour StrataFrameDBEngine, Version=1.7.0.0, Culture=neutral, PublicKeyToken=99fe9917f71608a7,processorArchitecture=MSIL" or retarget your application to a frameworkversion which contains "System.Core, Version=3.5.0.0, Culture=neutral,PublicKeyToken=b77a5c561934e089".

2                    Error              3              Type 'DatabaseMigrator' is notdefined.               

3                    Error              4              Type 'DatabaseMigrator' is notdefined

4            Error      5              Type 'DeployDataInfo' is notdefined.

 Error     7              Type'MicroFour.StrataFrame.DBEngine.SQL.SQLManagerEventArgs' is not defined.

Error      8              Type'MicroFour.StrataFrame.DBEngine.SQL.SQLManagerEventArgs' is not defined.

Error      9              Type'MicroFour.StrataFrame.DBEngine.SQL.SQLManagerEventArgs' is not defined.

Error      10           Type'MicroFour.StrataFrame.DBEngine.SQL.SQLManagerEventArgs' is not defined.       

Error      11           Type'MicroFour.StrataFrame.DBEngine.SQL.SQLManagerEventArgs' is not defined.

Error      2              Type 'SQL.DatabaseMigrator' is notdefined.


Terry Bottorff
Terry Bottorff
Advanced StrataFrame User (656 reputation)Advanced StrataFrame User (656 reputation)Advanced StrataFrame User (656 reputation)Advanced StrataFrame User (656 reputation)Advanced StrataFrame User (656 reputation)Advanced StrataFrame User (656 reputation)Advanced StrataFrame User (656 reputation)Advanced StrataFrame User (656 reputation)Advanced StrataFrame User (656 reputation)
Group: Forum Members
Posts: 448, Visits: 12K
I have another question. Is there a way to control where the Database end up? In other words, can I direct it to a specific subdirectory?
Trent Taylor
Trent Taylor
StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Terry:

The stack trace message is a fairly straight forward one.  If you look at it, it is a .NET 3.5 / .NET 2.0 reference issue.  StrataFrame is compiled in .NET 2.0 out of the box, but if you have downloaded the source, you can compile it for .NET 3.5, which you may have.  There is nothing wrong with this, but you will need to make your downstream projects match the target version of .NET.  For example, you sample project needs to be changed to a .NET 3.5 project if you leave it like this.

You can set the target version.  In VB.NET, it looks like this:

http://forum.strataframe.net/Uploads/Images/1c4e012d-4305-4e18-82a9-8b75.png

You get to it through the Advanced Compiler Options:

  1. Right click on your project
  2. Go to Properties
  3. Click on the Compile tab on the left
  4. Click Advanced Compile Options at the bottom
  5. Set the desired framework
In CSharp, it is actually easier to set.

  1. Right click on your project
  2. Go to properties
  3. Click on the Application tab
  4. You will see the target version right on the application page

Terry Bottorff
Terry Bottorff
Advanced StrataFrame User (656 reputation)Advanced StrataFrame User (656 reputation)Advanced StrataFrame User (656 reputation)Advanced StrataFrame User (656 reputation)Advanced StrataFrame User (656 reputation)Advanced StrataFrame User (656 reputation)Advanced StrataFrame User (656 reputation)Advanced StrataFrame User (656 reputation)Advanced StrataFrame User (656 reputation)
Group: Forum Members
Posts: 448, Visits: 12K
I thought I tried that but I will have another look at it and let you know.

Thank you so much.
Terry Bottorff
Terry Bottorff
Advanced StrataFrame User (656 reputation)Advanced StrataFrame User (656 reputation)Advanced StrataFrame User (656 reputation)Advanced StrataFrame User (656 reputation)Advanced StrataFrame User (656 reputation)Advanced StrataFrame User (656 reputation)Advanced StrataFrame User (656 reputation)Advanced StrataFrame User (656 reputation)Advanced StrataFrame User (656 reputation)
Group: Forum Members
Posts: 448, Visits: 12K
There are 2 projects in the solution. I changed the .Net on one of the solutions to 3.5 but not the other. Op's...... Now it Works.

But I still have the question, Is there a way to make sure that the database ends up an a particular subdirectory? If I copy the pkg to C:\test and run the Sample Data Installer Class on that pkg in that subdirectory is that where the Database will end up?

TIA.

And Thanks for the help on .Net 3.5 Version.
Trent Taylor
Trent Taylor
StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Are you wanting to know how to make a database end up in a certain directory when you create it through the DDT or if you are just restoring it using a BAK or reattaching an MDF?  In the latter two, as long as the databases are local, you can specify any directory you want.  When you create a new database through transact SQL, then you can use the "ON" command as part of the CREATE DATABASE:

CREATE DATABASE database_snapshot_name     ON     (        NAME = logical_file_name,        FILENAME = 'os_file_name'     Wink [ ,...n ]


Refer here for more details about the CREATE DATABASE:

http://msdn.microsoft.com/en-us/library/ms176061.aspx

If you are using the DDT, then no.  It will use the SQL Server Instance pre-defined default database location when the databases are created.  Hope that this helps.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search