473,394 Members | 1,800 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Runtime Error 3167 Record Deleted

I'm trying to transfer data from one Sql Server into a table on
another, using a simple INSERT query in an Access database with links
to tables on both servers (the reasons for this are complicated but it
IS the simplest solution, believe me).

The 'Select' clause of the query works fine when run alone, but, when I
run the INSERT query I get a Runtime Error 3167 Record Deleted.

I get the error even when I'm the only person accessing both servers.

Has anyone any experience with this problem?

Any help would be appreciate.

Bill Hounslow

Nov 13 '05 #1
3 15749

<bi***********@hotmail.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
I'm trying to transfer data from one Sql Server into a table on
another, using a simple INSERT query in an Access database with links
to tables on both servers (the reasons for this are complicated but it
IS the simplest solution, believe me).

The 'Select' clause of the query works fine when run alone, but, when I
run the INSERT query I get a Runtime Error 3167 Record Deleted.

I get the error even when I'm the only person accessing both servers.

Has anyone any experience with this problem?

Any help would be appreciate.

Bill Hounslow


As a starting point, have you tried using the SQL Server Query Analyzer to
write the query which does the transfer? At least then you have removed
Access/JET from the list of possible problems and have a more concrete
question to pose, i.e. this SQL statement does run, but I can't do it via
Access.
Nov 13 '05 #2
"Stefan Kowalski" <a@b.com> wrote in message news:<cv*********@hercules.btinternet.com>...
<bi***********@hotmail.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
I'm trying to transfer data from one Sql Server into a table on
another, using a simple INSERT query in an Access database with links
to tables on both servers (the reasons for this are complicated but it
IS the simplest solution, believe me).

The 'Select' clause of the query works fine when run alone, but, when I
run the INSERT query I get a Runtime Error 3167 Record Deleted.

I get the error even when I'm the only person accessing both servers.

Has anyone any experience with this problem?

Any help would be appreciate.

Bill Hounslow


As a starting point, have you tried using the SQL Server Query Analyzer to
write the query which does the transfer? At least then you have removed
Access/JET from the list of possible problems and have a more concrete
question to pose, i.e. this SQL statement does run, but I can't do it via
Access.


The statement I'm using is a bog-standard Append query of the type:

INSERT INTO [Target Table] (target field1, target field2,...)
SELECT source field1, source field2,...
FROM [Source Query]
WHERE criteria

The source query contains some functions a number of JOINS to extract
and calculate the required data.

I said the reasons for doing it this way are complicated <g>.

The problem is that the database from which I'm transfering the data
is over-written every night, not just with new data but completely, so
any routines, views, procedures, etc, I write in that SQL database
would be destroyed. It is over-rittten with what's essentialy a copy
of the 'live' database, specifically to allow reporting without loss
of performance.

But what puzzles me is why the SELECT clause runs without any problem
when not part of the Append query, and we've never had problem
appending to tables in the target database before.

It has occurred to me that I could use two other methods:

1. Select into intermediate tables then append those to the target
tables.

2. Use VBA code to build recordsets then update the target tables one
record at a time.

Both of these would be slower and I don't yet know if they'll work, so
I wondered if there is a simple solution to the Runtime Error 3167
problem before I do the necessary work (and possibly wast even more
time on the problem <g>.
Nov 13 '05 #3
bi***********@hotmail.com (Bill Hounslow) wrote in message news:<62*************************@posting.google.c om>...
"Stefan Kowalski" <a@b.com> wrote in message news:<cv*********@hercules.btinternet.com>...
<bi***********@hotmail.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
I'm trying to transfer data from one Sql Server into a table on
another, using a simple INSERT query in an Access database with links
to tables on both servers (the reasons for this are complicated but it
IS the simplest solution, believe me).

The 'Select' clause of the query works fine when run alone, but, when I
run the INSERT query I get a Runtime Error 3167 Record Deleted.

I get the error even when I'm the only person accessing both servers.

Has anyone any experience with this problem?

Any help would be appreciate.

Bill Hounslow


As a starting point, have you tried using the SQL Server Query Analyzer to
write the query which does the transfer? At least then you have removed
Access/JET from the list of possible problems and have a more concrete
question to pose, i.e. this SQL statement does run, but I can't do it via
Access.


The statement I'm using is a bog-standard Append query of the type:

INSERT INTO [Target Table] (target field1, target field2,...)
SELECT source field1, source field2,...
FROM [Source Query]
WHERE criteria

The source query contains some functions a number of JOINS to extract
and calculate the required data.

I said the reasons for doing it this way are complicated <g>.

The problem is that the database from which I'm transfering the data
is over-written every night, not just with new data but completely, so
any routines, views, procedures, etc, I write in that SQL database
would be destroyed. It is over-rittten with what's essentialy a copy
of the 'live' database, specifically to allow reporting without loss
of performance.

But what puzzles me is why the SELECT clause runs without any problem
when not part of the Append query, and we've never had problem
appending to tables in the target database before.

It has occurred to me that I could use two other methods:

1. Select into intermediate tables then append those to the target
tables.

2. Use VBA code to build recordsets then update the target tables one
record at a time.

Both of these would be slower and I don't yet know if they'll work, so
I wondered if there is a simple solution to the Runtime Error 3167
problem before I do the necessary work (and possibly wast even more
time on the problem <g>.


Further...

The first option above worked, so, although it's not as fast as I
would like, it works.

But it would still be interesting to know what's causing the Runtime
Error 3167..
Nov 13 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Jamey | last post by:
I perused old posts for an answer to this for at least an hour, and I've found a work-around, but no definitive answer. Synopsis of the problem: On NotInList or ctl.Requery commands where a...
1
by: merco | last post by:
HI, i have an access MDB linked by ODBC to SQL2k. I get a strange behaviour when i do an INSERT INTO to a local Mdb table from "LEFT OUTER JOINED" SQL tables. If the related table hasn't...
2
by: Matthew Louden | last post by:
I want to read how many records in the table, and insert a record with id field which increment the counter by 1. However, I had the following runtime on Dim s As Integer = CInt(dr("t")). Since "t"...
7
by: ruvi | last post by:
I am getting runtime error 3021 - Either EOF or BOF is true or the current record has been deleted..... I have 2 combo boxes in a form- One for the client and the other for the project. When the...
1
by: maikanta | last post by:
Hi Guys, I wrote VBA code to delete the record using DoCmd Command. after that I wrote Select query to select the records from that table and assigned that query to the form recordsource property....
2
by: david720 | last post by:
Error 3167 Record is deleted And Sometimes the main entry form displays a record in the form where all fields are "#Delete" Why do we get this error sometimes (about 2 times a week)? It...
3
doma23
by: doma23 | last post by:
Hi, I implemented Front End / Back End on my database. Both files are on the common disk (server) in the same folder. My colleague and me were doing some multiuser testing and when we seleceted...
0
by: JonHuff | last post by:
Why am i getting this error and more importantly how do i fix it? Here is my code. It runs fine until I modify it and add a new field to be imported into the DB. I will show the original code that...
1
by: Ferwayne Yalung | last post by:
The code works when I logged in as a admin, teacher or student.But when i try an unregistered username, runtime error 3021 (either BOF or EOF is true, or the current record has been deleted....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.