Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Oracle stored procedure OUT Variables #24

Open
kechkibet opened this issue Apr 25, 2024 · 1 comment
Open

Oracle stored procedure OUT Variables #24

kechkibet opened this issue Apr 25, 2024 · 1 comment
Labels
help wanted Extra attention is needed question Further information is requested

Comments

@kechkibet
Copy link

Hi,
I am getting error numeric or value error: character string buffer too small when trying to map output variables of oracle stored procedure to go variables, kindly assist.

result := database.DB.Exec(`BEGIN
    ProcedureName(
        @amount,
        '010',
        @sourceUser,
        @UPN, @IssueDate, @Errno, @Errtxt);
    END;`,
		sql.Named("amount", amount),
		sql.Named("sourceUser", sourceUser),
		sql.Named("UPN", sql.Out{Dest: &outputs.UPN}),
		sql.Named("IssueDate", sql.Out{Dest: &outputs.UPN}),
		sql.Named("Errno", sql.Out{Dest: &outputs.UPN}),
		sql.Named("Errtxt", sql.Out{Dest: &outputs.UPN}))
@iTanken iTanken self-assigned this Apr 26, 2024
@iTanken iTanken added help wanted Extra attention is needed question Further information is requested labels Apr 26, 2024
@iTanken
Copy link
Member

iTanken commented Apr 26, 2024

Can you provide a complete example code? I can't see where the problem is based on the information provided.

Reference

This GORM driver is based on go-ora.

@iTanken iTanken removed their assignment Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants