Error when I run Append queries

G

Guest

I have a networked application that links to another program's data files and
appends updated information into my networked Access application. This
networked application is split. The problem I am having is suddenly when
running Append Queries I now get an error "Invalid Argument". These Append
queries have run for the last 6 months without a problem and I do not know
what has changed, (possibly a corrupted Dll file)? This error seems to be on
all of the computers on the network including the server (Frontend in a
different directory to run tests on updates). The help indicates that “You
tried to perform an operation that involves a routine in a DLL, and one of
the arguments to the routine is invalid. Check your entry to make sure you
have specified the correct arguments, and then try the operation again.
This error also occurs when you attempt to use mutually exclusive constants
in an argument to a method, such as specifying both dbConsistent and
dbInconsistent in the options argument to the OpenRecordset method.â€

Code ran for update query to get this error:

INSERT INTO PATIENTS ( CDC_NBR, LASTMOVE, UNIT, LNAME, ALLERGY )
SELECT PATIENT.CDC_NBR, PATIENT.LASTMOVE, PATIENT.UNIT, PATIENT.LNAME,
PATIENT.ALLERGY
FROM PATIENT
WHERE (((PATIENT.UNIT)<>"Gone"));

All table and field names are correct.
As well as this code:

INSERT INTO RX1 ( CDC_NBR, RX_NO, [DATE], STOP, DRUG, IDRUG, QTY, SIG1,
SIG2, DR, START )
SELECT Rx.CDC_NBR, Rx.RX_NO, Rx.DATE, Rx.STOP, Rx.DRUG, Rx.IDRUG, Rx.QTY,
Rx.SIG1, Rx.SIG2, Rx.DR, Rx.START
FROM Rx;

I checked and found nothing that I could identify to be a problem. Note that
all Delete queries and Update queries continue to work without errors.


Thank you,

Dennis
 
D

Douglas J. Steele

Is it possible that one or more of the fields being selected for insertion
are Null, and the corresponding field(s) in the receiving table can't accept
Nulls?
 
G

Guest

Douglas,

the receiving fields all are set as "No" in the Required section of the table
property. One thing I did, to speed up the queries and reporting, is to index
certain fields. Would indexing fields create this problem? The indexed fields
are set as not required. Will that setting allow Null values?

Thanks,

Dennis

Douglas J. Steele said:
Is it possible that one or more of the fields being selected for insertion
are Null, and the corresponding field(s) in the receiving table can't accept
Nulls?

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



Don said:
I have a networked application that links to another program's data files
and
appends updated information into my networked Access application. This
networked application is split. The problem I am having is suddenly when
running Append Queries I now get an error "Invalid Argument". These Append
queries have run for the last 6 months without a problem and I do not know
what has changed, (possibly a corrupted Dll file)? This error seems to be
on
all of the computers on the network including the server (Frontend in a
different directory to run tests on updates). The help indicates that "You
tried to perform an operation that involves a routine in a DLL, and one of
the arguments to the routine is invalid. Check your entry to make sure you
have specified the correct arguments, and then try the operation again.
This error also occurs when you attempt to use mutually exclusive
constants
in an argument to a method, such as specifying both dbConsistent and
dbInconsistent in the options argument to the OpenRecordset method."

Code ran for update query to get this error:

INSERT INTO PATIENTS ( CDC_NBR, LASTMOVE, UNIT, LNAME, ALLERGY )
SELECT PATIENT.CDC_NBR, PATIENT.LASTMOVE, PATIENT.UNIT, PATIENT.LNAME,
PATIENT.ALLERGY
FROM PATIENT
WHERE (((PATIENT.UNIT)<>"Gone"));

All table and field names are correct.
As well as this code:

INSERT INTO RX1 ( CDC_NBR, RX_NO, [DATE], STOP, DRUG, IDRUG, QTY, SIG1,
SIG2, DR, START )
SELECT Rx.CDC_NBR, Rx.RX_NO, Rx.DATE, Rx.STOP, Rx.DRUG, Rx.IDRUG, Rx.QTY,
Rx.SIG1, Rx.SIG2, Rx.DR, Rx.START
FROM Rx;

I checked and found nothing that I could identify to be a problem. Note
that
all Delete queries and Update queries continue to work without errors.


Thank you,

Dennis
 
G

Guest

Sorry my foolishness! It seems that I forgot to set the options to compact on
close and I never compacted the back end. After compacting, it reduced the
database from 2 gigs to 250 megs. Wow! The queries not work without error.

Thanks for your help,

Dennis

Don said:
Douglas,

the receiving fields all are set as "No" in the Required section of the table
property. One thing I did, to speed up the queries and reporting, is to index
certain fields. Would indexing fields create this problem? The indexed fields
are set as not required. Will that setting allow Null values?

Thanks,

Dennis

Douglas J. Steele said:
Is it possible that one or more of the fields being selected for insertion
are Null, and the corresponding field(s) in the receiving table can't accept
Nulls?

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



Don said:
I have a networked application that links to another program's data files
and
appends updated information into my networked Access application. This
networked application is split. The problem I am having is suddenly when
running Append Queries I now get an error "Invalid Argument". These Append
queries have run for the last 6 months without a problem and I do not know
what has changed, (possibly a corrupted Dll file)? This error seems to be
on
all of the computers on the network including the server (Frontend in a
different directory to run tests on updates). The help indicates that "You
tried to perform an operation that involves a routine in a DLL, and one of
the arguments to the routine is invalid. Check your entry to make sure you
have specified the correct arguments, and then try the operation again.
This error also occurs when you attempt to use mutually exclusive
constants
in an argument to a method, such as specifying both dbConsistent and
dbInconsistent in the options argument to the OpenRecordset method."

Code ran for update query to get this error:

INSERT INTO PATIENTS ( CDC_NBR, LASTMOVE, UNIT, LNAME, ALLERGY )
SELECT PATIENT.CDC_NBR, PATIENT.LASTMOVE, PATIENT.UNIT, PATIENT.LNAME,
PATIENT.ALLERGY
FROM PATIENT
WHERE (((PATIENT.UNIT)<>"Gone"));

All table and field names are correct.
As well as this code:

INSERT INTO RX1 ( CDC_NBR, RX_NO, [DATE], STOP, DRUG, IDRUG, QTY, SIG1,
SIG2, DR, START )
SELECT Rx.CDC_NBR, Rx.RX_NO, Rx.DATE, Rx.STOP, Rx.DRUG, Rx.IDRUG, Rx.QTY,
Rx.SIG1, Rx.SIG2, Rx.DR, Rx.START
FROM Rx;

I checked and found nothing that I could identify to be a problem. Note
that
all Delete queries and Update queries continue to work without errors.


Thank you,

Dennis
 
Top