Adding text and image to database with C# and SQL

The following windows form application takes an input for name, age, gender, description, and an image. However when clicking the “Save Information” button the following exception error …

Stored procedure with string as parameters not working -SQL

In my database ‘Student_name’ is set as varchar. And the stored procedure is: ALTER PROCEDURE [dbo].[SP_STUDENT] @STUDENT_NAME NVARCHAR(MAX), AS DECLARE @columns NVARCHAR(MAX) = ”,…

Passing date to Stored Procedure in Oracle SQL error : ORA-01858

I know this question has been answered previously, and I have tried out the solution given in them without success. I have a stored procedure as below(I have removed non-essential parts) : CREATE OR …

How to create id field with auto increasement while using stored procedure?

I have this stored procedure. How can I select a variable as a field that can +1 value in every row of results of sp? I need it for making a virtual id field. please help me. CREATE DEFINER=`root`@`…

Stored procedure runs correctly only sometimes

My problem is: I have a stored procedure that only sometimes runs correctly, sometimes it does not run at all and sometimes partially (some rows where inserted in the table bot not all). I use lazarus …

Store procedures for delete a repeat records

Hello i have a table in MySQL: “contracts” where i create a 3 record’s for each client_id, but one bug in the backend create more records on some client_id i try create a store procedure to …

Pass a table variable using table type into a stored procedure?

I have a table employee with around 1000 entries, I have to create a stored procedure which accepts a parameter. The parameter will most likely be of the type which I created ‘AS Table’. Upon passing …

PROCEDURE Return always 0 for string statement

I have a procedure that can be changed dynamically by user for multi column and I write it in SQL when I run it. Everything is OK in SQL and Server Explorer in Visual Studio but when I want use it in …

I’m going to get the ten day sales report and i want to return 0 if there is not record for each day

SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER PROCEDURE [dbo].[Sp_Rsv_DailyContractReport] @ContractDate datetime =null, @RegisterUsersId varchar(32) = null AS Select …

Stored Procedure Data Type Conversion Error

I try to execute the following SP it gives me this following error. Msg 8114, Level 16, State 5, Procedure TEST, Line 55 [Batch Start Line 12] Error converting data type nvarchar to …