First of all, thankyou so much for creating this library! It is the only pure go sybase library I could find
I am trying to call a Stored Procedure with multiple parameters, but it is returning a errors
_, err := c.db.ExecContext(ctx, exec my_proc ?, ?, param1, param2) returns the following response
tds: Prepare failed: Msg: 7332, Level: 15, State: 1 Server: HORIZON, Procedure: gtds1, Line: 1: The untyped variable ? is allowed only in in a WHERE clause or the SET clause of an UPDATE statement or the VALUES list of an INSERT statement
If I take out the exec eg
_, err := c.db.ExecContext(ctx, my_proc ?, ?, param1, param2) it returns this
tds: Prepare failed: Msg: 102, Level: 15, State: 1 Server: HORIZON, Procedure: gtds1, Line: 1: Incorrect syntax near 'my_proc'
If I manually add the params it works fine eg
_, err := c.db.ExecContext(ctx, exec my_proc 'param1', 'param2')
However I need to be able to pass the params through
I have tested this using a perl library (https://metacpan.org/pod/DBD::Sybase#Stored-Procedures-and-Placeholders) against our Sybase server and that works fine so it seems to be an issue with the library?
First of all, thankyou so much for creating this library! It is the only pure go sybase library I could find
I am trying to call a Stored Procedure with multiple parameters, but it is returning a errors
_, err := c.db.ExecContext(ctx,
exec my_proc ?, ?, param1, param2) returns the following responsetds: Prepare failed: Msg: 7332, Level: 15, State: 1 Server: HORIZON, Procedure: gtds1, Line: 1: The untyped variable ? is allowed only in in a WHERE clause or the SET clause of an UPDATE statement or the VALUES list of an INSERT statement
If I take out the exec eg
_, err := c.db.ExecContext(ctx,
my_proc ?, ?, param1, param2) it returns thistds: Prepare failed: Msg: 102, Level: 15, State: 1 Server: HORIZON, Procedure: gtds1, Line: 1: Incorrect syntax near 'my_proc'
If I manually add the params it works fine eg
_, err := c.db.ExecContext(ctx,
exec my_proc 'param1', 'param2')However I need to be able to pass the params through
I have tested this using a perl library (https://metacpan.org/pod/DBD::Sybase#Stored-Procedures-and-Placeholders) against our Sybase server and that works fine so it seems to be an issue with the library?