Sample Data Installer Class


Author
Message
Terry Bottorff
Terry Bottorff
Advanced StrataFrame User (676 reputation)Advanced StrataFrame User (676 reputation)Advanced StrataFrame User (676 reputation)Advanced StrataFrame User (676 reputation)Advanced StrataFrame User (676 reputation)Advanced StrataFrame User (676 reputation)Advanced StrataFrame User (676 reputation)Advanced StrataFrame User (676 reputation)Advanced StrataFrame User (676 reputation)
Group: Forum Members
Posts: 448, Visits: 12K
Cool. Great. Thank You.
Edhy Rijo
E
StrataFrame VIP (3.8K reputation)StrataFrame VIP (3.8K reputation)StrataFrame VIP (3.8K reputation)StrataFrame VIP (3.8K reputation)StrataFrame VIP (3.8K reputation)StrataFrame VIP (3.8K reputation)StrataFrame VIP (3.8K reputation)StrataFrame VIP (3.8K reputation)StrataFrame VIP (3.8K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Terry Bottorff (9/19/2012)
That all makes sense but do you change the default location so when you use DDT it put the database where you want it or how do you make sure your data get's to the where you want it?

Yes, I change the location so me and most important the customer knows where the database is located.  DDT will either create or update the database based on the setup location in SQL Server configuration.

Edhy Rijo

Terry Bottorff
Terry Bottorff
Advanced StrataFrame User (676 reputation)Advanced StrataFrame User (676 reputation)Advanced StrataFrame User (676 reputation)Advanced StrataFrame User (676 reputation)Advanced StrataFrame User (676 reputation)Advanced StrataFrame User (676 reputation)Advanced StrataFrame User (676 reputation)Advanced StrataFrame User (676 reputation)Advanced StrataFrame User (676 reputation)
Group: Forum Members
Posts: 448, Visits: 12K
Alright, thank you for the great explanation. That all makes sense but do you change the default location so when you use DDT it put the database where you want it or how do you make sure your data get's to the where you want it?

Also, the backup piece of software is great. Thanks........
Edhy Rijo
E
StrataFrame VIP (3.8K reputation)StrataFrame VIP (3.8K reputation)StrataFrame VIP (3.8K reputation)StrataFrame VIP (3.8K reputation)StrataFrame VIP (3.8K reputation)StrataFrame VIP (3.8K reputation)StrataFrame VIP (3.8K reputation)StrataFrame VIP (3.8K reputation)StrataFrame VIP (3.8K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi Terry,

Terry Bottorff (9/18/2012)
If the database already exists will DDT honor where it is found?

Yes.

Basically the rules is this, MS-SQL Server is responsible to handle the location of the databases (see attached image), the DBA or person in that role can configure the path where the database would be located, but a client application will not or should not even know anything about where the database file is located for security purpose, so the DDT has not way to create a database in a predefined path that may not even exist in the SQL Server.

What I normally do, is that since I am mostly the one to even install MS-SQL Express at the customer site, I create a data folder in the best drive possible and name it something like E:\MS-SQL Data Files, then at that point I let the customer know where the file is so they can do daily backups using the free program SQL Backup and FTP, this program is just a jewel because I can automate backups for up to 2 databases with free version and even upload the backup to an FTP site and get an email confirmation with status daily.

Edhy Rijo

Terry Bottorff
Terry Bottorff
Advanced StrataFrame User (676 reputation)Advanced StrataFrame User (676 reputation)Advanced StrataFrame User (676 reputation)Advanced StrataFrame User (676 reputation)Advanced StrataFrame User (676 reputation)Advanced StrataFrame User (676 reputation)Advanced StrataFrame User (676 reputation)Advanced StrataFrame User (676 reputation)Advanced StrataFrame User (676 reputation)
Group: Forum Members
Posts: 448, Visits: 12K
I was talking about using DDT. Therefore, I just need to know where to tell the client to look for the Database when they run the program the first time.

If the database already exists will DDT honor where it is found or will it also put it in the SQL Server Instance pre-defined default database location?

TIA.
Trent Taylor
Trent Taylor
StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K 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.
Terry Bottorff
Terry Bottorff
Advanced StrataFrame User (676 reputation)Advanced StrataFrame User (676 reputation)Advanced StrataFrame User (676 reputation)Advanced StrataFrame User (676 reputation)Advanced StrataFrame User (676 reputation)Advanced StrataFrame User (676 reputation)Advanced StrataFrame User (676 reputation)Advanced StrataFrame User (676 reputation)Advanced StrataFrame User (676 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.
Terry Bottorff
Terry Bottorff
Advanced StrataFrame User (676 reputation)Advanced StrataFrame User (676 reputation)Advanced StrataFrame User (676 reputation)Advanced StrataFrame User (676 reputation)Advanced StrataFrame User (676 reputation)Advanced StrataFrame User (676 reputation)Advanced StrataFrame User (676 reputation)Advanced StrataFrame User (676 reputation)Advanced StrataFrame User (676 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.
Trent Taylor
Trent Taylor
StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K 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 (676 reputation)Advanced StrataFrame User (676 reputation)Advanced StrataFrame User (676 reputation)Advanced StrataFrame User (676 reputation)Advanced StrataFrame User (676 reputation)Advanced StrataFrame User (676 reputation)Advanced StrataFrame User (676 reputation)Advanced StrataFrame User (676 reputation)Advanced StrataFrame User (676 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?
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