Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using OLE DB with Crystal Reports 9
Message
From
02/12/2002 17:00:48
Fabian Valencia
Calamos Asset Managment Inc.
Naperville, Illinois, United States
 
 
To
28/11/2002 08:45:15
Luis Navas
Independent Consultant
Auckland, New Zealand
General information
Forum:
Visual FoxPro
Category:
Crystal Reports
Miscellaneous
Thread ID:
00727754
Message ID:
00728802
Views:
29
I tried this, but got the same error. One thing I should mention is that this is a free table, not part of a .dbc.

I did notice in the Crystal help file that they recommend using the ConnectionProperty Object. I tried this also, but when I tried to set the "Initial Catalog" property, I received this error:

OLE exception error: Exception code e06d7363. OLE object may be corrupt.

Here is how I attempt to set the properties:

*' Get the first table in the report.
DBTable = oCrReport.Database.Tables(1)

*' Get the "Data Source" property from the
*' ConnectionProperties collection.
CPProperty = DBTable.ConnectionProperties("Data Source")

*' Set the new data source (server name).
CPProperty.Value = "c:\temp"

*' Get the "User ID" property from the
*' ConnectionProperties collection.
CPProperty = DBTable.ConnectionProperties("User ID")

*' Set the user name.
CPProperty.Value = ""

*' Get the "Password" property from the
*' ConnectionProperties collection.
CPProperty = DBTable.ConnectionProperties("Password")

*' Set the password.
CPProperty.Value = ""

*' Get the "Initial Catalog" (database name) property from the
*' ConnectionProperties collection.
CPProperty = DBTable.ConnectionProperties("Initial Catalog")

*' Set the new database name.
CPProperty.Value = "TableName" * THIS IS WHERE THE ERROR OCCURS

* Change the location of the data.
DBTable.location = "full path of table"


Thanks,
Rod
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform