rana/ora

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

Closed this issue · 8 comments

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?

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.

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

AFAIK it's called oci.dll on Windows.

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

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

Before close the issue.

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

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

This is ok, to print the column value ?

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

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