开发者

how i can test the connectionstring in Mysql

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜