Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB How-To
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
VB How-To Ask your "How do I do this with VB?" questions in this forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB How-To section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 18th, 2004, 10:50 AM
Authorized User
Points: 79, Level: 1
Points: 79, Level: 1 Points: 79, Level: 1 Points: 79, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2004
Location: , , .
Posts: 11
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via AIM to bisigreat
Default What is the code for editing data

Hello,
I need to edit some data that is displayed on two text boxes and save after editing the data. So i wrote this lines of code
    With rsSS
        .EditMode
        rsSS!Code = txtCardCatCode.Text
        rsSS!Description = txtCardCatDesc.Text
        .Update
    End With
but is giving this error "Invalid use of Property" when it teaches .EditMode
Kindly help out





Reply With Quote
  #2 (permalink)  
Old August 18th, 2004, 11:55 PM
Friend of Wrox
 
Join Date: Oct 2003
Location: Cochin, Kerala, India.
Posts: 463
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to madhukp
Default

The usage of ADO recordset in this way is not good or efficient. You can do it in this way.

cnSS.Execute "UPDATE <tablename> SET Code='" & Replace(txtCardCatCode.Text, "'", "''") & "', Description='" & Replace(txtCardCatDesc.Text, "'", "''") & "' WHERE " & <where condition>

Where cnSS is the ADO connection object with which you open the recordset. <tablename> is the name of the table where you modify. <Where condition> is to selectively modify the records of the table. You may use the where condition you used in the select query with which you opened the recordset.
Reply With Quote
  #3 (permalink)  
Old August 19th, 2004, 03:06 AM
Authorized User
Points: 79, Level: 1
Points: 79, Level: 1 Points: 79, Level: 1 Points: 79, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2004
Location: , , .
Posts: 11
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via AIM to bisigreat
Default

Thank you,
It worked. Honestly, your responses has been an encouragement to me.

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Data Binding - Editing GridView Row Data desk_star BOOK: Professional ASP.NET 2.0 and Special Edition; ISBN: 978-0-7645-7610-2; ISBN: 978-0-470-04178-9 7 December 30th, 2007 11:07 AM
Transpose Table - Editing the MS KB code gwolfe Access 2 September 14th, 2007 02:48 AM
Editing Data in a DataView thenextbillgates ASP.NET 1.0 and 1.1 Basics 3 April 10th, 2006 09:40 PM
Data Grid Editing in C# bmains C# 1 December 16th, 2004 04:23 AM
Visual Basic code for Updating (Editing) DataSet11 connijean VB Databases Basics 0 May 5th, 2004 05:53 PM



All times are GMT -4. The time now is 08:55 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.