Record is saved, but still- No valid database connection err

whiteangel 07 Jan, 2011
Hi,

I was testing the save to database feature in a 'contact us' form that I created. I successfully created the database table and it is connected to the form.

I am not using any dashes in the form fields, just the default underscores. After I submit the form, I get a '500 - No valid database connection:' error message.

But when I check the table, the form details have been saved successfully. Can you please tell me why this is happening.

Thanks
GreyHead 07 Jan, 2011
Hi whiteangel ,

I don't recall seeing that error reported here before.

Please take a Form Backup using the icon in the Forms Manager and post it here (as a zipped file) or PM or email it to me and I'll take a closer look.

Bob
whiteangel 07 Jan, 2011
Hi,

I made a back-up of the form and uploaded it to <!-- w --><a class="postlink" href="http://www.yousendit.com">www.yousendit.com</a><!-- w -->. you can download it by clicking the link below.

https://www.yousendit.com/download/RlRva0ZTVnNrUm52Wmc9PQ

By the way, I was testing the basicdemo that is created when you click on upgrade MYSQL... I made a table for it and connected it to the form and it works just fine.
whiteangel 07 Jan, 2011
Hi,

I made another form with the exact same items as the previous one and then created a table for the new form and then connected it to the form. When I clicked submit I still got the same error.

So I began removing form fields to see if one of the fields was causing the problem. It appears that the dropdown was the culprit. After I removed it from the form I did not get an error when the form was saved to the database. But surprisingly if you view the tables the dropdown option that is selected always shows up in the tables!

Any ideas why the dropdown would cause an error. Could it be because of the input 'varchar(255)' in the tables. Is it correct or should I set it to something else?
GreyHead 08 Jan, 2011
Hi whiteangel,

I installed a copy of your form here, created a table from it to test and don't get any error messages :-(

I don't see anything odd with the select drop-down or the data it submits; and VARCHAR(255) shouldn't be a problem at all.

If the data is being saved it sounds as though the error is happening with some other database query.

If you can, please turn debug on for the form and send or PM a link so that I can take a quick look.

Bob
whiteangel 08 Jan, 2011
Hi,

I turned debug on but after I submit the form, all I get is a blank white page with a red box with the error message below. No debug code.
Record is saved, but still- No valid database connection err image 1
So I did some more experimenting, developed a new form connected to a new table. The new form only had a dropdown and a submit button. When I hit submit, the form was submitted successfully without any error. So now I'm not really sure if the issue is with the dropdown. I guess I will now try adding more fields to the form and see if the error pops up again.
whiteangel 08 Jan, 2011
Hi,

I have recreated the original form starting with the dropdown and then adding one field and checking for errors. Now the new form has all the fields in the old form and it is working perfectly. I am not getting any database errors. Strangely, the original form which is exactly the same as this one still spits out a database error. Can't really figure out why.

Thanks for your help. There is one little thing though. I am working on a multiform with a file upload option. The problem is that all the fields in the multiform get saved to the database except for the file upload paths. Th file upload fields remain blank. But the files themselves are uploaded successfully.

Can you please tell me why this is happening.

Thanks
This topic is locked and no more replies can be posted.