Microsoft OLE DB Provider for ODBC Drivers error &

Results 1 to 3 of 3

Thread: Microsoft OLE DB Provider for ODBC Drivers error &

  1. #1

    Default Microsoft OLE DB Provider for ODBC Drivers error &

    when i try to update a record in my access database, the following error occured:<BR><BR>Microsoft OLE DB Provider for ODBC Drivers error &#039 80040e14&#039 <BR>[Microsoft][ODBC Microsoft Access Driver]Division by zero (null) <BR>line 25 <BR><BR>line 25 in my program: set rs=Conn.Execute(sql)<BR>in which:<BR>sql="Update Vessel set Vessel_Name=&#039"& request("Vessel_Name")&"&#039,"<BR>sql=sql & "Voy_no=&#039" & request("Voy_no") &"&#039,"<BR>sql=sql & "CFS_closing= " & request("CFS_closing") &","<BR>sql=sql & "CY_closing= " & request("CY_closing") & " where Vessel_Name=&#039" & request("org_ves_ID") &"&#039 AND Voy_no=&#039"&request("org_voy_no") &"&#039"<BR><BR>(P.S: type of CFS_closing and CY_closing is Date.)<BR><BR>i think there is no syntax error in my sql statement, so what&#039s wrong?????<BR><BR>HELP!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!

  2. #2
    Join Date
    Dec 1969

    Default RE: Microsoft OLE DB Provider for ODBC Drivers err

    the only time i&#039ve seen this before is people checking rs.recordcount for zero (they should be checking EOF)<BR><BR>is it definitely the same page the error is occuring on? sometimes a response.redirect leaves your address bar with the wrong address. if you response.redirect after insert, that could be it.<BR><BR>jason

  3. #3
    Papa Zito Guest

    Default RE: Microsoft OLE DB Provider for ODBC Drivers err

    Hey Froggy,<BR><BR>I dunno if you&#039re still out there, but just in case...<BR><BR>I noticed 3 things. Of course, none of the 3 things should generate that exact error, but maybe fixing/checking these 3 might help you...<BR><BR>1. On your first line of your SQL statement, then & symbol is touching the ) in your Request("Vessel_Name"). VBScript will probably treat that as 1 whole word.<BR><BR>2. On your dates, you need the # signs before and after. Example :<BR><BR>sql = sql & "CFS_closing=#" & Request("CFS_closing") & "#,"<BR><BR>3. This statement isn&#039t dynamic, meaning that it&#039ll fail if any of the variables is null. Try adding If...Then statements to each line so that it can adjust itself (or add in client-side validation on your input page). Example for dynamic sql :<BR><BR>If Request("Voy_no") &#060;&#062; "" then<BR>sql=sql & "Voy_no=&#039" & Request.("Voy_no") & "&#039,"<BR>end if<BR><BR>Like I said though... I can&#039t think of any way that any of these things would generate that particular error. I hope it helps though.

Posting Permissions

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