Closed GoogleCodeExporter closed 9 years ago
Please, provide small program to demonstrate your issue. Something that I can
run to reproduce your issue here. Also, provide your environment: your OS, the
database you use. Thank you.
Alex
Original comment by alex.bra...@gmail.com
on 26 Mar 2014 at 1:25
OS: Windows Server 2003 Enterprise Edition SP2
Database: SQL Server 2008 Enterprise Edition
1) create the table named as "files" in the database named as "database1"
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[files](
[fileid] [uniqueidentifier] NOT NULL,
[filecontent] [image] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
2) go run the following program:
package main
import (
_ "code.google.com/p/odbc"
"bytes"
"database/sql"
"fmt"
)
func main() {
svr := "localhost"
dbase := "database1"
usr := "userid"
psw := "password"
connstring := fmt.Sprintf("Driver={SQL Server Native Client 10.0};Server=%s;Database=%s;Uid=%s;Pwd=%s;",
svr,
dbase,
usr,
psw,
)
webdb, err := sql.Open("odbc", connstring)
` if err != nil {
fmt.Println(err)
return
}
defer webdb.Close()
ls_sql := "insert files(filecontent) values(?)"
b := bytes.Repeat([]byte("a"), 8001)
_, err = webdb.Exec(ls_sql, b)
if err != nil {
fmt.Println(err)
return
}
}
Original comment by teg...@gmail.com
on 26 Mar 2014 at 2:22
when I use "Driver={SQL Server}" instead of "Driver={SQL Server Native Client
10.0}".
my patches still occurs SQLExecute: {HY090} errors. :(
Original comment by teg...@gmail.com
on 26 Mar 2014 at 2:35
Thank you for your example. Here https://codereview.appspot.com/81140043/ is my
fix. Please, check it covers your scenario. Thank you.
Alex
Original comment by alex.bra...@gmail.com
on 27 Mar 2014 at 1:27
This issue was closed by revision 003d75da13f5.
Original comment by alex.bra...@gmail.com
on 11 Apr 2014 at 6:51
Original issue reported on code.google.com by
teg...@gmail.com
on 25 Mar 2014 at 2:41