•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Visual Basic 4 / 5 / 6 section within the Software Development category of DaniWeb, a massive community of 426,416 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,343 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums
Views: 466 | Replies: 3
•
•
Join Date: Jun 2007
Location: india /bangalore
Posts: 18
Reputation:
Rep Power: 2
Solved Threads: 0
i have typed this code within my form..
////and in the general module...the connection has been done
see this..
the problem is when i add data into the database it throws me this error at times
Run-time error `-2147217887(80040e21)`
multiple-step operation generated errors.check each status value
and sumtimes it adds records to the database
vb Syntax (Toggle Plain Text)
Private Sub Command1_Click() SQL = "select * from cusinfo" Call connrecordset(CustomerInfo, SQL) With CustomerInfo CustomerInfo.MoveLast !Name = txtName.Text !Address = txtAddress.Text !DOB = DTDOB.Value !Age = DateDiff("yyyy", DTDOB.Value, Now()) + Int(Format(Now(), "mmdd") < Format(DTDOB.Value, "mmdd")) !Sex = cmbSex.Text !PassportNo = txtPassport.Text !Country = txtCountry.Text !City = txtCity.Text !TelephoneNo = txtHome.Text !MobileNo = txtMobile.Text !Email = txtEmail.Text .Update End With End Sub Private Sub Form_Load() Call dbconnection End Sub
////and in the general module...the connection has been done
see this..
vb Syntax (Toggle Plain Text)
Public SQL As String Public connParadise As ADODB.Connection Public CustomerInfo As ADODB.Recordset Public Sub dbconnection() 'connection to the database Set connParadise = New ADODB.Connection connParadise.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\pukoo.mdb;Persist Security Info=False" connParadise.CursorLocation = adUseClient connParadise.Open 'database connection established End Sub Public Sub connrecordset(tbname As ADODB.Recordset, sequel As String) 'connect to record set Set tbname = New ADODB.Recordset With tbname .CursorType = adOpenDynamic .LockType = adLockOptimistic .Source = sequel .ActiveConnection = connParadise .Open End With 'connection to the record set established End Sub
the problem is when i add data into the database it throws me this error at times
Run-time error `-2147217887(80040e21)`
multiple-step operation generated errors.check each status value
and sumtimes it adds records to the database
Last edited by WolfPack : Mar 22nd, 2008 at 7:07 am. Reason: Added code tags. Use them when you post code. Also corrected indenting.
•
•
•
•
•
•
•
•
DaniWeb Visual Basic 4 / 5 / 6 Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
- Blue Screen Error (Windows NT / 2000 / XP / 2003)
- [Linker error] undefined reference to `SDL_Init' (C++)
- ialmrnt5 error (Monitors, Displays and Video Cards)
- Perl error reports: error prone (Perl)
- a disk read error has occurred (Windows NT / 2000 / XP / 2003)
- Disk Read Error while booting Windows (Windows NT / 2000 / XP / 2003)
- Delphi Pascal Error (Pascal and Delphi)
- What Should I Do Next? (Viruses, Spyware and other Nasties)
- svchost.exe error (Windows NT / 2000 / XP / 2003)
- VMWare Unrecoverable Error (*nix Software)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: Collection
- Next Thread: Error Handling: Blank Error Description



Threaded Mode