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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help!!! Cannot update a multitablequery from within VB app

Status
Not open for further replies.

NewfieLab

Technical User
Feb 14, 2001
5
CA
I have a multitable query created in a access 2000 database and all the tables in the query have one to one relationships. I have a connection made to the database in visual basic and a recordset created to access the data in the query based on a sql statement. both the connection and the recordset work fine and the data from the query is being entered into the VB program fine. when I try to send the data back to the query to update the tables I get the following error;

Runtime error '3251'
The operation requested by the application is not supported by the provider

the following is the code for the recordset;

SiteSQL = "select * from qrySampleInfo where strSiteLocation = '" & _
cboSiteLocation & "'"

Set EnvData = New Recordset
EnvData.CursorType = adOpenDynamic
EnvData.Open SiteSQL, EnvConnect, , , dbSQLPassThrough

and the error is created on the following;(gk is a field in the query)

EnvData!gK = gK

I would appreciate any help, i am not sure what is going on here, I can edit the query data in the database when I am in datasheet view.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top