I'm trying to open an ADO Recordset with the following:
Dim rst As ADODB.Recordset
Set rst = New ADODB.Recordset
Dim ProjectORGID As String
Dim ProjectISNUMBER As Long
ProjectORGID = "ZZZZDEMO"
ProjectISNUMBER = 1
rst.Open "qrySelectedProjectCitations", CurrentProject.Connection, adOpenStatic, adLockReadOnly, adCmdTable
The SQL from qrySelectedProjectCitations is:
PARAMETERS ProjectISNUMBER Long, ProjectORGID Text ( 255 );
SELECT tblCitationProjectAssignment.LocProj_IS_NUMBER, tblCitationProjectAssignment.LocProj_ORG_ID, tblCitationProjectAssignment.LocCITN_IS_NUMBER, tblCitationProjectAssignment.LocCITN_ORG_ID, tblCitationProjectAssignment.TSMPROJ_IS_NUMBER, tblCitationProjectAssignment.TSMPROJ_ORG_ID, tblCitationProjectAssignment.TSRCITN_IS_NUMBER, tblCitationProjectAssignment.TSRCITN_ORG_ID, tblCitationProjectAssignment.D_USERID_CODE, tblCitationProjectAssignment.D_LAST_UPDATE_TS
FROM tblCitationProjectAssignment
WHERE (((tblCitationProjectAssignment.LocProj_IS_NUMBER)=[ProjectISNUMBER]) AND ((tblCitationProjectAssignment.LocProj_ORG_ID)=[ProjectORGID]));
I get an error message -2147217904 about having too few parameters. I'm passing in ProjectISNUMBER and ProjectORGID, but it doesn't seem to take them.
Can anyone shed any light on this?
Thanks!
dftjsn
Dim rst As ADODB.Recordset
Set rst = New ADODB.Recordset
Dim ProjectORGID As String
Dim ProjectISNUMBER As Long
ProjectORGID = "ZZZZDEMO"
ProjectISNUMBER = 1
rst.Open "qrySelectedProjectCitations", CurrentProject.Connection, adOpenStatic, adLockReadOnly, adCmdTable
The SQL from qrySelectedProjectCitations is:
PARAMETERS ProjectISNUMBER Long, ProjectORGID Text ( 255 );
SELECT tblCitationProjectAssignment.LocProj_IS_NUMBER, tblCitationProjectAssignment.LocProj_ORG_ID, tblCitationProjectAssignment.LocCITN_IS_NUMBER, tblCitationProjectAssignment.LocCITN_ORG_ID, tblCitationProjectAssignment.TSMPROJ_IS_NUMBER, tblCitationProjectAssignment.TSMPROJ_ORG_ID, tblCitationProjectAssignment.TSRCITN_IS_NUMBER, tblCitationProjectAssignment.TSRCITN_ORG_ID, tblCitationProjectAssignment.D_USERID_CODE, tblCitationProjectAssignment.D_LAST_UPDATE_TS
FROM tblCitationProjectAssignment
WHERE (((tblCitationProjectAssignment.LocProj_IS_NUMBER)=[ProjectISNUMBER]) AND ((tblCitationProjectAssignment.LocProj_ORG_ID)=[ProjectORGID]));
I get an error message -2147217904 about having too few parameters. I'm passing in ProjectISNUMBER and ProjectORGID, but it doesn't seem to take them.
Can anyone shed any light on this?
Thanks!
dftjsn