|
Cannot be zero-length error message
Hello
I have a form which should insert data into an MS Access 2000 database, but I am getting the following error message:
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Microsoft Access Driver] Field 'users.fullname' cannot be a zero-length string.
/myFlash/welcomeFlash.asp, line 20
However, I have just ensured that all fields allow zero-length values, uploaded the database again and still get the error message. When I look at the database online, I see that all fields are 'nullable'.
The script above refers to line 20 of my welcomeFlash.asp file which is:
<% @ Language=VBScript %>
<%
' Declare variables
Dim fullname,email,subject,country,message
'Get form field values from flashEmailTest.asp file
'Open MS Access database, store form field values, and close
set conn=Server.CreateObject("ADODB.Connection")
conn.Open "driver={Microsoft Access Driver (*.mdb)};DBQ=D:\Flashform.mdb;"
set rs = Server.CreateObject("ADODB.recordset")
SQL="INSERT INTO users (fullname, email, subject,country, message) VALUES ('" & _
fullname & "', '" & email & "','" & subject & "', '" & country & "', '" & message & "')"
rs.Open SQL, conn
Set rs=Nothing
conn.Close
Set conn=Nothing
%>
The formFlashTest.asp file referred to in the script above (and which gives me the same error message) is simply this:
<%@LANGUAGE="VBSCRIPT"%>
<%
Option Explicit
Response.Buffer = True
%>
<%
Dim fullname,email,subject,country,message
fullname = Request.Form("name_txt")
email = Request.Form("email_txt")
subject = Request.Form("subject_txt")
country = Request.Form("country_txt")
message = Request.Form("message_txt")
Server.Transfer "welcomeFlash.asp"
%>
I would be grateful for any assistance.
Thanks.
Steve
|