I have three text boxes that I am using to update a table in an access database. When I user numeric values in the textboxes everything works fine. Yet, when I try to enter letters I get Parameter "what ever is in the text box" has no default value.
I have not figured out a way around this yet and was hoping for some help.
Here is a brief snipet of what I am doing.
adoopen.Open()
adpinsertcommand1.CommandText = ("INSERT INTO [Activity Tracking] (Description, Notes, [Event ID]) VALUES (" & strdes & "," & strnotes & "," & strid & ""
adpinsertcommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("strdes", System.Data.OleDb.OleDbType.VarChar, 50, "Description")
adpinsertcommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("strnotes", System.Data.OleDb.OleDbType.VarChar, 5, "Notes")
adpinsertcommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("strid", System.Data.OleDb.OleDbType.VarChar, 5, "EventID")
adpinsertcommand1.ExecuteNonQuery()
adoopen.Close()
Thanks,
Jim
I have not figured out a way around this yet and was hoping for some help.
Here is a brief snipet of what I am doing.
adoopen.Open()
adpinsertcommand1.CommandText = ("INSERT INTO [Activity Tracking] (Description, Notes, [Event ID]) VALUES (" & strdes & "," & strnotes & "," & strid & ""
adpinsertcommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("strdes", System.Data.OleDb.OleDbType.VarChar, 50, "Description")
adpinsertcommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("strnotes", System.Data.OleDb.OleDbType.VarChar, 5, "Notes")
adpinsertcommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("strid", System.Data.OleDb.OleDbType.VarChar, 5, "EventID")
adpinsertcommand1.ExecuteNonQuery()
adoopen.Close()
Thanks,
Jim