How to set locate crystal report DB details dynamically

Jan 19 2013 1:35 AM
Hi,

How to set locate crystal report DB details dynamically through program.
I need to change db details time to time. I found this code segment. But it doesn't work.

//Set database location
                rpt.SetDatabaseLogon("Admin", "Admin", "MYSERVER", "MYDB");

I'm using VS2010 , C#.Net

Thanks,
Max