[GO]连接Sql Server 操作

//sql server 连接实例
    //db, err := sql.Open("adodb", "Provider=SQLOLEDB;Initial Catalog=fvlog;Data Source=CNWJ6RDPC002;user id=sa;password=Condom1992")
    //if err != nil {
    //    fmt.Println(err)
    //}
    //rows, err := db.Query("select top 1 Img from IdentificationLogImages")
    //if err != nil {
    //    fmt.Println(err)
    //    return
    //}
    //defer rows.Close()
    //var img []byte
    //for rows.Next() {
    //    rows.Scan(&img)
    //    fmt.Println(img)
    //}
    //ioutil.WriteFile("./static/img/output.jpg", img, 0666)

你可能感兴趣的:(GO语言,GO)