Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Zero-length string error?

Status
Not open for further replies.

SteveHigh

Technical User
Jan 17, 2007
158
0
0
GB
Hello

I am getting the following error message and do not understand it:

[Microsoft][ODBC Microsoft Access Driver] Field 'users.subject' cannot be a zero-length string.

/myFlash/welcomeFlash.asp, line 20

Line 20 concerns an insert into the database. Do I need to change the database field so that it does not allow zero-length strings?


<%
Dim fullname,email,subject,country,message

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
%>
 
Hello

I have now ensured that all of my fields do allow zero-length strings (in the MS Access 2000 'Design View' it says 'Yes' next to Allow Zero-Length), yet still have this error message:

Microsoft][ODBC Microsoft Access Driver] Field 'users.fullname' cannot be a zero-length string.

/myFlash/welcomeFlash.asp, line 20

I would be grateful for any suggestions. It seems that I have an error, but that I am getting the wrong error message.

Many thanks.

Steve
 
It seems that I have an error, but that I am getting the wrong error message.

Does it go away when you send something other than a zero-length string?
 
Is there something that's setting a minimum number of characters or an input mask?

Just my 2¢
-Cole's Law: Shredded cabbage

--Greg
 
Steve, is the "Required" field set to Yes for this column?

where would we be without rhetorical questions...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top