I connect my iPad to my computer and lost my existing data
Impossible if you tagged your question correctly as Online since all of your data resides on intuit server space rented from Amazon.
Impossible if using QB for desktop since merely connecting a device to the computer might wipe and sync data to the new device (think ipod) there is no wiping of hard drive data involved. But that is what regular file and system backups are for. Open QB, restore from your most recent backup