taosdata / driver-go

taos go driver
MIT License
89 stars 34 forks source link

执行SQL时报错: Undefined error: 0 #222

Closed wanyuetian closed 9 months ago

wanyuetian commented 9 months ago

driver 版本: v3.5.1 TDengine版本: 3.2.1.0 本地操作系统: macos 13.2

taos, err := sql.Open("taosSql", "root:taosdata@tcp(localhost:6030)/")
if err != nil {
logrus.Errorf("failed to connect TDengine, err: %v", err)
return
}
defer taos.Close()
taos.Exec("use battery")
_, err = taos.Exec(sqlStr)
if err != nil {
logrus.Errorf("failed to insert data to TDengine, err: %v", err)
return
}

这一行代码报错 _, err = taos.Exec(sqlStr). Undefined error: 0