Hi. I'm trying to run VB code in visual studio form project but get an error when code is trying to run. Error is: "System.ArgumentException: 'Keyword not supported: 'trust server certificate'.'". The line in code affected is:
Data Source=CDOPWD-4023;Initial Catalog=PREVENTION_DATABASE;Persist Security Info=True;User ID=cesrivas;Password=***********;TrustServerCertificate=True
Hi
@Cesar Rivas
Not all data providers or database systems support this option.
If you're working with a database system that doesn't support this option, you'll need to remove the
TrustServerCertificate=True
part from your connection string.
Best Regards.
Jiachen Li
If the answer is helpful, please click "
Accept Answer
" and upvote it.
Note: Please follow the steps in our
documentation
to enable e-mail notifications if you want to receive the related email notification for this thread.
Yes, after removing "Trust Server Certificate=False" from connection string
"Data Source=
__
-LAPTOP\SQLEXPRESS;Initial Catalog=MovieRentalDb;Integrated Security=True;Pooling=False;Encrypt=False; Trust Server Certificate=False", it worked for me.
Modified connectionString :-
"Data Source=
____
-LAPTOP\SQLEXPRESS;Initial Catalog=MovieRentalDb;Integrated Security=True;Pooling=False;Encrypt=False"