문제

from C# program i have connect to mysql database how to specify a password with a single quote character, for get next error

Format of the initialization string does not conform to specification
starting at index 

for this connection string

Server = srv; Database = db; User Id = user; Password = 'ktrnhjyyst;

Thanks

도움이 되었습니까?

해결책

You need to quote tokens that contain restricted chars:

var cn = "Server=srv;Database=db;User Id=user;Password=\"'ktrnhjyyst;\"";
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top