|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Vb Error Updating With Access Database
Good Afternoon.
I am posting this again. Usually I receive a response very quick, but since there were 2 responses due to me posting on the wrong site, maybe it got overlooked. I would really appreciate the help. Thanks in advance. I get error "3251" (Object or provider is not capable of performing requested operation). I am able to update Access table when I read sequentially thru the file; sample code: strSql = "Abends" rstAbends.Open strSql, strConn1, adOpenKeyset, adLockOptimistic, adCmdTable intFlag = 0 Do Until rstAbends.EOF Or intFlag = 1 If rstAbends!JesNumber = txtJesNum.Text Then If (Len(txtTurnAround.Text) > 0) And rstAbends!turnaroundaction <> UCase(txtTurnAround.Text) Then rstAbends!turnaroundaction =UCase (txtTurnAround.Text) End If intFlag = 1 rstAbends.Update However, when I use the SQL statement to retrieve the record, (which is the correct way to do it since I know the key value!), I get the above mentioned error, which will not even allow me to perform an assignment statement to the field. strjesnumber does have a value. rstAbends.Open strSql, strConn1, adOpenKeyset, adLockOptimistic, adCmdTable Set rstAbends = olah_cndb.Execute("Select * from ABENDS WHERE jesnumber = '" & strjesnumber & "'") 'If Not IsNull(txtTurnAround.Text) Then If (Len(txtTurnAround.Text) > 0) And rstAbends!turnaroundaction <> UCase(txtTurnAround.Text) Then rstAbends!turnaroundaction = UCase(txtTurnAround.Text) End If rstAbends.Update Thanks in advance ![]() |
|
#2
|
|||
|
|||
|
What is the Data Type for jesnumber? Text? Number? Long?
What is the Declaration Type for Variable for strjesnumber? String?
__________________
I May Have Misinterpret U'r Post Correct Me If I Am Wrong......// Enjoy Coding........................../// zak2zak |
|
#3
|
|||
|
|||
|
both fields are string. And thank you; I am enjoying the challenge! Hope you can help me with this one.
|
|
#4
|
|||
|
|||
|
May be this helps....
Why don't U try cmdText Code:
strSQl = "Select * from ABENDS WHERE jesnumber = '" & strjesnumber & "'" rstAbends.Open strSql, strConn1, adOpenKeyset, adLockOptimistic, adCmdText |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Visual Basic Programming > Vb Error Updating With Access Database |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|