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!

Parameter has no default value

Status
Not open for further replies.

Jim318

Programmer
Jul 1, 2002
33
0
0
US
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
 
Nevermind, I figured this out.

It appears that rebooting the computer sometimes makes the computer less cranky!

Thanks,
Jim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top