请帮我看看在SQL QUERY ANALYZE 里能执行,为什么在ASP里执行就出错.
錯誤類型:
Microsoft OLE DB Provider for SQL Server (0x80040E14)
[OLE/DB provider returned message: 在指定異動協調員中無法編列新異動。]
strsql1 = "insert into bus.compare_table (account,cardtime) select convert( int,wgdtwno) as account,max(wgdttim) as time1 from OPENDATASOURCE('SQLOLEDB','Data Source=10.1.200.15;User ID=bus_read;Password=sipadm').hrmsft.dbo.Hrswgdt where ( wgdtdte = " & strdatenext & " and wgdttim >= '00:10' and wgdttim <= '02:40') or ( wgdtdte = " & strdate & " and wgdttim >= '17:30' and wgdttim < '00:00') group by wgdtwno