• Register
820 points
6 1

 ‌
In‌ ‌this‌ ‌article I Am going to discuss ‌an‌ ‌error that ‌is occur when we run an append query in our desktop database and error is an object
Does‌ ‌not‌ ‌implement‌ ‌interface‌ ‌formdata.‌ ‌I‌ ‌will‌ ‌solve‌ ‌this‌ ‌with‌ ‌the‌ ‌help‌ ‌to‌ ‌jQuery‌ ‌ ‌
 

Some common errors when we run append query

Type conversion failures:let us consider you are trying to append data of one type into another type. For example, appending text into another field whose data type is set to number will always show error. You need to check the data type of the fields in the destination table.and make sure your appending data type should be correct for each one.

Key violation:

Let us consider you may be trying to append data into one more different field that are part of table’s primary key first check the design of the destination table. If the primary key jas no duplicates property is set to yes. Then check the data that you are appending and make sure that is not violating the destination table rules.

Program
 

$.ajax({
    url : "/function/pro_pic_upload.php",
    type: "POST",
    data : postData,
    processData: false,
    contentType: false,
    success:function(data, textStatus, jqXHR){
        $("#pro_pix img").last().show();
        $("#pro_pix img").first().hide();
        $("#pro_pix h6").text(data);
    },
    error: function(jqXHR, textStatus, errorThrown){
        //if fails     
    }
});

 

Solution

Set this parameter to false i.e. process data: false in your script where you are sending your form data.
Process data always sets true.

Type:boolean

By default, data will pass in it will process to the data option as an object and transformed into a jQuery string, by fitting the default content type “application/x-www-form-urlencoded”.
If you want to send a DOMDocument, or other non-processed you can go with setting the option false.


Hope this will help.

 

820 points
6 1