Y
Y
Yuri Denisov2014-06-05 07:30:55
C++ / C#
Yuri Denisov, 2014-06-05 07:30:55

How to specify password for DataSet C#?

Good afternoon!
There is such a line

this.cardsTableAdapter.Fill(this.print2DataSet.cards, id_card_for_print);

In it, the DataSet uses a string connector to the MySQL database in which the password is not specified. How to specify the connection password in the code?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Slipeer, 2014-06-10
@denissov

When you create MySqlConnection - the connection string is passed there as an argument - the password is passed in it.
If the connection string is taken from some source and it crumples the password - glue it before connecting!
If there are examples here zetcode.com/db/mysqlcsharptutorial (including with a password)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question