| | |
About Updating a Record in adodb
![]() |
ur code is
I assume scode, pcode, unit, pcarrier, pterms, drnumber, date are Text fields
and quantity, amount are Numeric fields
hence
also remove the
, cn, adOpenKeyset, adLockPessimistic
in the insert statement.
Regards
Shaik Akthar
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
"Insert Into Deliver (scode, pcode, quantity, unit, amount, pcarrier, pterms, drnumber, date) Values ('" + Combo1.Text + "','" + Combo2.Text + "'," + Text1.Text + "," + Text2.Text + "," + Text3.Text + "," + Text4.Text + "," + Text5.Text + "," + Text6.Text + "," + Text7.Text + ")"
I assume scode, pcode, unit, pcarrier, pterms, drnumber, date are Text fields
and quantity, amount are Numeric fields
hence
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
"Insert Into Deliver (scode, pcode, quantity, unit, amount, pcarrier, pterms, drnumber, date) Values ('" + Combo1.Text + "','" + Combo2.Text + "'," + Text1.Text + ",'" + Text2.Text + "'," + Text3.Text + ",'" + Text4.Text + "','" + Text5.Text + "','" + Text6.Text + "','" + Text7.Text + "')"
also remove the
, cn, adOpenKeyset, adLockPessimistic
in the insert statement.
Regards
Shaik Akthar
If the database is MS-Access u have to use a # for date field.
It goes like this. replace the query with this one.
It goes like this. replace the query with this one.
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
"Insert Into Deliver (scode, pcode, quantity, unit, amount, pcarrier, pterms, drnumber, date) Values ('" + Combo1.Text + "','" + Combo2.Text + "'," + Text1.Text + ",'" + Text2.Text + "'," + Text3.Text + ",'" + Text4.Text + "','" + Text5.Text + "','" + Text6.Text + "',#" + Text7.Text + "#)"
Regards
Shaik Akthar
Shaik Akthar
![]() |
Similar Threads
- Updating columns in an access database using c# (C#)
- Read Me:Access to any type of DB's possible (Visual Basic 4 / 5 / 6)
- Updating an Access database with a secondary form (VB.NET)
- how to validate text file, loading into listbox (Visual Basic 4 / 5 / 6)
- need help in VB Code (MS Access and FileMaker Pro)
- Addnew problem (Visual Basic 4 / 5 / 6)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: Visual Basic 6 - Hide Folders
- Next Thread: Would like to get back VB ver 6.0 source code
| Thread Tools | Search this Thread |
* 6 429 2007 access activex add age application basic beginner birth bmp calculator cd cells.find click client code college component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report save search sendbyte sites sort sql sql2008 sqlserver subroutine tags textbox time urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows





