We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi I faced with issue
I have a table
CREATE TABLE testclob( data1 CLOB, data2 CLOB, n NUMBER );
and the code for selecting data from that table
package main import ( "context" "database/sql" "fmt" _ "github.com/sijms/go-ora/v2" ora "github.com/sijms/go-ora/v2" ) const url = "oracle://user:pass@localhost:1521/XE" func main() { ctx := context.TODO() db, err := sql.Open("oracle", url) if err != nil { fmt.Println("Can't open database: ", err) return } defer func() { err = db.Close() if err != nil { fmt.Println("Can't close database: ", err) } }() conn, err := db.Conn(ctx) if err != nil { fmt.Println("Can't open connection: ", err) return } defer func() { err = conn.Close() if err != nil { fmt.Println("Can't close connection: ", err) } }() err = selectTestClob(ctx, conn, 1) if err != nil { fmt.Println("Can't select: ", err) } fmt.Println("ok") } func selectTestClob( ctx context.Context, conn *sql.Conn, n int, ) (err error) { var rows *sql.Rows rows, err = conn.QueryContext( ctx, ` SELECT DATA1, DATA2 FROM testclob WHERE n = :1 `, n, ) if err != nil { return fmt.Errorf("can't select: %w", err) } for rows.Next() { var data1 sql.NullString var data2 sql.NullString err = rows.Scan(&data1, &data2) fmt.Println("[selectTestClob] ", data1, data2) } return nil }
The text was updated successfully, but these errors were encountered:
The output of that code is
Can't select: can't select: ORA-01009: missing mandatory parameter
Sorry, something went wrong.
fixed v2.8.14
No branches or pull requests
Hi
I faced with issue
I have a table
and the code for selecting data from that table
The text was updated successfully, but these errors were encountered: