Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Iron Speed
Go Back   ASP Free ForumsProgrammingVisual 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 ASP Free Forums Sponsor:
You eat, breathe and sleep innovation. Build your mobile intelligence with BlackBerry® experts this July. Register Today!
  #1  
Old October 11th, 2004, 04:19 AM
x_c4_4u x_c4_4u is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Location: Zimbabwe
Posts: 34 x_c4_4u User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 10 m 15 sec
Reputation Power: 4
Send a message via Yahoo to x_c4_4u
Updating Records called using adCmdText

i have a problem:
i am searching for a details of a record based on the record enterd by the user. i use adcmdText with an sql string. now, i want to update the details but adcmd does not allow updating also, adcmdTable is not allowing the sql string.
how do i get around this problem


Private Sub Combo1_Click()
sql = "SELECT DISTINCT * FROM Video WHERE VideoID='" & Combo1.Text & "'"
ro.Open sql, cn, adOpenStatic, adLockOptimistic, adCmdText

Set Text4.DataSource = ro
Text4.DataField = "Status"
end sub

Video is the Table
VideoID is the record the user will select from a list

Reply With Quote
  #2  
Old October 11th, 2004, 01:35 PM
Doug G Doug G is offline
Grumpier Old Moderator
ASP Free God 11th Plane (10000 - 10499 posts)
 
Join Date: Sep 2003
Posts: 10,143 Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 3 Weeks 4 Days 18 h 51 m 25 sec
Reputation Power: 180
What exactly doesn't work? Any errors?
__________________
======
Doug G
======
I didn't attend the funeral, but I sent a nice letter saying I approved of it. --Mark Twain

Reply With Quote
  #3  
Old October 13th, 2004, 01:17 AM
x_c4_4u x_c4_4u is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Location: Zimbabwe
Posts: 34 x_c4_4u User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 10 m 15 sec
Reputation Power: 4
Send a message via Yahoo to x_c4_4u
text4 is not being updated and i get an error saying field is not updatable

Reply With Quote
  #4  
Old October 13th, 2004, 12:24 PM
Doug G Doug G is offline
Grumpier Old Moderator
ASP Free God 11th Plane (10000 - 10499 posts)
 
Join Date: Sep 2003
Posts: 10,143 Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 3 Weeks 4 Days 18 h 51 m 25 sec
Reputation Power: 180
Do you think it would be helpful to post the error message and the relevant code? I do.

Reply With Quote
  #5  
Old October 14th, 2004, 03:16 AM
x_c4_4u x_c4_4u is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Location: Zimbabwe
Posts: 34 x_c4_4u User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 10 m 15 sec
Reputation Power: 4
Send a message via Yahoo to x_c4_4u
the codes

these are the codes rent and video are classes.
Attached Files
File Type: doc codes.doc (11.0 KB, 210 views)

Reply With Quote
  #6  
Old October 14th, 2004, 04:57 PM
Doug G Doug G is offline
Grumpier Old Moderator
ASP Free God 11th Plane (10000 - 10499 posts)
 
Join Date: Sep 2003
Posts: 10,143 Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 3 Weeks 4 Days 18 h 51 m 25 sec
Reputation Power: 180
You should attach your code as text. In today's internet world I'm hesitant to open any files that may contain executables, like doc files.

Reply With Quote
  #7  
Old October 15th, 2004, 01:51 AM
x_c4_4u x_c4_4u is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Location: Zimbabwe
Posts: 34 x_c4_4u User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 10 m 15 sec
Reputation Power: 4
Send a message via Yahoo to x_c4_4u
Lightbulb

...the text file
Attached Files
File Type: txt text.txt (2.4 KB, 240 views)

Reply With Quote
  #8  
Old October 15th, 2004, 10:45 AM
Doug G Doug G is offline
Grumpier Old Moderator
ASP Free God 11th Plane (10000 - 10499 posts)
 
Join Date: Sep 2003
Posts: 10,143 Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 3 Weeks 4 Days 18 h 51 m 25 sec
Reputation Power: 180
I don't see where you ever set a text4.enabled

What is the exact error message and what line of code is causing the error?

I see you're using an access DB, andother common issue is if your mdb file is marked as read-only on disk, or if your user account doesn't have write privileges to the mdb file.

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingVisual Basic Programming > Updating Records called using adCmdText


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 | 
  
 

IBM developerWorks




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