Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing db connection when using commands in CR9

Status
Not open for further replies.

FoxG

Technical User
Jun 1, 2001
393
GB
Hi,

I have a report using an oledb connection to an Oracle database. The report uses a command to determine the fields required from a specific table.

I want to re-connect the report to the database via an ODBC connection that I have set up.

When I try to set the source location it does not know where to relink the command to within the new ODBC connection.

How do I overcome this?

Any help appreciated, cheers
Geoff
 
I think you would need to create an identical command object for the odbc connection. Before trying to relink the command, edit the command object and copy the sql statement. Then, when you select Database | Set Datasource Location, do the following:

1) click on the command object under the current data source.

2) Navigate to your odbc connection in the "Replace With" box and click on the "Add command" item listed under the odbc connection.

3) Click the Update button and paste in your sql statement.
 
Hi FVTrainer,

This is what I had already thought, but I cannot get the new replace command to be recognised within the ODBC connection.

When you click on Ok after coping the SQL statement, I still can't see what I should do next!?

Cheers,
Geoff
 
Indeed. I didn't check the process all the way through. Sorry. Maybe I shouldn't answer questions at 5:00 a.m. (my time).

I was able to convert it to another type using the repository, but I'm not sure the result is what you are looking for. What I did was create an oldedb report and then I used a separate report to create the odbc command object (using the same sql) and I attached the command object to the repository. I then was able to go into the original report and use the Set Datasource Location to change the oledb command object to the repository object (the repository version of the command object was visible under Current Connections). I then disconnected the command object from the repository. However, under "properties" for the connection, it now shows as "Crystal Queries" as the database type, rather than ODBC, even after detaching the command object from the repository. I'm not sure what that means. If I take that literally, then perhaps it's not using the odbc driver, although I would think it would have to be...
 
Hi Geoff,
Did you figure out how to do this finally. I am in a somewhat similar situation though a little bit different. I created a report using an ODBC connection that connects to a dev database and I now want to change it around to point to a production database.
Any help would be much appreciated. Thanks

-- Tony
 
Hi Tony,

I ended up doing the changes manually.


However the help guide for version 10 states that this can now be done easily.

Geoff
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top