Skip to content
New issue

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

Invalid paramter name, but No parameter. #242

Closed
bnuzhouwei opened this issue Dec 17, 2022 · 11 comments
Closed

Invalid paramter name, but No parameter. #242

bnuzhouwei opened this issue Dec 17, 2022 · 11 comments

Comments

@bnuzhouwei
Copy link

bnuzhouwei commented Dec 17, 2022

1671271004783

@maikebing
Copy link
Collaborator

有没有错误示例?

@bnuzhouwei
Copy link
Author

bnuzhouwei commented Dec 17, 2022

cmdtex = "SELECT * FROM test.meters limit 1"

reader

我用单元测试里面跑没问题,但是在网站中跑出现这种

@bnuzhouwei
Copy link
Author

微信截图_20221217180943

@maikebing
Copy link
Collaborator

sql语句在 taos的shell 里执行有没有问题

@bnuzhouwei
Copy link
Author

sql语句在 taos的shell 里执行没有问题,在单元测试代码中也没问题,在网站中动态跑就出问题了,怀疑是不是访问了保护的内存等问题导致的?

@bnuzhouwei
Copy link
Author

您看看,单元测试能通过:
微信截图_20221217182407

@bnuzhouwei
Copy link
Author

微信截图_20221217183023
还是有问题,好像是内存问题导致的

@bnuzhouwei
Copy link
Author

bnuzhouwei commented Dec 17, 2022

应该是DataReader.Load的方法导致有内存问题出现,如果不调用Load方法的话,能通过测试,否则就不行。
调用了Load方法后
Connection.Dispose的时候出现刚上图taos.dll报错

@bnuzhouwei
Copy link
Author

ExecuteReader 很奇怪的问题

System.Exception: Invalid parameters
 ---> IoTSharp.Data.Taos.TaosException (0x80000118): Invalid parameters
   at IoTSharp.Data.Taos.TaosException.ThrowExceptionForStmt(String _step, String _commandText, Int32 _code, IntPtr _stmt)
   at IoTSharp.Data.Taos.TaosCommand.ExecuteReader(CommandBehavior behavior, IntPtr _taos)
   at IoTSharp.Data.Taos.TaosCommand.ExecuteReader(CommandBehavior behavior)
   at System.Data.Common.DbCommand.ExecuteReader()

@maikebing
Copy link
Collaborator

我也没看出来个所以然。

@maikebing
Copy link
Collaborator

应该是类型没搞对导致的。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants