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

When run the program get That can not find bind point of OCIBindByPos2 in the dynamic link library #259

Closed
amichelins opened this issue Nov 20, 2018 · 8 comments

Comments

@amichelins
Copy link

I have install and copile the gopkg.in/rana/ora.v3
My programs copile whitout errors.

When run the program get:
The entry point of the OCIBindByPos2 procedure could not be located in the dynamic link library

What is brong?

@tgulacsi
Copy link
Collaborator

Your libclntsh.so does not contain OCIBindByPos2, only OCIBindByPos - it's an older version than with what you've compiled with

Maybe gopkg.in/goracle.v2 is better (uses ODPI-C, a nicer C library): does not need OCI libs at compile time, only at runtime, so it decides which version of OCIBindByPos to use at runtime.

@amichelins
Copy link
Author

This file libclntsh.dll or .so is not present in my windows.
Is and ohter lib

@tgulacsi
Copy link
Collaborator

AFAIK it's called oci.dll on Windows.

@amichelins
Copy link
Author

the problem was solved with instantclient-basic-windows.x64-12.2.0.1.0 + SDK
The 12 version has OCIBindByPos2.

The gopkg.in/goracle.v2 is not compiling
gives:

gopkg.in/goracle.v2

..\gopkg.in\goracle.v2\orahlp.go:229: undefined: sql.Out
..\gopkg.in\goracle.v2\orahlp.go:293: undefined: sql.Out
..\gopkg.in\goracle.v2\stmt.go:150: undefined: driver.NamedValueChecker
..\gopkg.in\goracle.v2\stmt.go:275: undefined: sql.Out
..\gopkg.in\goracle.v2\stmt.go:646: undefined: sql.Out
..\gopkg.in\goracle.v2\stmt.go:1832: undefined: driver.ErrRemoveArgument

@tgulacsi
Copy link
Collaborator

Regarding gopkg.in/goracle.v2: it needs at least Go 1.9 - the best is the latest (1.11.2 ATM).

@amichelins
Copy link
Author

Before close the issue.

for rows.Next() {
rows.Scan(rowP)

	fmt.Printf("%s", rowP[0])
}

This is ok, to print the column value ?

@tgulacsi
Copy link
Collaborator

"%v" is better, but yes (assuming rowP isd []driver.Value or []interface{}).

@amichelins
Copy link
Author

i try with %v, prints for each row in the select
the code
for rows.Next() {
rows.Scan(rowP)
fmt.Printf("%v", rowP[0])
}

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