Hello, vs2008 and crystal2008 sp1. I'm using pervasive api calls. Because different people have their databases at different locations on their computers, I need to set the location of the database
Dim NewConnectionInfo As New ConnectionInfo.
NewConnectionInfo.ServerName = DatabasePath & "file.ddf"
Dim myTables As Tables
myTables = Me.Database.Tables
Dim NewLogonInfo As TableLogOnInfo
For Each myTable As Table In myTables
NewLogonInfo = myTable.LogOnInfo
NewLogonInfo.ConnectionInfo = NewConnectionInfo
myTable.ApplyLogOnInfo(NewLogonInfo
Next
i chose to set the serverName because I looked at a report I had set up in the designer and saw how it was connecting.
My code works for half the people who have installed it. The other half get an error when the crviewer attempts open the report.
data object cannot be opened.
database connection error:"
data object cannot be opened/accessed.
failed to retrieve data from the database.
error in file...............(specific to report chosen)
The table could not be found.
Is there a better way of setting the location? Can you decipher something from the error message that I am missing.
thanks,
Dan