Access 2010查询数据类型不匹配

时间:2016-02-11 13:44:36

标签: sql vba ms-access ms-access-2010 type-mismatch

我在query2上获得了query1,在query1中有一个结果为"yes""no"的表达式:

expr1:IIf(DateSeriel(Year([date1])+[runtime];Month([date1])+[runtime2];Day([date1]))>Da‌​te();"yes";"no")

结果很好,但query2上的where子句现在产生数据类型不匹配

SELECT tbl1.customer 
FROM query1
WHERE (query1.[expr1]="yes");

'yes'或将其更改为TRUE / FALSE也无效。有任何想法吗?感谢

1 个答案:

答案 0 :(得分:0)

没有回答这个特定的问题,但解决方法...... 我做了另一个临时表,其中包含由class Program { static string IsSameFile = string.Empty; // USE STATIC FOR TRACKING static void Main(string[] args) { string SourceFolderPath = "D:\\SourcePath"; string DestinationFolderPath = "D:\\DestinationPath"; FileSystemWatcher FileSystemWatcher = new FileSystemWatcher(); FileSystemWatcher.Path = SourceFolderPath; FileSystemWatcher.IncludeSubdirectories = false; FileSystemWatcher.NotifyFilter = NotifyFilters.LastWrite; FileSystemWatcher.Filter = "*.txt"; FileSystemWatcher.Changed += FileSystemWatcher_Changed; FileSystemWatcher.EnableRaisingEvents = true; Console.Read(); } static void FileSystemWatcher_Changed(object sender, FileSystemEventArgs e) { if (e.Name == IsSameFile) //SKIPS ON MULTIPLE TRIGGERS { return; } else { string SourceFolderPath = "D:\\SourcePath"; string DestinationFolderPath = "D:\\DestinationPath"; try { // DO SOMETING LIKE MOVE, COPY, ETC File.Copy(e.FullPath, DestinationFolderPath + @"\" + e.Name); } catch { } } IsSameFile = e.Name; } } 过滤的所有记录,并在该表上进行查询。