close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

insert record problem

Thread began 5/26/2010 9:55 am by Kev Hegan | Last modified 5/27/2010 2:16 pm by Jimmy Wu | 1975 views | 5 replies |

Kev Hegan

insert record problem

Hi,

I'm struggling with a problem that I can't fix. I wonder if anyone here can help. I'm not familiar with php and databases, so I shooting in the dark with trying to figure out what's going wrong.

I have successfully made a search page that works (thanks to a little help on this forum) and displays the results, I can edit and update records and so on, but the one thing I can't get to work is the insert record function. It will update the database, but it won't increment the primary key, which is a field called ID. What comes straight out of the wizard shows as a NULL in the ID column when you check the database. Therefore you can't view the record etc. I managed, not sure how, by hacking around with the code to get it to enter a 0 in the field and this allowed me to view the resulting record, but it needs to incerment the number obviously.

I've attached the files produced by the wizard. This is the result of just running it without making any of the changes I need... it should be a clean version of what comes out of the wizard.

If anyone can have a look, that would be great. I have looked at the insert record server behaviour but I don't really understand it. It says if you want to ignore a column leave it blank. The ID is blank but that's how it came out of the wizard. I tried putting in WADAInsertRecordID, which sounded promising, but that only meant it would add a 0 and not increment the ID number.

Attached Files
insert_record_problem.zip
Sign in to reply to this post

CraigRBeta Tester

your id column should be set to auto increment in your database.

when a new row is inserted, the id field is automatically updated with the next integer.

Sign in to reply to this post

Jimmy Wu

As CraigR pointed out, you should go into your database table and set the ID to auto-increment. You would then want to leave the ID column blank in the wizard. When a new row is inserted into the database, the ID will automatically increment to the next number when nothing is inserted into that column.

There are also default values you can set for the different columns. That way if you don't insert anything into that column from an insert, it will default to that value.

Sign in to reply to this post

Kev Hegan

Well, well... I'd never have guessed that! Simple when you know how. You've no idea how long I tried to figure it out! I was looking in the wrong place all along.

I know I'm playing with fire dabbling with this stuff without the background knowledge, but needs must...

Thanks you so much for your help :)

My next challenge is to create an interface whereby someone can upload a file and a link is added to the database. Is this something that can be achieved using "digital file pro"?

Sign in to reply to this post

this_is_me

Hey Kev

I had the same problem recently. I used UE4 (Universal Email4). It has now dfp (digital file pro) included.
Look for a pdf file called "dfp_da_insert_update_ht.pdf" on web assists website. It is a very well structured "how to" to achieve what you are looking for.

Best wishes

Sign in to reply to this post

Jimmy Wu

Yes, You could use Digital File Pro to implement this, but as this_is_me pointed out, the product has been incorporated into Universal Email 4. Here is the link to the support pages for Universal Email and Digital File Pro:
universal-email/

You might want to check out some of the tutorials on that support page. If you run into any issues, feel free to open a new thread.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...