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

No support of bulkcopy an IMAGE column #187

Open
michaelcplusplus opened this issue Apr 11, 2024 · 0 comments
Open

No support of bulkcopy an IMAGE column #187

michaelcplusplus opened this issue Apr 11, 2024 · 0 comments

Comments

@michaelcplusplus
Copy link

Describe the bug

I get this error message when I try to copy a table with an IMAGE column

Exception message:
not implemented makeDecl for type 0x22
Stack trace:
github.com/microsoft/go-mssqldb.makeDecl({0x22, 0x0, 0x9, 0x7fffffff, 0x0, 0x0, {0x0, 0x0, 0x0}, {0x0, ...}, ...})
	C:/Users/ml/go/pkg/mod/github.com/microsoft/[email protected]/types.go:1263 +0x8f9
github.com/microsoft/go-mssqldb.(*Bulk).sendBulkCommand(0xc000000000, {0x4c4ff0, 0x7b7c20})
	C:/Users/ml/go/pkg/mod/github.com/microsoft/[email protected]/bulkcopy.go:104 +0x398
github.com/microsoft/go-mssqldb.(*Bulk).AddRow(0xc000000000, {0xc000002588, 0x2b, 0x2b})
	C:/Users/ml/go/pkg/mod/github.com/microsoft/[email protected]/bulkcopy.go:165 +0x3d
github.com/microsoft/go-mssqldb.(*copyin).Exec(0xc000008258, {0xc0000022c8, 0x2b, 0xc00040e030?})
	C:/Users/ml/go/pkg/mod/github.com/microsoft/[email protected]/bulkcopy_sql.go:83 +0x11a
database/sql.ctxDriverStmtExec({0x4c4ff0, 0x7b7c20}, {0x4c5108, 0xc000008258}, {0xc0002c0708, 0x2b, 0x2b?})
	C:/Program Files/Go/src/database/sql/ctxutil.go:77 +0x1ca
database/sql.resultFromStatement({0x4c4ff0, 0x7b7c20}, {0x4c4a40, 0xc00002e4c0}, 0xc00002e080, {0xc000353348, 0x2b, 0x2b})
	C:/Program Files/Go/src/database/sql/sql.go:2670 +0x13a
database/sql.(*Stmt).ExecContext.func1(0x0?)
	C:/Program Files/Go/src/database/sql/sql.go:2644 +0x9f
database/sql.(*DB).retry(0xc0003bda10?, 0xc0003bda10)
	C:/Program Files/Go/src/database/sql/sql.go:1566 +0x42
database/sql.(*Stmt).ExecContext(0xc00033c090?, {0x4c4ff0?, 0x7b7c20?}, {0xc000353348?, 0x4c3e88?, 0xc00033c0c8?})
	C:/Program Files/Go/src/database/sql/sql.go:2638 +0x16b
database/sql.(*Stmt).Exec(...)
	C:/Program Files/Go/src/database/sql/sql.go:2658
github.com/mpdv/bulk.(*CopyIn).Append(0xc00033c120, 0x2b?)

Expected behavior
Support of the IMAGE column type(typeImage) in the functions
types.go
func makeDecl(ti typeInfo) string
and
bulkcopy.go
func (b *Bulk) makeParam(val DataValue, col columnStruct) (res param, err error)

Further technical details

SQL Server version: SQL Server 2019
Operating system: Windows 2019

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

1 participant