Questions tagged as 'sql-server'

1
answer

Can a trigger "undo / undo" the triggering action?

Example scenario I have a telefones table where I have a trigger statement that is triggered when executing the insert statement. Doubt Can I use the trigger to check a condition and upon return, "cancel" the actio...
asked by 06.09.2018 / 01:42
1
answer

How to insert records through cursor?

I need to insert unique records by a field that has the unique identifier, with this I am using cursor; however, the unique identifier will not add according to the inserts. ERROR: You are duplicating and inserting only the first record....
asked by 28.12.2018 / 12:11
1
answer

Could not perform the edit because another user changed the record

Does anyone know if there is any trace of a table that is dropped from a bank? To facilitate if it is recreated, for example, and when I say trace is in the bowels of the same bank. I'm going through that famous problem of 'Could not perform...
asked by 14.09.2015 / 14:14
1
answer

Is there a way to name the selected tables in a stored procedure to identify them in the DataSet?

I have a Store Procedure in SQL Server that projects multiple data. Example: CREATE PROCEDURE [dbo].[teste_sp] AS BEGIN select * from compra select * from cliente select * from fatura END However, when retrieving the DataSet in...
asked by 18.12.2015 / 18:02
1
answer

Can I invoke the function in a Trigger?

My function made in Sql-Server: CREATE FUNCTION dbo.getQuantidade(@idProd char) RETURNS float AS BEGIN DECLARE @QTD float SET @QTD = (SELECT (prod.Quantidade) FROM Produto prod where @id_prod = IdProduto) return @Q...
asked by 29.06.2016 / 16:58
1
answer

How to connect to the Azure Database?

Well friends, I have a database on Azure, but I can not connect to it. The error is that my IP is not allowed to make such a connection, what I did was add a new rule to the bank server firewall, but every moment I change IP I have this problem....
asked by 02.06.2015 / 22:46
3
answers

How to save a base64 image in SQL and save it locally as PNG

I need to know if it's possible to save a base64 image in SQL so I can then retrieve it and save it locally as PNG or JPEG. I already know how to convert to base64, but to download in all browsers this is difficult so I wonder if it is possible...
asked by 01.03.2016 / 15:29
2
answers

Backup database sql server express using .bat

I made the creation of a .bat file with the content: USE T4FAT; GO BACKUP DATABASE T4FAT TO DISK = 'C:\Dropbox\MF-YCORN\BK_MF\T4FAT.Bak' WITH FORMAT, MEDIANAME = 'T4FATBackups', NAME = 'Full Backup of T4FAT';...
asked by 24.11.2016 / 14:13
0
answers

Service returns cast error when consumed

I decided to make another post, since the subject is another, although in the original post, in the comments we get to touch on the subject, but without depth. I have this error:    System.InvalidOperationException: 'The specified cast from a...
asked by 25.08.2017 / 15:14
1
answer

Allocation Database

I have some doubts about my database. I use a "MS-SQL" database, which is provided by LocaWeb (I do not have very clear this concept of LocaWeb giving me a "bank" which has 3 more banks in it). Well, it's divided into 3 banks: adautil (o...
asked by 15.08.2014 / 17:14