I have been developing an application in Visual Studio Lightswitch (Silverlight client in VS2010 SP1 if it makes any difference), and so far have done all the database development in the Lightswitch designer.
I now want to use an external database, but don't want to recreate the whole app, or even just the screens. I have scripted the database, and have created a copy in SQL Server, but can't find out how to get Lightswitch to use this external database without starting the whole thing again.
Is there a simple way to change the connection string so that I can carry on from where I am, but have Lightswitch point at the external database instead of the internal one?
Turns out this is a very difficult thing to do. Super Lightswitch-hacker David Baker saw a post I'd made on the subject in the MSDN Lightswitch forum, and kindly offered to have a go at it for me. It took him several goes, but we got there in the end.
I wouldn't recommend this to anyone. I would strongly recommend using an external database right from the start. I can't see much benefit from using the internal one, and if you ever need more control over it, or want to switch to an external one, you've got major problems.
Hope this helps someone.
You must publish your project in order to create a new SQL database , publishing your project will create DB scripts for your new DB , don't use the internal LS DB to create script for your new DB.
Related
I just installed the community version of Delphi, Delphi 10.3
I want to use FireDAC in stead of ADO,
so I want to test connections to SQL Server using FireDac but it is a complete disaster.
I dropped a FDConnection component on the form, and want to configure it to use Sql Server
There I notice I can choose from many DriverNames but not MSSQL
Why is that ?
So I tried the FireDAC Explorer but this has even more mysteries.
I add a new Connection Definition and there I can use MSSQL, but I cannot save this definition.
The save and save as button are disabled.
So I enter all the parameters I need, and yes, it opens my SQL Server database. I can see all tables, views, procedures... And I can even open a table to see the first 10 rows.
Great, if I could only save this definition...
Everytime I open the FireDAC Explorer my new definition is still there, but all parameters are not stored. I have to enter them all every time again.
But, no problem I think. I copy the parameters from the working definition and paste it in the parameters from the FDConnection on my form.
The parameters look like this
User_Name=xx
OSAuthent=No
Server=123.456.789.987\GTT
Database=DB_Test
DriverID=MSSQL
Name=DB_Test
Hm, interesting. Now it does show MSSQL as drivername. So let's set the connection property to true.
Now I get this error (allthough this is working fine in FireDAC Explorer with these parameters)
[FireDAC][Phys]-300. Driver [MSSQL] is not registered. To register it,
you can drop component [TFDPhysMSSQLDriverLink] into your project.
Well alright, if that is all I need to do.
But, it seems I don't have the component TFDPhysMSSQLDriverLink
I have others for all kind of databases, but not this one.
It seems there is something missing, but the errors don't give me much of a clue
So I am hoping there is someone here that understand the errors and can help me to fix this
EDIT
I found this question here with an accepted answer, but I don't know how to use that answer. I have no clue how to use the License manager to register FireDAC
I have very recently started working on Team foundation server and really have limited idea on the subject.
I have been given a problem to solve and I really dont have an idea to proceed.
We are doing a TFS-Sharepoint 2010 integration.
In dev server, the TFS is configured and is pointing to TFS_DefaultCollection database. Now, in TFS, 3 new fields have been added. It points to Field101,Field102 and Field103 columns(I dont know how these columns are created but it seems it is dynamically generated,I suppose, not sure though) of WorkItemLatest table.
Some custom stored procedure is written to insert/update the database table with sharepoint webpart. Now in the stored proc, the developer has referenced Field101,Field102 and Field103 columns.
Now comes the question of deployment this to production. In production, there is already a TFS configured. We have to make changes on top of this. But, when running the sql scripts, we found, naturally, Field101,Field102 and Field103 are not present there. So, what should be our approach which will help us address this issue? Please suggest. Also, please let me know how these 3 fields are created when 3 fields are added in TFS UI? Please help.
You need to use the WITAdmin tool to export the work item type definitions that you want to edit and mahe the changes there. You can find this fully documented on MSDN: http://msdn.microsoft.com/en-us/library/dd236914.aspx
was wondering if it's possible to point the visual web express to a specific folder when it builds the database using entity framework code first. this question stemmed from this one:
mvc connection string code first
anyway, i was able to successfully build the dbase using code first but sql server management studio is looking at a diff folder. is it possible to piont the web express to that folder when creating the database or is it better to just point the sql server management studio to where it's building it to? (does that make sense?) i tried fiddling with the ssms properties but it still won't look at that folder..
It whole depends on the connection string. If you are using default connection string for web application it always creates database in App_Data folder - it is specified by AttachDbFilename=|DataDirectory|DatabaseFileName.mdf. Using this is recommended way if you want your web app to create database because it should have necessary privileges by default.
If you want to place the database "elsewhere" you should not use attached db file and instead let SQL server create database in its default location by calling omitting AttachDbFilename part of the connection string. This can require additional security configuration to allow web application to create the database.
I am currently going through the MvcMusicSore tutorial (MVC 3). I have full sql server 2008 installed and created a local database by running the SqL scripts included in the MvcMusicStore-Assets data folder. However when trying to add the mdf to the AppFolder in Visual Studio 2010 I get the error Access Denied. I am completely stuck at this point and would appreciate any help to resolve this.
Most probably the mdf file is locked by some other process, not allowing the application to read it. If you mounted the database on SQL Server you need to use a connection string with the machine name instead of specifying the mdf file directly.
You can't copy or modify a live working database. And I don't see why you should.
You need connecting to it? Pick a way. LINQ to SQL, Entity Framework, NHibernate, ADO.NET...
If you really want to copy the database file for some reason, you must first stop the MSSQL Service (or detach the database), then do that.
Like others have said, you shouldn't need to add the actual .mdf into your project. If you have it running on your local SQL Server instance, you should be able to add it via Visual Studio's Server Explorer (plus that gets you your connection string).
The situation at the moment is that we have a sharepoint server which started out as a pilot but now actually runs as the production environment. The server on which sharepoint runs is an old machine which does not conforms the standard requirements so I want to move the current environment to the shiny new server.
I've red a lot about migrating the MOSS services, databases and content and stuff but to be honest I am kinda lost in a sea of information and I can't find the right method to do this, I've tried to install MOSS 2007 on the new server as a clean install, restored the databasses on the new server, restored the backup on the new server which I made with Sharepoint Central Administration, alas, I did not worked :-(
Lots of "Can't find this" and "Can't find that" errors...
It should be possible to grab all the data/sites/subsites/databasses/content/documents and everything else and restore that to the new server right?
Anyways, I was hoping for some step-by-step information... :-)
Regards
Erik404
I think I found a way to do a complete migration...
Install a fresh version of MOSS 2007 on the new server (Server_B). Install the features and solutions you have on Server_A. Then use the SPContentDeploymentWizard which can be downloaded for free from CodePlex to make an export of all site content and import these on Server_B. Also backup custom databases needed by features and create these on Server_B.
I do have a almost completly equal server running now, some funky errors pop up now and then so I don't think it's the best way to do it...
Also, custom developed webparts need to be deployed manually to the new server, I didn't find a way to migrate these
You are on the right track. The CodePlex solution is just a wizard GUI of what you would have to do at the command line via stsadm.
Essentially you:
Build the new server w/ all the patches, Service Packs etc that are on the old.
You will want to run a command at the cmd line to scan for and resolve any orphaned sites in your databases on Server A (command slips my mind but you can find it in TechNet - I think it's repair database - something like that)
Limit access to Server A - so you don't have user changes during your migration.
Prepare the databases for migration - another stsadm command - stsadm -o preparetomove
Detach the databases from Server A. Horrible command of -o deletedatabase - it deletes the reference but not the actual database (but still!)
Attach the databases to Server B
You should be good at that point.
As you've discovered - you can't migrate custom code, webparts etc. These need to be reinstalled. One of the reasons that solutions / features are really recommend for customizations.
Also - the search dbs, indexes etc. need to be recreated. You can't bring those over. But that's fairly straightforward - and makes sense when you think about it.
Use these scripts if you need.
http://globaldeploymentmoss2007.blogspot.ca/