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

pointer uint in tvp #703

Open
saeedgeek opened this issue Dec 3, 2021 · 1 comment
Open

pointer uint in tvp #703

saeedgeek opened this issue Dec 3, 2021 · 1 comment

Comments

@saeedgeek
Copy link

hi i got problm with null pointer in uint type when i using your tvp library
the problem is that when i pass nil uint pointer as a parameter of tvp in to store procedure i got this error

The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is incorrect. Table-valued parameter 0 (""), row 1, column 1: Data type 0x26 has an invalid data length or metadata length.

also my tvp struct is

type MerchantIbanTVP struct {
Id *uint
MerchantID *uint
IbanIndex *uint64
IBAN *string
SharePercentage *float64
}

also i using both gorm and sql.dataBase library for calling my sp

how can i fix this problem

@NikitaDef
Copy link
Contributor

NikitaDef commented Jan 2, 2022

hi i got problm with null pointer in uint type when i using your tvp library the problem is that when i pass nil uint pointer as a parameter of tvp in to store procedure i got this error

The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is incorrect. Table-valued parameter 0 (""), row 1, column 1: Data type 0x26 has an invalid data length or metadata length.

also my tvp struct is

type MerchantIbanTVP struct { Id *uint MerchantID *uint IbanIndex *uint64 IBAN *string SharePercentage *float64 }

also i using both gorm and sql.dataBase library for calling my sp

how can i fix this problem

Hi, please checkout #713 MR, I added types into list

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants