未验证 提交 cf5d8869 编写于 作者: 麦壳饼's avatar 麦壳饼 提交者: GitHub

Merge pull request #1071 from KunYi/master

fixed failed when create table of tdengine
......@@ -33,6 +33,7 @@ namespace IoTSharp.Storage
if (_taos.State != System.Data.ConnectionState.Open) _taos.Open();
_taos.CreateCommand($"CREATE DATABASE IF NOT EXISTS {_taosBuilder.DataBase}").ExecuteNonQuery();
_taos.ChangeDatabase(_taosBuilder.DataBase);
_taos.CreateCommand($"USE {_taosBuilder.DataBase}").ExecuteNonQuery();
_taos.CreateCommand($"CREATE TABLE IF NOT EXISTS telemetrydata (ts timestamp,value_type tinyint, value_boolean bool, value_string binary(10240), value_long bigint,value_datetime timestamp,value_double double) TAGS (deviceid binary(32),keyname binary(64));")
.ExecuteNonQuery();
return Task.FromResult(true);
......@@ -235,4 +236,4 @@ namespace IoTSharp.Storage
return (result, telemetries);
}
}
}
\ No newline at end of file
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册