Date Insert in long format

Results 1 to 2 of 2

Thread: Date Insert in long format

  1. #1
    Join Date
    Dec 1969

    Default Date Insert in long format

    I am adding a date in long format<BR><BR>Saturday, July 07, 2001<BR><BR>But when I execute the code, I get an error<BR><BR>Provider error &#039;80020005&#039; <BR><BR>Type mismatch<BR><BR>The code that I am using is<BR><BR>Set Dconn2 = Server.CreateObject("ADODB.RecordSet")<BR>Dconn2.O pen "jobs", "joblist", adOpenKeySet, adLockPessimistic, adCmdTable<BR> Dconn2.AddNew<BR> Dconn2("Ddate") = Request("txtDate")<BR> Dconn2("clientser") = Request("txtser")<BR> Dconn2("clientnuml") = nub<BR><BR> &#039; Update the record<BR> Dconn2.Update<BR><BR> &#039; Retrive the ID<BR> lUserID = Dconn2("ID")<BR> Dconn2.Close<BR> Set Dconn2 = Nothing<BR> Response.Redirect("default.asp")<BR><BR>How do i solve this problem, I am using access database and I am using addnew to retrieve the ID so that immediately I can add new records to another table using the new ID

  2. #2
    Join Date
    Dec 1969
    Los Angeles, CA

    Default RE: Date Insert in long format

    It has to be in the short data format <BR>OR<BR>change the datatype of that column to varchar

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts