Results 1 to 2 of 2

Thread: VB 2005 No Data in Report

Threaded View

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2006
    Location
    Netherlands
    Posts
    817

    VB 2005 No Data in Report

    I have a crystal report and I load that into a crystal report viewer.
    This works great. But what do I do when the path of my database changes.

    For my forms I do the following:

    Code:
    Dim strTextFileLocation As String = System.Windows.Forms.Application.StartupPath & "\Config.txt"
    	Dim myConnection As New OleDb.OleDbConnection
    
    	Public Sub FillDataset()
    		myConnection.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strDatabasePath
    
    		Try
    			'Open connection
    			myConnection.Open()
    
    			lblDatabaseConnection.Text = "Database connectie is geslaagd."
    
    			'Close the connection to the database
    			myConnection.Close()
    		Catch ex As Exception
    			lblDatabaseConnection.Text = "Database connectie is mislukt."
    		End Try
    
    	End Sub
    This works great for my form.
    But how do I appky this to the crystal reports??????

    Please please help...
    Last edited by bodylojohn; Apr 4th, 2007 at 12:39 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width