Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB Databases Basics
| Search | Today's Posts | Mark Forums Read
VB Databases Basics Beginning-level VB coding questions specific to using VB with databases. Issues not specific to database use will be redirected to other forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB Databases Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old September 1st, 2006, 11:47 AM
Authorized User
 
Join Date: Aug 2006
Location: , , .
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default Diff between Recordset.update & insert cmd

hi peeps
Could anyone plz explain the difference between update method of a recordset and insert into statement..cause iam trying to edit a row and then putting it back in the database.i get the error 3251 says current recordset doesnot support updating.this may be a limitation of the provider or of the selected locktype.
iam using sqlserver (works as it retrieves data into the fields)
CursorLocation = adUseClient
adOpenStatic, adLockOptimistic
recordset editmode is 0 ,how to change it to 1?
anything wrong ?here.
plz advice...
thanks.

  #2 (permalink)  
Old September 1st, 2006, 11:53 AM
Friend of Wrox
Points: 7,395, Level: 36
Points: 7,395, Level: 36 Points: 7,395, Level: 36 Points: 7,395, Level: 36
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Capital Federal, , Argentina.
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

hi there... you open the recordset static... open it in another mode like adOpenDynamic...



HTH

Gonzalo
  #3 (permalink)  
Old September 1st, 2006, 12:12 PM
Authorized User
 
Join Date: Aug 2006
Location: , , .
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanx for the reply mate
Still same problem..same error..

  #4 (permalink)  
Old September 1st, 2006, 12:14 PM
Friend of Wrox
Points: 7,395, Level: 36
Points: 7,395, Level: 36 Points: 7,395, Level: 36 Points: 7,395, Level: 36
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Capital Federal, , Argentina.
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

mmm and if you change the cursor location to server???

HTH

Gonzalo
  #5 (permalink)  
Old September 1st, 2006, 12:15 PM
Authorized User
 
Join Date: Aug 2006
Location: , , .
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Same Story mate..:(

  #6 (permalink)  
Old September 1st, 2006, 12:38 PM
Friend of Wrox
 
Join Date: Oct 2004
Location: India.
Posts: 224
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to ashu_from_india Send a message via Yahoo to ashu_from_india
Default

can u post ur connectionstring, connection open code also

  #7 (permalink)  
Old September 1st, 2006, 03:54 PM
Friend of Wrox
 
Join Date: May 2006
Location: San Diego, CA, USA.
Posts: 643
Thanks: 0
Thanked 0 Times in 0 Posts
Default

How are you opening your recordset?
Are you using the RecordSet.Open method or the Connection.Execute method?

You must use the Recordset.Open method to get an updateable recordset.

There are other scenarios that will cause this situation.

Woody Z http://www.learntoprogramnow.com


Similar Threads
Thread Thread Starter Forum Replies Last Post
Diff between C & C# yukijocelyn C# 4 November 27th, 2007 06:16 AM
insert & update statment problem (sql express) abdrabaa C# 2 July 15th, 2007 05:54 AM
diff b/w javascript validation & server side valid ashu VS.NET 2002/2003 1 March 27th, 2007 09:30 AM
Need help on MS SQL Server 005 Express INSERT cmd VictorVictor ASP.NET 2.0 Professional 7 November 23rd, 2006 02:12 AM
Diff. between GetDetails & GetDetailsRow organicglenn BOOK: ASP.NET Website Programming Problem-Design-Solution 1 October 10th, 2004 09:57 PM





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