Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old August 24th, 2003, 07:46 PM
emwatts emwatts is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: chicago
Posts: 12 emwatts User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
  #2  
Old August 25th, 2003, 09:19 AM
zak2zak zak2zak is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: Singapore
Posts: 34 zak2zak User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Send a message via Yahoo to zak2zak
Lightbulb May i comment ....

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

Reply With Quote
  #3  
Old August 25th, 2003, 10:22 AM
emwatts emwatts is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: chicago
Posts: 12 emwatts User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
both fields are string. And thank you; I am enjoying the challenge! Hope you can help me with this one.

Reply With Quote
  #4  
Old August 25th, 2003, 10:41 AM
zak2zak zak2zak is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: Singapore
Posts: 34 zak2zak User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Send a message via Yahoo to zak2zak
Lightbulb May i comment ....

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

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming > Vb Error Updating With Access Database


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway