运行时错误3349.在压缩/修复后运行 [英] Run-time Error 3349. Runs after Compact/Repair

查看:109
本文介绍了运行时错误3349.在压缩/修复后运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的问题更多地基于修复比任何任何一种关键需求都烦恼。 

每天我运行如下代码:

 

Private Sub Command0_Click()

Dim db作为DAO.Database

设置db = CurrentDb

 

 

DoCmd.SetWarnings False

DoCmd.RunSQL" Delete * FROM Status"

Me.lblStatus.Requery

 

'***  
RUN DELETE& APPEND QUERIES   ***

'***  RUN DELETE & APPEND QUERIES  ***

 

db.Execute" PriorMonth_DELETE",dbFailOnError

sqlString ="插入状态(何时,哪个)值(#"& Now&"#,'PriorMonth_DELETE')"

DoCmd.RunSQL(sqlString)

Me.lblStatus.Requery

 

db.Execute" PriorMonth_APPEND",dbFailOnError

sqlString ="插入状态(何时,哪个)值(#"& Now&"#,'PriorMonth_APPEND')"

DoCmd.RunSQL(sqlString)

Me.lblStatus.Requery

 

sqlString ="插入状态(何时,哪个)值(#"& Now&"#,'Done !!')"

DoCmd.RunSQL(sqlString)

Me.lblStatus.Requery

 

DoCmd.SetWarnings True

 

End Sub

 

 

每次代码触发时,它都会出错:

db.Execute" PriorMonth_APPEND",dbFailOnError

 

我做一个压缩/修复,重新运行代码,一切都很好。 
基本上,我链接到.csv文件。span文件具有以下结构:

I do a Compact/Repair, rerun the code, and all is well.  Basically, I am linking to a .csv file.  The .csv has the following structure:

第1行用于字段名称

< span style ="font-family:Calibri"> A2:A16  
= 1/1/2000(强制数据类型为日期/时间)。  

A2:A16  = 1/1/2000 (to force the data type to be Date/Time). 

B2:I16 =文本字段

J2:L16 =数值

M2:N16 =文本字段

O2:O16 = 1/1/2000

 

所以,我链接到.csv和

 

我得到的错误信息是:运行时错误3349

您无法记录您的更改,因为您输入的值违反了为此表或列表定义的设置(值小于最小值或大于最大值)。更正
错误并重试。

 

所以,我做一个Compact / Repair,一切都很好。

 

这发生在1 .csv文件。 
我还有2个.csv文件具有完全相同的结构(Prior_Year& Current_Month) ,其他2个更新查询工作完全正常。&bbsp;
关于我做错了什么想法? 我研究过这个问题谷歌;仍然没有解决方案。

This happens to 1 .csv file.  I have 2 more .csv files with exactly the same structure (Prior_Year & Current_Month), and the other 2 Update Queries work perfectly fine.  Any ideas on what I am doing wrong?  I researched this using Google; still without a solution.

 

 

谢谢大家!

Ryan ---

 

推荐答案

它是修复它的紧凑/修复还是只是停止并重新启动修复它的Access?

Is it the compact/repair that fixes it or is it just stopping and restarting Access that fixes it?

您是否拥有CSV fiels的永久链接,或者您是否在启动时重新链接它们?

Do you have permanent links to the CSV fiels or do you relink them at startup?


这篇关于运行时错误3349.在压缩/修复后运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆