title: How do i change logon info dynamically in crystal report and ms access?
body: <p>I have my crystal reports file accessing data from msaccess database.</p>
  
  <p>now while loading report i need to pass the logon info of the msaccess database along with the database name from vb.net.</p>
  
  <p>I tried using </p>
  
  <pre><code>    Dim ConnInfo As ConnectionInfo = New ConnectionInfo()
  
      CRpt.ReportOptions.EnableSaveDataWithReport = False
  
      ConnInfo.IntegratedSecurity = False
      ConnInfo.ServerName = ""
      ConnInfo.UserID = ""
      ConnInfo.Password = ""
      ConnInfo.DatabaseName = OLEDBLayer.GetDBLocation()
      ConnInfo.Type = ConnectionInfoType.DBFile
  
      'CCINFo.ServerName = 
      For Each CTable As Table In CRpt.Database.Tables
          CTableLogInfo = CTable.LogOnInfo
          CTableLogInfo.ConnectionInfo = ConnInfo
          'CTable.Location = OLEDBLayer.GetDBLocation
          CTable.ApplyLogOnInfo(CTableLogInfo)
      Next
  </code></pre>
  
  <p>But not working. What am i missing?</p>