how to insert all characters in database from textbox
-
hello guys i have doing some project and since i have new for vb.net 2010. my project is coded in vb.net 2010 and ms access 2007 mdb database. i have DocId, description, date and other fileds in the table.. my querry works for all but. i can't add all characters except integers in the database column DocId. it accepts only integer values. so how can i insert characters in the DocId filed. here is the detail the DocId filed property is Text field tables: DocId======Textbox name RefferencNoTxt.Text Table name = EraDms database name= data
cmd.CommandText = "INSERT INTO EraDms(DocId,Description,Address,NoOfPages, SendOrReceived, SentDate,ReceivedDate,ForwardedWorkingUnit,Attachements,ForwardedDate,ReceivedBy,DocPath) " & _
" VALUES(" & Me.RefferencNoTxt.Text.ToString & ",'" & Me.DescriptionTextBox.Text & "','" & Me.AddressTextBox.Text & "','" & Me.NoOfPagesTextBox.Text & "','" & Me.SendOrReceievedComboBox.Text & "','" & _
Me.SentDateTextBox.Text & "','" & Me.receivedDate.Text & "','" & Me.ForwardedWorkingUnitTextBox.Text & "','" & Me.AttachementsTextBox.Text & "','" & Me.TextBox6.Text & "','" & Me.ReceivedByTextBox.Text & "','" & Me.DocPathTextBox.Text & "')"
cmd.ExecuteNonQuery()
MessageBox.Show("File Upload Successfull", "ERA-DMS-File Uploader", MessageBoxButtons.OK, MessageBoxIcon.Information)
RefreshData()' With ERA\_DMS\_HOME ' End With cnn.Close() Else 'update data in table cmd.CommandText = "UPDATE Eradms " & \_ " SET DocId=" & Me.RefferencNoTxt.Text.ToString & \_ ", Description='" & Me.DescriptionTextBox.Text & "'" & \_ ", Address='" & Me.AddressTextBox.Text & "'" & \_ ", NoOfPages='" & Me.NoOfPagesTextBox.Text & "'" & \_ ", SendOrReceived='" & Me.SendOrReceievedComboBox.Text & &quo
-
hello guys i have doing some project and since i have new for vb.net 2010. my project is coded in vb.net 2010 and ms access 2007 mdb database. i have DocId, description, date and other fileds in the table.. my querry works for all but. i can't add all characters except integers in the database column DocId. it accepts only integer values. so how can i insert characters in the DocId filed. here is the detail the DocId filed property is Text field tables: DocId======Textbox name RefferencNoTxt.Text Table name = EraDms database name= data
cmd.CommandText = "INSERT INTO EraDms(DocId,Description,Address,NoOfPages, SendOrReceived, SentDate,ReceivedDate,ForwardedWorkingUnit,Attachements,ForwardedDate,ReceivedBy,DocPath) " & _
" VALUES(" & Me.RefferencNoTxt.Text.ToString & ",'" & Me.DescriptionTextBox.Text & "','" & Me.AddressTextBox.Text & "','" & Me.NoOfPagesTextBox.Text & "','" & Me.SendOrReceievedComboBox.Text & "','" & _
Me.SentDateTextBox.Text & "','" & Me.receivedDate.Text & "','" & Me.ForwardedWorkingUnitTextBox.Text & "','" & Me.AttachementsTextBox.Text & "','" & Me.TextBox6.Text & "','" & Me.ReceivedByTextBox.Text & "','" & Me.DocPathTextBox.Text & "')"
cmd.ExecuteNonQuery()
MessageBox.Show("File Upload Successfull", "ERA-DMS-File Uploader", MessageBoxButtons.OK, MessageBoxIcon.Information)
RefreshData()' With ERA\_DMS\_HOME ' End With cnn.Close() Else 'update data in table cmd.CommandText = "UPDATE Eradms " & \_ " SET DocId=" & Me.RefferencNoTxt.Text.ToString & \_ ", Description='" & Me.DescriptionTextBox.Text & "'" & \_ ", Address='" & Me.AddressTextBox.Text & "'" & \_ ", NoOfPages='" & Me.NoOfPagesTextBox.Text & "'" & \_ ", SendOrReceived='" & Me.SendOrReceievedComboBox.Text & &quo
You've already posted this question in the Visual Basic forum[^]. Don't post the same question in multiple forums.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer