写法1:string formulaCol = "b4.temp_formula AS formula,";
在立即窗口输入ds.Tables[0].Rows[39]["formula"]
结果如下:"int flagSB,flagSC;\t/*0=O,1=T*/\nint T8=0;\n\nif([小区A载频数]>8||[小区B载频数]>8||[小区C载频数]>8)\n\tflagSB=flagSC=0;\nelse\n{\nif([小区A载频数]>4&&[小区B载频数]>4)\n\tflagSB=1;\nelse\tflagSB=0;\n\nif([小区A载频数]<=4&&[小区B载频数]<=4&&[小区C载频数]>4)\n\tflagSC=1;\nelse\tflagSC=0;\n}\n\nif([小区B载频数]==8&&flagSB==1)\n\tT8=T8+1;\nelse\tT8=T8+0;\nif([小区C载频数]==8&&flagSC==1)\n\tT8=T8+1;\nelse\tT8=T8+0;\n\nreturn T8;\n"
写法2: string formulaCol = "IIf(b3.materiel_flag = 'N', b4.temp_formula, '') AS formula,";
在立即窗口输入:ds.Tables[0].Rows[39]["formula"]
结果如下:"int flagSB,flagSC;\t/*0=O,1=T*/\nint T8=0;\n\nif([小区A载频数]>8||[小区B载频数]>8||[小区C载频数]>8)\n\tflagSB=flagSC=0;\nelse\n{\nif([小区A载频数]>4&&[小区B载频数]>4)\n\tflagSB=1;\nelse\tflagSB=0;\n\nif([小区A载频数]<=4&&[小区B载频数]<=4&&[小区C载频数]>4)\n\tflagSC=1;\nelse\tflagSC=0;\n}\n\nif([小区B载频数]==8&&flagSB==1"
≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈
结果的差别就是上面红色标识出来的部分,而直接在access里面执行是不会的。
请问各位大侠,这个是什么原因呀?
谢谢!