开发者

how i can test the connectionstring in Mysql

开发者 https://www.devze.com 2023-02-20 00:16 出处:网络
I have a connectionstring in Mysql and how i can check that is valid or not means to sayi want to test the connectionstring as well other software give functionality like in many software a option co开

I have a connectionstring in Mysql and how i can check that is valid or not means to say i want to test the connectionstring as well other software give functionality like in many software a option co开发者_运维技巧me called something like Test Connection [based on connectionstring].

any c# sample code to do that


Create a connection read server version or some generic data which you know for sure, would be present on database server. For example I read @@version in SQL Server to check what version of SQL Server user has and show the version. If no version returned connection couldn't be established.

0

精彩评论

暂无评论...
验证码 换一张
取 消