Copied an app from one project to another

Hi All - I have copied an app from one project to another
When I try to use it I’m getting this message

Connection attempt failed: invalid data source name

I’ve tried

  • Exporting the app from the source project to the new project. Same error
  • Copying over the data connector
  • Adding a new connectore

Still Connection attempt failed: invalid data source name

Can anyone help please?
Mike

in the app you can set the connection individually. Under SQL, table name. then if its a form synchronise. if it’s a grid. check the fields under SQL

Hi Rotrax
Thanks very much for the tips. Here’s what happened

  • Exported the app from the source project (a form)
  • Imported it to the destination app
  • Synchronized the fields
  • Ran the app:
    An error occurred while connecting to the database:
    Connection attempt failed: invalid data source name
  • Tried a copy from the source project - same result
  • Tried a new connector - still the same result

Is there something else we might have missed?
Should it be possible to copy an app from one app to another without export, setting the connector correctly, and have it work?

In this case we have tried both copy and export
Any further comments gratefully received

Kind regards
Mike

Just tried with different applications / projects

  • Same result
    Tried following
  • Push grid from source to another project - Same result
  • Delete connector
  • Build grid. Error - expected!
  • Create new connector
  • Run grid - Works

However this does not work with a form app.
It seems like there is another name for the connector which is stored but not available?

Any ideas or thoughts appreciated
*

When exporting the app it keeps many settings…IE The SQL connecter is one.
In the Database connector it would have created a new one and in the app it would link to this connector. THis new connector might not have access to the database.
You need to check the Project Database connection and make sure it connects.
Then in the application ->SQL->Connection make sure you use the correct connection in the drop down

Thanks Nico! Will take a look and post back
Appreciate your time

Hi Nico
We followed this sequence:

  1. Checked the connector - tests OK
  2. Open the form ->SQL-Connection, set to the only connector in the target app
  3. Just to make sure - set it to blank then build
  4. Restore the connector setting to default
    5 Run app

An error occurred while connecting to the database:
Connection attempt failed: invalid data source name

Any further tip very welcome - a bit surprised that there should be any issue!
Thanks Nico

Have you tried enabling debug options to see sql output?

No – Good idea thanks. Will update

Just a rough sketch

No change. No debug output. Does this suggest that the app is pulling a cached connector? We have downloaded the SQLite NetMake db an done all checks. All good. Restored database

It would be really useful if someone with experience can comment as to whether to copy an app from one project to another should work with just a rebuild? Seems like it should though some older forum references suggest that the direct copy doesn’t but exporting then importing does. This is for a much older version.

It certainly does suggest that. In Options->System Settings there is a setting to enable or disable
Have you tried closing the browser completely or even a different all together browser?cacedb

Hi Nico - tried this - unfortunately didn’t work. Interestingly tried copying two almost identical forms across from one project to another. One worked the other didn’t!

Would really appreciate a comment from Scriptcase support on this. There’s been a lot of effort put into proving this issue and it should only take a few moments for someone in the dev team to see if the issue can be duplicated. It’s simple - what do we have to do to make a direct copy or index or an export->import of a form application not return this error

An error occurred while connecting to the database:
Connection attempt failed: invalid data source name