473,403 Members | 2,222 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,403 software developers and data experts.

Access Closes Itself During SQL Execution

I've done some searches on this, but can't seem to hit the right combination of words to find any useful articles.

I've got a database (Access 2000/WinXPPro) with a few tables. I try to perform a SELECT INTO statement, and it starts to run, but then Access appears to close itself with no warning or error.

In fact the MSACCESS process is still running, and the ldb file is still actively open, so the database is then effectively locked until I end the process and delete the lock file (the mdb can be opened before this, but none of the tables or queries will appear in the front end).

This occurs every time I try this, so I decided to build a new database and import all the items. When it gets to running the Import query on the table this query is for, the same thing happens.

What would cause a table to create this kind of behaviour in SQL/Access?

(I'm going to try building the whole database all over again, which thankfully I did all in code so I just need to let it run. Will post again if a rebuild solves the issue.)

Regards,
Rob.
Aug 20 '07 #1
4 1548
missinglinq
3,532 Expert 2GB
To say that SQL is not my forte is a gross understatement, but perhaps the problem is caused by the statement Select Into.

There is a Select statement, and an Insert Into statement, but I don't believe that there is a Select Into statement!

As Randy Newman said “I could be wrong now, but I don’t think so!”

Linq ;0)>
Aug 20 '07 #2
barry07
47
Linq is correct - the syntax for inserting selected fields into another table is

Expand|Select|Wrap|Line Numbers
  1. INSERT INTO desttable(field1,field2...) SELECT oldfield1, oldfield2... from sourcetable [WHERE ...]

The WHERE clause is optional. Note that the field names don't have to be the same in the source and destination tables but you must select them in the same sequence.


Hope this helps

Barry
Aug 20 '07 #3
Rabbit
12,516 Expert Mod 8TB
There is a SELECT Field List INTO TableName FROM Source.
As for what's crashing your program, I have no idea. Are you using any user-defined functions? Variables?

Maybe Access itself is corrupted. Try it on a different computer.
Aug 20 '07 #4
Sorry, wasn't clear, when I said SELECT INTO, I did mean a SELECT fields INTO table type query.

I have already tried this on two other computers and get the same result.

The query which runs first does have the VBA DateAdd function in, and then the subsequent SELECT INTO that works off the table created by the first query is the one with the problem.

The interesting thing was that the first query when run produced zero records in the newly created table.

I have now done a rebuild of the database in a new file, and the queries run fine without incident. I can only assume the database file got corrupted somehow, and either caused the problem directly, or caused the first query to fail to produce records which in turn caused the second query to fail completely.

Thanks for the suggestions though. I think I'll chalk this one up to the marvel that is MS Access.

Regards,
Rob.
Aug 21 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Theerachet Pratoommanee | last post by:
This is error message I've got. Any suggestion would be appreciated. Server Error in '/WebDirectory' Application. ----------------------------------------------------------------------------...
9
by: MacDermott | last post by:
I have an Access MDB which instantiates a class in a custom DLL, manipulates it for a while, then sets it equal nothing. The MDB does other things,too, and generally behaves itself as desired....
3
by: Karl Hungus | last post by:
A cs file I compiled into an assembly dll is in my bin directory. In the cs file I have a using statement for System.Xml I compiled it using this command: csc /out:XmlContent.dll /t:library...
2
by: Dave F. | last post by:
I just installed my ASP.NET app on a Win 2k server. I installed the files in a folder on D: and setup a virtual directory in IIS Default web. We had to install the Framework 1.1 and SP on this...
2
by: Jeff | last post by:
raggle fraggle and so on Why does this happen? I had just entered some code and when I saved the form, through the menu option, Access nicely shutdown and lost the changes. I know, I should save...
9
by: Wayne Smith | last post by:
I've come up against a major headache that I can't seem to find a solution for but I'm sure there must be a workaround and I would really be grateful of any help. I'm currently building a web...
2
by: A n g l e r | last post by:
Hello everybody. I've got such an aching me question concerning fast & well optimized access to members of a structure (or class) and ways that VC compiler handles it. Let's imagine the...
8
by: Jeremy Ames | last post by:
I am trying to move an application from my system to a new test system. I really should have tried an easier program first, but I didn't really have a chance. My application was originally written in...
0
by: yukijocelyn | last post by:
I have experienced a problem here while doing a form for accessing datadbase using MS Access. I'm using the AccessDataSource control, and using Gridview to pull the data from the database. I am able...
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: 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...
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:
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.