sql.Add(’select * from collect where (partno between :Startcode and :stopcode) and (batchno between :Startbatchno and :stopbatchno)’); //主要是上面那句,怎么运行不行啊?
sql.Add(‘select * from collect where partno between :Startcode and :stopcode and batchno between :Startbatchno and :stopbatchno’); 改为: sql.Add(' select * from collect where partno between :'+ ''' Startcode'' and :''stopcode'' and batchno'+ ' between :''Startbatchno'' and :''stopbatchno'''); //你程序中有一个“'”写成了“’”
//主要是上面那句,怎么运行不行啊?
改为:
sql.Add(' select * from collect where partno between :'+
''' Startcode'' and :''stopcode'' and batchno'+
' between :''Startbatchno'' and :''stopbatchno''');
//你程序中有一个“'”写成了“’”
case是关键字,改用databasename:=’[case]’;