문제

currently, I am developing Desktop Application with Password Protected Database(.sdf). I have database(password protected) successful connection to the data table adapter in C# but, Now I am confused about How to bind sqlce(3.5) data to the XtraReport(DevExpress) because it needs password to access data from sqlce 3.5 and I have tried lots of thing as my knowledge but I couldn't found anything so, I don't have any idea about that so help me in making connection between database(password protected) and XtraReport or Crystal Report please ...

도움이 되었습니까?

해결책

Generally it is necessary to modify the connection string. If you don't want to store password in the application settings you should make changes on the fly.

string password = GetPasswordFromTheUser();
XtraReport report = new MyReport();
SomeTableTableAdapter adapter = (SomeTableTableAdapter)report.DataAdapter;
adapter.Connection.ConnectionString += ";Password=" + password;
report.ShowPreviewDialog();
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top