Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA 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
 
Old April 23rd, 2004, 11:05 AM
Registered User
 
Join Date: Sep 2003
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default Access 2000 forms not updatable

hi!

i have an adp project that is linked to SQL SERVER 2000. one of the forms has the record source set to a STORED PROCEDURE. if i use bound forms, and i try to update the records retrieved, i get an error RECORDSET NOT UPDATABLE. why? how do i get around this problem.

also i need to use a Stored Procedure, because, there is an input parameter, that is assigned during runtime.....

any help is greatly appreciated.PLEASE HELP.......

 
Old April 25th, 2004, 04:59 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 308
Thanks: 0
Thanked 0 Times in 0 Posts
Default

One possible option is to use the concepts used with unbound forms with your bound forms.
For example, have an "Save/Update" button on the form, which, rather than a standard Save function, attach some SQL commands attached to it, such as:
Code:
DoCmd.RunSQL "UPDATE Table1 " _
  & "SET Field1 = '" & Form_Form1.Field1 & "', " _
  & "PatientId = '" & Form_Form1.Field2 & "' " _
  & "WHERE (((Table1.PRIMARYKEY)=" & Form_Form1.PrimaryKeyField & "));"

I am a loud man with a very large hat. This means I am in charge
 
Old April 26th, 2004, 02:19 PM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 451
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Ben Horne
Default

Steven,

I don't think that the DoCmd statement would be acceptable SQL syntax. I might be wrong on this, though
 
Old May 27th, 2004, 12:54 PM
Registered User
 
Join Date: May 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ever have any luck solving this issue??? It is something I am also experiencing and was wondering if perhaps you could share a workaround??? Thanks in advance

 
Old May 28th, 2004, 10:44 PM
sal sal is offline
Friend of Wrox
 
Join Date: Oct 2003
Posts: 702
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Stored procedures are not updatable. Use an updatable view instead.



Sal





Similar Threads
Thread Thread Starter Forum Replies Last Post
Access97 local forms in Access 2000/2002 vance696 Access 2 October 14th, 2005 10:26 AM
SQL SERVER 2000 AND ACCESS 2000 ckentebe SQL Server 2000 3 June 17th, 2004 08:50 PM
ADE file in Access 2000 <---> Access XP ginoitalo Access 3 April 14th, 2004 09:06 PM
forms authentication with sql server 2000 Lee8mm ASP.NET 1.0 and 1.1 Professional 0 September 26th, 2003 08:58 AM
Access XP VBA compatibility issues w/ Access 2000 bourgeois02 Access VBA 1 August 19th, 2003 04:14 PM





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