Error of unable to connect the TDengine
In my project, when I use upper case database name to connect the database by the library TDengine Connector 3.0.1 , the function 'TDengine.Connect' will return IntPtr.Zero. But when use lowercase database name, it will get a success result.
Firstly, thank you for your issue.
For the following interface, the parameter "db" will send to taosc (taos client without any change).
static extern public IntPtr Connect(string ip, string user, string password, string db, short port);
You got two kinds of responses, since TDengine's database name is case sensitive. For example, database test and database TEST, they are different databases.
Besides, IntPtr.Zero same as null pointer which means you got null pointer while connecting to you database. Since can connect to TDengine with parameters you just passed.
But when I use TDengine Client, TDengine's database name is not case sensitive.
But when I use TDengine Client, TDengine's database name is not case sensitive.
Yes, connect and query behavior is different by design
The basic rule is that in a SQL statement using `` means your SQL statement is case sensitive, on the hand statement without `` means you SQL statement is case insensitive.
- For the SQL statements being executed in taos-shell, that follows this rule
- For the SQL statements being executed with Interface
TDengine.Query()also follow this rule. - For the C# connector interface
TDengine.Connect(), the parameter db is case sensitive. You don't have to send database name with ``, which means "test"="test" or "TEST"="TEST"
any problem we still have ?