I've created a test table, then a Type Table and then a SP:
CREATE TABLE prueba (
id int IDENTITY,
datos varchar (20),
nums NUMERIC (10,2)
CONSTRAINT PK_PRUEBA PRIMARY KEY (id)
)
CREATE TYPE dbo.pruebatable AS TABLE (
datos varchar (20),
nums NUMERIC (10,2)
)
CREATE PROC spruebatable
@test pruebatable READONLY
AS
BEGIN
INSERT INTO prueba (datos,nums)
SELECT
datos, nums
FROM @test
END;
And in python, I'm trying to calls this with a private connection function that works fine:
from haegpi import sqlconn
cursor = sqlconn()
var = ('int',1)
sql = "{CALL spruebatable (?)}"
cursor.execute (sql,var)
I've tried to send it as tuple, list and result is the same. Any clues?