All Questions
164 questions
0
votes
0
answers
342
views
REF_CURSOR type is not supported when used in Java code to call stored procedures with cursor output parameter in SQL Server
We have a requirement in our project to call the stored procedure created in SQL Server with one input parameter and one cursor output parameter.
When I tried to call the stored procedure from Java ...
1
vote
2
answers
1k
views
calling Stored Procedure in Java
I have a SP:
ALTER PROCEDURE [dbo].[auth_user]
@username nchar(50),
@password nchar(50)
AS BEGIN
DECLARE @response AS bit = 0;
UPDATE dbo.Users
SET @response = 1
WHERE ...
0
votes
0
answers
184
views
How to call multiple sql statements using jdbc template in java
I want to get n values of a sequence at once from SQL server. I am able to achieve this using the below list of SQL queries:
DECLARE @FirstSeqNum sql_variant, @LastSeqNum sql_variant;
EXEC sys....
0
votes
1
answer
70
views
Unable to display text from stored procedure to textview - Android SQL Server
My issue is I have created a stored procedure to retrieve the max value from a table and I want to display this in my textview. But this doesn't seem to work. No errors are shown in the logs.
Notes:
...
1
vote
1
answer
5k
views
Calling stored procedure in spring boot with Jpa returns empty objects
I'm trying to fetch data from the store procedures in my spring boot rest api. The procedure call is successful but it return empty objects instead of returning any data. When I run those stored ...
0
votes
0
answers
185
views
Reducing model @Entity bloat with Spring Hibernate and MSSQL using DTO + Stored Proc
Edit: I think it would be helpful to explain my goal here first. My goal is to reduce and avoid model/@Entity bloat when using stored procedures with Hibernate. You can get raw data back from the ...
0
votes
1
answer
148
views
How do stored procedures get explicitly executed upon end user input
I am writing a java file that creates a username by accepting user inputs and then stores that username in a Microsoft SQL Server database. My SQL guy has written a number of stored procedures that do ...
0
votes
0
answers
57
views
Executing stored procedure in Java class
I have a stored procedure that I want to execute within a Java class. I have the values of the stored procedure within the SQL of the procedure and want to be able to execute it fully in a Java class.
...
0
votes
1
answer
63
views
SQL Server 2019 External Script Execution Authentication Error on JKS File
I'm attempting to put a POC together that leverages the SQL Server 2019 Extensibility Framework & External Languages feature. This enables execution of external languages in SQL Server Stored ...
0
votes
0
answers
366
views
Java call stored procedure with parameter type of varbinary
Would like to query does anyone have idea how to call stored procedure with three parameters(first two are varchar and third one is varbinary) in java, I tried to call it through jpa's nativequery
...
0
votes
1
answer
726
views
Raise Java SQLException from SQL Server stored procedure?
I have an SQL Server stored procedure similar to this:
CREATE PROCEDURE proc1
(
@param DECIMAL
)
AS
BEGIN
INSERT INTO table1 (@param);
-- further commands
END;
GO
This ...
0
votes
0
answers
948
views
Spring - Call Two Stored Procedures in a transaction but run each procedure in auto commit mode
I have two 3rd party stored procedures that I'm calling in a Spring transaction as follows:
@Transactional
public void testGetHoldings() throws SQLException {
// calls stored procedure ...
0
votes
1
answer
688
views
Hibernate call sql server stored procedure throws Incorrect syntax near '@P0'
the sql server stored procedure is as follows:
CREATE PROCEDURE SelectStaff @rankabbr varchar(14), @sex varchar(1)
AS
SELECT * FROM staff WHERE rankabbr = @rankabbr AND sex = @sex
and I can ...
0
votes
1
answer
2k
views
Stored procedure in SQL Server expecting output parameter as input
I am calling a stored procedure from my Java code. And after some computation in the stored procedure, I am returning the status.
This is the stored procedure:
ALTER PROCEDURE [dbo].[SAMPLE_ENTRIES]
...
0
votes
1
answer
834
views
Quickly read million records from sql server using stored procedure and write it to csv using java and spring boot
We have a stored procedure that is used to select a million records. The stored procedure looks something like below
CREATE PROCEDURE ABC(@CustID varchar(20))
AS
BEGIN
WITH temporaryTable as (SELECT ...