473,387 Members | 1,492 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,387 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 15747

<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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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,...

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.