M
MC
Hello,
I have an access 2000 application with linked tables to sql server
2000. I have used DAO queries before to get data( i.e. select staements) and
works fine.References are set for DAO 3.6 object library, and I am trying to
update records in a table from VBA code and it gives an "Operation is not
supported for this type of object", but the query by itself updates the table
fine.
I moved to ado code when this did not work but am curious to know the answer.
code for query: PARAMETERS [@projID] IEEEDouble, [@ParentProjID] IEEEDouble;
UPDATE SubProjectDetails SET parent_projId = [@ParentProjID]
WHERE [SubProjectDetails].[Projectid]=[@projID];
DAO code: Set mydef = db.QueryDefs("Q_InsertParentProjID") ' name of query
above
mydef![@Projid] = intprojid
'[Forms]![frmsubProj_Admin]![txtprojid]
mydef![@ParentProjid] = intparentprojid
For Each daoerr In DBEngine.Errors
MsgBox daoerr.Description
Next daoerr
mydef.Close
any idea if this is a bug? or am I doing something wrong?
Thanks,
MC
I have an access 2000 application with linked tables to sql server
2000. I have used DAO queries before to get data( i.e. select staements) and
works fine.References are set for DAO 3.6 object library, and I am trying to
update records in a table from VBA code and it gives an "Operation is not
supported for this type of object", but the query by itself updates the table
fine.
I moved to ado code when this did not work but am curious to know the answer.
code for query: PARAMETERS [@projID] IEEEDouble, [@ParentProjID] IEEEDouble;
UPDATE SubProjectDetails SET parent_projId = [@ParentProjID]
WHERE [SubProjectDetails].[Projectid]=[@projID];
DAO code: Set mydef = db.QueryDefs("Q_InsertParentProjID") ' name of query
above
mydef![@Projid] = intprojid
'[Forms]![frmsubProj_Admin]![txtprojid]
mydef![@ParentProjid] = intparentprojid
For Each daoerr In DBEngine.Errors
MsgBox daoerr.Description
Next daoerr
mydef.Close
any idea if this is a bug? or am I doing something wrong?
Thanks,
MC