|Microsoft SQL Server 2012, export to sql syntax|
In SQL Server Management Studio in the Object Explorer you can right click
on the table you want to export and select Script Table as > CREATE To >
For the entire database you can right click on the database and select
Tasks > Generate Scripts... and then use the wizard to generate the scripts
for the database objects you wish to script.
|Querying Microsoft SQL Server 2012 70-461 book|
Basically this is just a round-about way of saying that you can only add a
check constraint to a table if none of its existing records would fail that
In this case you have a check constraint to say that the unit price must be
positive. That seems sensible, otherwise you'd be paying people to take the
So if all the unit prices in your table are positive, you can add the
constraint. But if one or more of the unit prices is negative, SQL Server
will not let you add the constraint (since you're basically saying "we know
this to be true for all the data" about something that isn't true).
The last bit of the question in the book is asking whether you would be
able to add the constraint if there were no rows of data in the table.
That's the same as asking whether you can
|C# SendKeys and Microsoft SQL Server Management Studio 2012 (SSMS)|
The SendKeys class is susceptible to timing issues, which some developers
have had to work around. The updated implementation is still susceptible to
timing issues, but is slightly faster and may require changes to the
workarounds. The SendKeys class tries to use the previous implementation
first, and if that fails, uses the new implementation. As a result, the
SendKeys class may behave differently on different operating systems.
Additionally, when the SendKeys class uses the new implementation, the
SendWait method will not wait for messages to be processed when they are
sent to another process.
|white circle in microsoft SQL server management studio 2012|
The white circle usually contains a green arrow, a blue paused symbol, or a
red square - indicating that the SQL Server service is either running,
paused, or stopped respectively.
Usually security is set-up so that only administrators can see the service
status, so regular users don't have access to that information, hence why
SSMS displays an empty white circle, meaning the service is in an
indeterminate state, from its viewpoint - of course if you can connect to
the service and run queries then it has to be running, so don't worry about
See here: http://www.sqlservercentral.com/Forums/Topic825246-146-1.aspx
|Connect with Visual Studio 2012 and C sharp to microsoft cloud TFS server|
Take a look at service credentials, or try enabling alternate credentials
on your account which will then allow you to authenticate using http basic
You probably want service credentials for what it sounds like you are doing
|Developing C# Winforms software using SQL Server 2012 in Visual Studio 2012 and running it on other system without installing SQL Server 2012|
If you develop an application that use Sql Server 2012 as storage for your
data then you need to install it in a way or another. There are numerous
versions of Sql Server, like Sql Server Express and LocalDB. In every case
you need the bits that supports your coding calls.
This magazine article summarizes relevant infos on the various version of
I suppose that the right product for you is Sql Server LocalDB. A version
of Sql Server that could be distributed easily with your application setup
and doesn't require a complex installation procedure.
However, if you don't foresee the need to escalate you application to a
full Client-Server model and you need only a local storage for a single
user, you could choose a single file database like Sql Server Compact
Edition or SQLite or
|InstallShield 2012 - Deploying app with Microsoft Visual C++ 2012 Redistributable?|
This may be related to the operatingsystemconditions configuration in the
Installshield pre-requisite file Microsoft Visual C++ 2012 Redistributable
Package (x86).prq located in the Installshield SetupPrerequisites
The operatingsystemconditions section specifies which versions of Windows,
including service packs, 32/64 bits, the redistributable file should be
To resolve this I copied the operatingsystemconditions section from the
Visual C++ 2010 prq file into the 2012 prq file.
for some more details.
|Microsoft SQL Server 2012 Sequence Not Working - keeps incrementing sequence by 2|
The JDBC string I was using was:
When I changed the string to:
The sequences returned were as expected: 1, 2, 3, etc
|Window Server 2012 & SQL Server 2012 within single VM on Windows Azure|
That should be possible and AFAIK there isn't any restriction for SQL
Server licence to be used in Azure, however take a look at License Mobility
through Software Assurance on Windows Azure.
If your licence is from MSDN, then it now absolutely legal use it on Azure.
If you are unsure about the licence problem and other litigation, you may
spin up a VM with SQL Server 2012 pre-installed and this will solve your
licence trouble (but right now only available with the combo of SQL Server
2012 on Windows Server 2008 R2).
PS / Personal Experience : SQL Server + some server component isn't
performing well for a Medium instance. Either split the server roles or
consider choosing a bigger instance size like xLarge or A6.
|Visual studio 2010 with sql server 2008 (default with vs10) and sql 2012. How can I choose from 2008 or 2012 while adding database in server explorer?|
After the project is created:
Open the database project's properties.
Go to the Project Settings tab.
Change "Target platform" to SQL Server 2008 or whichever option you need.
|SQL Server Express 2012 Installation fails with Could not find the Database Engine startup handle in SQL Server Express 2012|
I have found the solution. It was, in fact, a r/w rights error. I have
added following users to my profile folder:
I know I went overkill here but I wanted to be sure without giving everyone
access rights. I will disable them one by one and find the right one(s)
needed to properly run SQL Server Express 2012.
|How To Make WCF routing service log message to SQL server|
Well I think this was a hard question, anyway I found a way to intercept a
message, this can be applied on any WCF service, you can use the same in
1) create a class library and sign it with strong key.
2)create RoutingServiceBehavior class this class will implement
IServiceBehavior, IDispatchMessageInspector interfaces, the code for
message interception will be in this class:
public class RoutingServiceBehavior : IServiceBehavior,
public object AfterReceiveRequest(ref
|Retrieve fields from SQL Server 2012 in visualstudio 2012 (VB) result = __Page|
In lblID.Text = ID where does the ID come from? It definitely does not
contain anything returned by your SQL query; I would assume you're
assigning the value of the ID property of your Page object here. Try
lblID.Text = SchoolAddress instead.
|Vim print diagnostic message into message buffer AND prevent "press Enter to continue" prompt|
Well, this is cool.
I looked at this documentation:
A later redraw may make the message disappear again.
And since Vim mostly postpones redrawing until it's
finished with a sequence of commands this happens
quite often. To avoid that a command from before the
":echo" causes a redraw afterwards (redraws are often
postponed until you type something), force a redraw
with the :redraw command. Example:
:new | redraw | echo "there is a new window"
The undesired prompting is really Vim trying to be nice, so if we just tell
it what we want, everyone's happy!
Applied it to the plugin (redraw | echom ...) and it works a charm.
|aspx to mvc microsoft visual studio 2012|
MVC is a completely different approach to building web applications. The
biggest difference is the elimination of web controls in favor of more
lighter weight HTML helpers. Since you're asking this question, I am
assuming you may need a better understanding of MVC in order to understand
how to take the business requirements of an existing Web Forms application,
and apply them to an MVC application.
I know your time is limited, but I would suggest going through this
tutorial. Trying to rush your way into a solution without at least this
level of understanding will only do yourself, and your customer, a
|Unable to connect to local database in Visual Studio 2012 express For Web: (error 26)(C#)(SQL Server 2012)|
You're getting that error because the (localDB)v11.0 is already a user
instance of SQL Server. When you were using the SQLEXPRESS SQL Server
instance, well, it's not. So, just get rid of the User Instance=true on the
|Microsoft Visual Studios 2012 Can't open "python33.lib"|
Thanks for all the help David.
For anyone else who runs into this problem, here's what you need to do.
Right click on the Project name (ConsoleApplication1, ect) and under C/C++
general insure that your additional include directories include youe python
include, Lib, and libs folders. As well as the boost root and the boost
Under the linker menu, in the input sub catagory, for additional
dependencies, you'll need to add this into there.
Or whatever your install directory is. As well as any other required files.
Once that's done your project should build.
Once you're ready to run it you'll need to copy whatever .dll files are
needed into the folder where the executable is buil
|non conforming return value for std::chrono::duration::operator%() in Microsoft C++ 2012|
Yes, this is a bug and the fix is available in Visual Studio 2015.
The reason it's an implementation bug comes from dimensional analysis.
Clearly if we subtract seconds from seconds the result is seconds.
seconds = seconds - seconds
And if we divide seconds by seconds, the result is a scalar (a scalar has
scalar = seconds / seconds
And finally one can multiply seconds by a scalar and get seconds.
seconds = seconds * scalar
seconds = scalar * seconds
In [expr.mul]/p4 the standard defines the modulus operator:
... if the quotient a/b is representable in the type of the result,
(a/b)*b + a%b is equal to a ...
Said slightly differently:
a % b = a - (a/b)*b
So a duration % duration has the same units as:
seconds - (seconds/seconds)*seconds
which simplifies do
|Microsoft.Office.Interop.Outlook 2010 Reference in VS 2012 Using .Net 2.0|
You've chosen wrong tab in Reference Manager. Choose this tab:
Then find Microsoft.Office.Interop.Outlook library. If you have multiple
choice, then look at File Version info - there's a version of Office you
can work with: 12.* - 2007, 14.* - 2010, 15.* - 2012.
The best choice is 14.* but the others will mostly work too.
I also need to worry you that Microsoft suggests not to use interop on
server side (link)
|I need to know the ids of inserted,updated,deleted in Microsoft Sql Database 2012 with dates|
This isn't logged anywhere by default unless you either create a mechanism
yourself to store the information or perhaps use Change Data Capture as
Change Data Capture
This allows SQL server to track data that changes in a table and then
exposes the changes via functions that you can call to retrieve the data
that has changed with each sync.
|How can i add reference of Microsoft.ReportViewer.WebForms 184.108.40.206 in visual studio 2012?|
You may add the reference manually in the Project File (.csproj). Add this
line in the section.
Version=220.127.116.11, Culture=neutral, PublicKeyToken=89845dcd8080cc91,
|Microsoft Sync Framework Toolkit with Visual Studio 2012|
a lot of changes, mainly around referencing the correct assembly due to the
changes in .net 4.5 especially around XML and correcting the namespaces.
but not much in terms of changing its behaviour
|How do you add a folder to a project in Microsoft Visual Studio Express 2012 for Web?|
into your blank solution's Solution Explorer, or right click in the
Solution Explorer on the right and hit "Add > Existing Website", then
|This version of Microsoft SQL Server Management Studio Express can only be used to connect to SQL Server 2000 and SQL Server 2005 servers|
I just ran in to this issue as well but then was able to find the solution.
You just need the newer version of SSMSE which is now 2008! Here's the MS
|com.microsoft.sqlserver.jdbc.SQLServerException: The server version is not supported. The target server must be SQL Server 2000 or later|
Try to update your driver to Version 4. Version 3.0 is very old.
Alternatively you can use jTDS JDBC Driver. This is a third-party driver
but supports much more versions of Microsoft SQLServer.
|How Microsoft SAL can prevent off-by-one error|
The correct annotation would be:
_Out_writes_z_(_String_length_(src) + 1) wchar_t *dest,
_In_z_ const wchar_t *src)
However, the analysis is much less precise in this case, since the analyzer
does not know the actual string-length in most cases (tested with VS 2013):
auto in1 = L"12345678901234";
auto in2 = _wcsdup(L"12345678901234");
memcpy_example(out, in1); // SAL warning
memcpy_example(out, in2); // No warning!
|Missing Reference when using the Excel Library with Microsoft visual studio 2012|
I have sort out the problem :)
A default project in Visual Studio 2010 should have references to
Microsoft.CSharp and System.Core.
In 2012, If they are not referenced in your project you need to add them,
and the errors will go away.
|Replace visual studio 2012 Diff tool with winmerge when using Microsoft Git Provider|
Backed up by that DZone-article, the trick is to configure the diff-tool in
Open the git bash in your repository
Create a config section for WinMerge as a diff-tool:
$ git config --local difftool.winmerge.cmd '"C:Program Files
(x86)WinMergeWinMergeU.exe" "$LOCAL" "$REMOTE"'
Configure git to switch to WinMerge as the diff-tool:
$ git config --local diff.tool winmerge
If you want to have this setting as a global setting, replace the --local
switch with --global.
|Issue with Microsoft.Cpp.Win32.user.props when trying to add a shared Property sheet in Visual C++ 2012|
Pretty undiagnosable from the provided info. You are also not exactly
ahead by having to give each project a property sheet, that's actually a
lot more work than editing the setting for each project.
There is a better way, simply select all the projects in the solution
first. Select the first project in the solution and Shift + Click the last
one so they are all selected. Right-click + Properties and change the
|Record Is Deleted message in Microsoft Access VBA|
"Record is deleted" is run-time error 3167 and it can be trapped using
normal On Error handling. This can be verified via VBA code like the
Dim cdb As DAO.Database, rst As DAO.Recordset
Set cdb = CurrentDb
Set rst = cdb.OpenRecordset("SELECT * FROM Table1 WHERE ID=26",
On Error GoTo foo_Error
On Error GoTo 0
Set rst = Nothing
Set cdb = Nothing
MsgBox "Error " & Err.Number & ": " & Err.Description,
vbOKOnly, "Trapped Error"
If you run that code and then "delete the record out from under it" while
the MsgBox is displayed then the rst! reference in the Debug.Print triggers
the run-time error 3167 and the On Error catches it.
Check your code to see if there is an act
|Open WebMatrix SQL Server database in Microsoft SQL Server Management studio|
I need more information to help you, are you having trouble determining the
server or the login or what? You need to login as a user with rights on
that database. Do you know the server name that it was migrated to?
If you are looking for an easy to use tool to convert between mssqlce and
sqlserver try this one:
|Error message "Microsoft Excel cannot access the file c: emp"|
I put "New Worksheet" in Range("A1") on my workbook and this worked just
fine for me.
ActiveWorkbook.SaveAs FileName:="C:Temp" & Range("A1").Value &
I suggest checking to make sure
The path used in FileName is what you intend it to be
The folder you are trying to access exists
The file you're trying to save doesn't already exist
If the file already exists it is not in use by another program
If the file already exists it is not read only
|How to prevent automatic unit test execution in Visual Studio 2012?|
Disable the "Run Tests after Build" setting:
|How can I assert the message of the anticipated exception using Microsoft.VisualStudio.QualityTools.UnitTestFramework?|
No, you are not missing anything. You'll have to try/catch the exception
and examine it yourself.
You may want to consider using a better unit test framework, such as
xUnit.net, which provides a better support for asserting exceptions.
Note, using ExpectedException can be problematic (see the note about this
in "Lessons Learned" at
|Microsoft Fakes & TFS 2012 Visual Studio Test Runner - unit test fail sporadically|
I think I know where the issue lies, the TypeNotFoundException was correct,
at least the corresponding types were not generated (as shown by
Reflector), this made me thinking. More exactly there is only one generated
fake-file generated per assembly lying under [buildName]Binaries- and as
both of my Assemblies faked the same Assembly (backend.dll) - this resulted
most probably in a race condition - the one assembly which was built later
than the other had its final shims/stubs generated; this doesn't clarify
all problems though.
Anyway the reason why this doesn't show up on a regular VS build is because
the assemblies are generated in their respective [assembly]FakeAssemblies
directory, not influencing any other unit test (the way it is supposed to
So my idea to circumvent this prob
|How to get Microsoft.Research.Kinect reference to work for Kinect SDK 1.6 in VS 2012?|
Right-click the "References" folder in your project in VS2012 and browse to
the assemblies you want to reference. In your code, be sure to include
|SQL server 2012 : SQL query to get list of database for which a server is secondary in high availability configuration|
So, I don't have an exact query for you but it shouldn't be too hard to do,
there are 2 DMVs to look at for this:
sys.dm_hadr_availability_group_states - This will tell you about the
availability groups and which servers are primary/secondary replicas for
sys.dm_hadr_database_replica_states - This will tell you about the
databases within each availibility group and what state they are in
Join the two of these together on the group_id column and you will be able
to see what databases are in which availability group and which servers are
acting as primary/secondary replicas.
Links to the docs here:
AlwaysOn Availability Groups Dynamic Management Views and Functions
|Prevent Code Analysis from rebuilding project and dependencies in Visual Studio 2012|
If you are just starting to use code analysis, then you may be mistaking
the symptoms. You are seeing:
1. Code analysis takes a substantial amount of time, and
2. During code analysis, the project builds
You may be combining these two symptoms and reaching the conclusion that
code analysis is forcing a rebuild of your project. This would be a false
assumption. Try this:
Ensure that your projects are configured to not run code analysis upon
Rebuild your solution. Note how long it takes
Build (don't rebuild) your solution, but this time, note how long it takes
You will find that your solution actually "builds", but since the projects
are up to date, the compilers and other tools do not run.
So, it's true that code analysis runs a build of your solution first, but
it will be a
|How to prevent Visual Studio 2012 from creating "obj" and "Debug" folders in the source tree|
Your makefile can specify output directories of both the compiler and
/Fo instructs the C++ compiler to put the .obj files in the obj folder.
Change it in the makefile.
/OUT instructs the Linker to put the output into Debug. Change it in the
|Hyper-V Web Server in Windows Server 2012 Not Accessible Externally|
I was using the wrong port. Because I have another web server running using
up port 443 I had arbitrarily chose to use port 445 for the new web server
and I found out that that is a reserved port. So I switched to port 8080
and opened up the port on the windows firewall and now it's working