ASP Forum
Type Mismatch error
new_learner | Posted 9:00pm 15. February 2010 Server Time |

When i newly created the DB in the access, it worked fine but when i deleted all the records and then i tried to add new records it gives me this error:

To void any confusion i have kept all the datatypes as text even for dates.

------------------
Error Type:
Provider (0x80020005)
Type mismatch.
/rollout/adding_backend.asp, line 25

-------------------

Please help me, i am near to completion of my assignment..and now the DB is screwed. I tried to google through this issue but not getting any accurate solution.

My code:

<%
dim conn, a
dim rs
dim strID
dim strconn

strconn = "DRIVER=Microsoft Access Driver (*.mdb);DBQ=" & Server.MapPath("Rollout.mdb")
set conn = server.createobject("adodb.connection")
conn.open strconn'
set rs = server.createobject("adodb.recordset")
'This statement opens the table so we can add a record notice the addnew
'The 2, 2 is how the table is opened there are many ways it can be opened
rs.open "Schedules", conn, 2, 2

rs.addnew

rs("Release_Name") = request("release_name")
rs("Change_Number") = request("change_number")
rs("Change_Owner") = request("change_owner")
rs("Task_Owner") = request("task_owner")
rs("ADate") = request("date1")
rs("BDate") = request("date2")
rs("CDate") = request("date3")
rs("DDate") = request("date4")
rs("A1") = request("A1")
rs("A2") = request("A2")
rs("A3") = request("A3")
rs("A4") = request("A4")
rs("A5") = request("A5")
rs("B1") = request("B1")
rs("B2") = request("B2")
rs("B3") = request("B3")
rs("B4") = request("B4")
rs("B5") = request("B5")
rs("C1") = request("C1")
rs("C2") = request("C2")
rs("C3") = request("C3")
rs("C4") = request("C4")
rs("C5") = request("C5")
rs("D1") = request("D1")
rs("D2") = request("D2")
rs("D3") = request("D3")
rs("D4") = request("D4")
rs("D5") = request("D5")
rs("AStatus") = request("AStatus")
rs("BStatus") = request("BStatus")
rs("CStatus") = request("CStatus")
rs("DStatus") = request("DStatus")

rs.update

'I do a movelast here to get the ID that is automatically generated
'I also set the value to a local variable so I can write out to the database

set rs= nothing
set conn = nothing

%>

katy8439 | Posted 7:24am 16. February 2010 Server Time |

Are you actually receiving data from the form? I'm assuming you're posting data to your query from a form anyway

If you Response.Write out the values are you getting any data?

Before you open your database connection write out the data like so:

<%
For ix = 1 to Request.Form.Count
    fieldName = Request.Form.Key(ix)
    fieldValue = Request.Form.Item(ix)
    Response.write fieldName & " " &fieldValue&"<br />"
Next
%>

If there's no data coming through that's probably the problem - check that your field allows zero length and isn't required
new_learner | Posted 10:39pm 17. February 2010 Server Time |


Yes, I am getting the data from the form, and i also getting the response.write for all the Date values(ADate,BDate,CDate,DDate) and in the db field is set to allows zero length and isn't required.
Problem is somewhere in date, Its not letting me keep date fields empty when i try to add a record...pls help.
new_learner | Posted 10:42pm 17. February 2010 Server Time |

info...When i enter all the 4 dates fields it allows me to add the record. I have even tried to change the datatype to Date for this fields but same issue.
lymanknap | Posted 5:39am 4. August 2010 Server Time |

so4HF5  <a href="http://eccyquknhwmb.com/">eccyquknhwmb</a>, [url=http://nykopdkjoyic.com/]nykopdkjoyic[/url], [link=http://wpvksauhilts.com/]wpvksauhilts[/link], http://fbmfwgrnqblx.com/
lymanknap | Posted 3:00am 6. August 2010 Server Time |

9O7GC0  <a href="http://qdxgmnorixwf.com/">qdxgmnorixwf</a>, [url=http://npdybyiftbpa.com/]npdybyiftbpa[/url], [link=http://ifpsuxhffhnd.com/]ifpsuxhffhnd[/link], http://nircrvvyrlwq.com/
lymanknap | Posted 1:29pm 7. August 2010 Server Time |

http://www.nltsecrets.com/autoinsurance.html affordable auto insurance 8))) http://www.whatsatararrel.com/online-life-insurance.html online life insurance zfku http://www.whatsatararrel.com/ online auto insurance 8[[ http://www.tarinthai.com/lifeinsurancequotes.html national service life insurance >:PPP http://www.hiphopstash.com/home-insurance.html home insurance %)
lymanknap | Posted 9:01pm 8. August 2010 Server Time |

http://www.popcivics.com/ambien.html ambien news %-OOO http://www.six-k.com/accutane.html accutane online klyq http://www.popcivics.com/acomplia.html acomplia loss weight hetif http://www.venezuelaesdeportes.com/prednisone.html prednisone online 8O
choonchan | Posted 3:13am 11. August 2010 Server Time |

http://www.buycheaphomeinsurance.com/ cheap home insurance 963719 http://www.tophealthinsurers.com/ health insurance providers =-O http://www.findcarinsurancequotes.net/ car insurance quotes =PP http://www.getautoinsurancerates.net/ auto owners insurance :-DDD
choonchan | Posted 3:23pm 11. August 2010 Server Time |

http://www.ganjahcultivo.com/phentermine.html about phentermine :D http://www.donedems.com/ acomplia wonn http://www.nakuhin.com/ prednisone %-((( http://www.donedems.com/accutane.html order accutane online 7677
choonchan | Posted 3:32pm 12. August 2010 Server Time |

http://www.mysocalledperfectlife.com/pricelist_cialis.html cialis %[ http://www.compunere.info/ cialis online ztdh http://www.notquitebettycrocker.com/accutane.html accutane online :(( http://www.accountablepersonalbranding.com prednisone pdx
choonchan | Posted 5:17am 13. August 2010 Server Time |

http://www.basesparalariqueza.com/ acomplia no generic 016 http://www.ganjahcultivo.com/metoprolol.html Toprol online >:-] http://www.nakuhin.com/ prednisone uoknaq http://www.mediaspecblog.com/ accutane 38758
choonchan | Posted 10:12am 14. August 2010 Server Time |

http://www.randommadnessintorrance.com/accutane.html buy accutane rvfga http://www.eatzischicago.com/ accutane rvbto http://www.eatzischicago.com/prednisone.html prednisone online :] http://www.compunere.info/ cialis online 449614 http://www.venezuelaesdeportes.com/ buy accutane 018
mkaymer | Posted 10:58am 21. August 2010 Server Time |

http://www.buyphenterminenow.net/ phentermine mastercard 858299 http://www.bestsleepingpill.net/ order ambien online 07741 http://www.prozacsearch.com/ prozac uwj http://www.buyxanaxnow.net/ xanax %-[[[
mkaymer | Posted 10:32am 22. August 2010 Server Time |

http://www.rap-musiq.com/ acomplia on-line 60994 http://www.puterilembahpantai.com/ accutane :[[[ http://www.inmersiones.net/ purchase prednisone =-] http://www.sticksurf.info/ cialis dveg http://www.mcatel.com/ tramadol 78293
mkaymer | Posted 9:00am 25. August 2010 Server Time |

http://www.eltoromn.com/health_insurance.htm health insurance quotes 8[ http://www.theworryfreelife.com/health-insurance-quotes.html health insurance quotes 26535
mkaymer | Posted 2:21am 29. August 2010 Server Time |

http://weightlosspillsonline.org acomplia =-]]] http://tramadol911.com buy tramadol sbe http://edpillsonline.net cialis jgi
mkaymer | Posted 4:01am 29. August 2010 Server Time |

http://www.bee-gees.info/homeinsurance.html home owner insurance coverage bat http://www.pinkcollarclub.net/homeinsurance.html home insurance florida >:-P http://www.arcataenglishcockers.com/ health insurance quotes qnhdr http://www.ambermadison.tv/ auto insurance quotes >:[ http://www.robkellysurf.com/health_insurance_quotes.html health insurance quotes online yupkaj
mkaymer | Posted 7:13am 29. August 2010 Server Time |

http://www.twinsmobiledetailing.com/ cheap auto insurance 4434 http://www.fantagebetas.com/home-insurance.html home insurance pnj http://www.fantagebetas.com/ auto insurance :P http://www.fantagebetas.com/health-insurance.html new york health insurance 250621 http://www.steppingintothelight.net/ auto insurance quotes zjrp
mkaymer | Posted 10:19am 29. August 2010 Server Time |

http://www.pragmablog.com/ acomplia :D http://www.lovescousin.com/ meridia ugihnj http://www.nakuhin.com/ prednisone buy 0171 http://www.tennismaschile.com/tramadol.html bill consolidation buy tramadol =[[[


Reply to Post Type Mismatch error



Back to Forum Page