Grid View only updates when page refresh

In my application i have a grid view and a save task button. when i click save task my button , the Grid View doesn’t refresh but when i click the refresh button of browser the grid refreshes and automatically add another task in the database. All i want is to refresh the grid when […]

Difference between InitialCatalog and Database Name

I’m amidst “parameterizing” a connection in my package and I’m confused: I’m trying to set the database name but there are two options: 1- InitCatalog Name and 2- Name: Here is what my connection looks like: And my parameter options are (as mentioned 1- InitCatalog Name and 2- Name): and So my question is: which […]

How to implement dynamic parameterized search?

We have relational db (SQL Server 2014, about 30 tables, very normalized). The application is built using Web.API/AngularJS We need to implement dynamic search – user may select a few fields from several entities; the resulting search pseudo-code might look like: SearchConditions ( {Company.Name} <Contains> “Enterprise” ) AND ( {Customer.State} <Equals> “MO” OR {Customer.State} <Equals> […]

SQL Duplicate query counter needing collation

I need some help coming up with a better query. I am trying to count and display the dups in a file based on a string but I need to apply collation so I can tell whether one word maybe capitalized and another not. For example ‘exit’ or ‘Exit’ are not the same. I started […]

To use a Scalar function or Table valued function,in sql server to determine the best

I am using Sql-server 2012 My table definition is: create table products1(pid int,pnm varchar(10),oid int foreign key references orders1(oid)) create table orders1(oid int primary key,onm varchar(10),odt date) insert into products1 values(1,’ABC’,1),(2,’DEF’,2) insert into orders1 values(1,’QTY’,’2013-04-27′),(2,’PROD’,’2015-04-29′) create function dbo.udf_getmaxdt(@a date) returns date as begin select @a=max(o.odt) from orders1 o inner join products1 p on return […]

sp_add_jobstep in SQL Server

I have written this in SQL: EXEC sp_add_jobstep @job_name = N’Every 5 minutes log backup ‘, @step_name = N’set T-sql command’, @subsystem = N’TSQL’, @command=N’DECLARE @fileName NVARCHAR(256) BACKUP LOG MM TO DISK =”F:\BackUp\Log\M-”’ +dbo.UDF_Gregorian_To_Persian_WithDash(cast(GETDATE() as date))+”’-”’+ REPLACE(cast(isnull(convert(char(5), GETDATE(), 108),”””) as nvarchar),”’:”’,”””) + ”’.TRN”’, @retry_attempts = 1, @retry_interval = 1 ; GO but SQL says “Incorrect […]

Trying to get a column value of an ancestor when using HIERARCHYID

I’m evaluating the HIERARCHYID data type to see if it’ll meet my needs for a project. I was hoping to use it to get the manager of a given employee ID. I’m looking at tables in the AdventureWorks DB (the 2012 version), specifically the Person.Person and HumanResources.Employee tables. My query goes something like this: SELECT […]

Create MS SQL Procedure with multiple pass parameters and one output won't work

I’ve made some code in sql server to get random float numbers. It pass rage and out a number, but it shows syntax error. Can someone show me, where it is and how I shoul correct it? That’s my code CREATE PROCEDURE getAmount( @MinVal float, @MaxVal float) @out float OUTPUT AS SELECT @out = ((@MaxVal […]

No suitable driver found in Vaadin project

Yes, it’s that newbie to Vaadin, again. This time, I’m trying to see if I can do one of the most basic of tasks: connect to a database. We use MS SQL Server here (version 2012, I believe) and we’ve been able to connect to it fine in two other Java programs that I’ve written. […]

Using bcp.exe to successfully import data, even if the column order in the format file differs to that of the table

I’ve been creating a system for my team which allows us to automatically generate large amounts of test data so that we can return our database to a consistent state when we need it. This needs to be fully automated, but I currently have one issue that’s preventing that from happening. Our database is created […]

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