DB update (doesn't work, why??)

Results 1 to 4 of 4

Thread: DB update (doesn't work, why??)

  1. #1
    ktee Guest

    Default DB update (doesn't work, why??)

    Hi all,<BR><BR>Here is my code:<BR>----------<BR>Dim fullname, org, address, city, state, request_ID<BR>request_ID = 5 &#039;5 is the existing row that I want to update<BR><BR>fullname = Request.Form("fullname")<BR>org = Request.Form("org")<BR>address = Request.Form("address")<BR>city = Request.Form("city")<BR>state = Request.Form("state")<BR>zip = Request.Form("zip")<BR><BR>Set objCmd = server.CreateObject("ADODB.Command")<BR>With objCmd<BR> .ActiveConnection = conn<BR> .CommandText = "request_form"<BR> .CommandType = adCmdstoredProc<BR>.Parameters.Append .CreateParameter ("Enter_user_name",adChar,adParamInput,20, fullname) <BR> .Parameters.Append .CreateParameter ("Enter_user_company",adChar,adParamInput,40, org)<BR> .Parameters.Append .CreateParameter ("Enter_user_company",adChar,adParamInput,40, address)<BR> .Parameters.Append .CreateParameter ("Enter_user_city",adChar,adParamInput,20, city)<BR> .Parameters.Append .CreateParameter ("Enter_user_state",adChar,adParamInput,2, state)<BR> .Parameters.Append .CreateParameter ("Enter_user_zip",adChar,adParamInput,9, zip)<BR> .Execute <BR>End With<BR>------------<BR><BR>It doesn&#039;t give me any error but it also doesn&#039;t work.<BR>I tested my SQL query (access db) and it works just fine there.<BR>Here is my query:<BR><BR>UPDATE request SET request.request_date = Now(), request.user_name = [Enter_user_name], request.user_company = [Enter_user_company], request.user_street = [Enter_user_street], request.user_city = [Enter_user_city], request.state_code = [Enter_user_state], request.user_zip_code = [Enter_user_zip]<BR>WHERE (((request.request_id)=[Enter_req_id]));<BR><BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: DB update (doesn't work, why??)

    Don&#039;t dates have to be surrounded with #date# in access?

  3. #3
    prakash<eop> Guest

    Default use * # * for dates


  4. #4
    ktee Guest

    Default RE: DB update (doesn't work, why??)

    Thanksssssss a bunch!!<BR><BR>Although, it wasn&#039;t the date problem. I changed the order of the objParameter as my query and it works great.<BR><BR>Thank you for trying, I always get help from this place!! THANKS

Posting Permissions

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