In my program, I have a section to insert information about a customer into an Access database. I get the error below at the .ExecuteNonQuery. Message: System.Data.OleDb.OleDbException (0x80004005): Field 'Customer.Business_Phone' cannot be a zero-length string. at System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(OleDbHResult hr) at System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult) at System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult) at System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult) at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method) at System.Data.OleDb.OleDbCommand.ExecuteNonQuery() The problem I'm having, is that the Business_Phone *does* have a value in it. I added the msgbox to be sure, and it displays "9876543210", just like I entered. The database field is set to not allow zero length strings, because I …

Member Avatar
Member Avatar
+0 forum 5

Hi all, In the program I'm working on, I am making a form that submits data to an Access 2007 database. I can connect to the database fine and run a select query, but when I try an insert query I get an error: "statement contains the following unknown field name: 'Last_Name' (see details below). This error occurs at my ExecuteReader command. The field is present in my table, and I've double checked for extra spaces and the like. Any ideas what could be causing this error? The relevent code is: Dim custstr As String = "INSERT INTO [Customer] ([Company], …

Member Avatar
Member Avatar
+0 forum 6

The End.