Tag: .net

how to import excel to sql unknown data

How to Import unknown data recorded from excel to SQL Server I have a C# web-based project that the users must upload a excel sheet and I need to store the data from that excel sheet to the SQL Server. there is a note that the users records is unknown and please show me a […]

Design: Mixed XML / Relational or Pure Relational?

Is it acceptable to model a very complex object graph using XML in the database, but leave the rest of a system in relational tables? I’d like to gauge opinion on this as I’ve hit a bit of a conundrum. Many thanks ——————– Background I’m building a financial application which, although not at all large […]

Message Queue MQ , Tibco, SQL Server

Can we use SQL Service Broker for Message Queue instead of MSMQ or IMB MQ or Tibco Business scenario is reading multiple prices from different data sources (API, FIX protocol, database and so on) into SQL server Database.

Can you backup a local SQL Server database with a “BACKUP DATABASE” script?

The problem is… I have a small windows form application running .NET 4.0 Framework and a local SQL Server 2012 database file to store the data (.MDF file). This database is not being used in relation with SQL Server and is being managed through the Visual Studio Server Explorer. The task that I have is […]

Azure 2.3 SDK offline

Is there a way to get offline “Azure SDK 2.3” (VWDOrVs2013AzurePack.2E2.2E3) I’m behind a firewall and impossible to download. Same problem with (SSDTSetup) “SQL Server Data Tools”. I read there is no offline installer but is it possible to create one ? Thanks,

Create a database user and login programatically

I feel like I’ve got something really basic wrong. I can’t seem to use parameters to add a user. The following fails with Incorrect syntax near ‘@x’ : var Cmd = new SqlCommand(“CREATE LOGIN @x FROM WINDOWS; CREATE USER @x FOR LOGIN @x”, SqlConn); Cmd.Parameters.AddWithValue(“@x”, user); Cmd.ExecuteNonQuery(); Yet, this works: var Cmd = new SqlCommand(“CREATE […]

LINQ Join Tables from Different Database or DataaContext

var possibleTPMs = (from ui in db1.Users from org in db2.Orgs.Where(o => o.OrgId == ui.OrgId && !o.DeletedFlag).DefaultIfEmpty() where !ui.DeletedFlag && ui.ActiveFlag && ui.OrgId == 1 && ui.UserId != 1 select new { ui.UserId, ui.LastName, ui.FirstName }).ToList(); Above is sample LINQ but having an errors, How can I join these two tables that came from two […]

SQL Profiler Import Template via CMD Line

We are just creating a simple utility for our users to fire off a trace on their SQL Server Database. The App just takes their server connection details and they click start trace. Under the hood it fire the following profiler command line: profiler /S MY-LAPTOP /U sa /P Admin123 /T “Tracer2008” /O “C:\Trace.trc” /M […]

SQL CLR generated file in wrong order

I have a very simple SQL Project in Visual Studio 2013 but cannot publish to another database. Within the obj folder it generates the “MYPROJECT.generated.sql” file, but the Microsoft.SqlServer.Server attributes are outputted above the CREATE ASSEMBLY. CREATE PROCEDURE …. AS EXTERNAL NAME [MyProject].[StoredProcedures].[MyMethod] GO CREATE TRIGGER …. FOR INSERT AS EXTERNAL NAME [MyProject].[Triggers].[MyTrigger] GO CREATE […]

Getting error when an SQL Service Provider is set on the App.config by the Entity Framework

My class and I were building an application using Visual Studio 2012 and the Entity Framework, and at the time when we wanted to compile the program, it was giving us an error described below: A first chance exception of type ‘System.TypeInitializationException’ occurred in EntityFramework.dll A first chance exception of type ‘System.TypeInitializationException’ occurred in UPC.Cerberos.DL.DALC.dll […]

MS SQL Server is a Microsoft SQL Database product, include sql server standard, sql server management studio, sql server express and so on.