Well, you haven't really asked a question. And the code you supplied...What is that? Where are you using it? Is this a web app? A windows forms? All of this information will help us help you.
The only advice I can supply is to research the CrystalReportDocument's .SetDataSource.
And
here[
^] is an MSDN article about Using the DataSourceConnections Class for Database Logon.
Hope it helps.