Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sql Table Updates via Bound Forms Failing

Status
Not open for further replies.

markgrizzle

Programmer
Aug 3, 2003
288
US
Hi:
My access 2003 application uses this ado connection to sql server 2000 (I've removed line continuation characters in this example).

cnnString = "Provider = 'Microsoft.Access.OLEDB.10.0'; "
"Data Provider = 'SQLOLEDB'; "
"Data Source = 'SqlServerName'; "
"User ID = 'ApplicationUser';
"Password = 'password'; "
"Initial Catalog = 'DMAD' "

ApplicationUser is a default user that all users use to connect to the sql server.

I've assigned select, insert, update, and delete permissions to my tables for this ApplicationUser.

When I test it on the user's pc, updates fail with the following message

ODBC--update on a linked table 'TestLeg' failed.

[Microsoft][ODBC SQL Server Driver][SQL Server]UPDATE permission denied on object 'TestLeg',database 'dmad', owner 'dbo'. (#229)

<<OK>> <<Help>>

Insert and delete operations (via the ado connection) on the same table work.
My sql tables each have a TimeStamp field.
The editing form is bound.

My hunch is that it has something to do with the system DSN I'm using, but I can't find a setting in the ODBC Data Source Administrator dialog to adjust.

Thanks in advance, any help is appreciated.
 
I solved this by
1. removing the subform's recordseource property
2. setting the subform's recordset equal to an ado recordset
3. adding sql update code to the subform's (or field's) AfterUpdate event
4.calling form.requery to display the updated information
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top