您的位置:首页 > 其它

Access中"是/否"数据类型是怎样处理的

2009-11-02 17:26 204 查看
假设News表中有一个属性Passed,数据类型是“是/否“

1,读操作:string str="select * from News where Passed=True";(access)读“是“操作。

string str="select * from News where Passed=False";(access)读“否“操作。

2,写操作:

string str="Delete from News where Passed=True";(access)“是“操作。

string str="Update News set Passed=0 where Passed=True";(access)。

string str="Insert into News (Passed)values(0) ";(access)。

3,使用Parameters时注意事项

myCommand.Parameters.Add("@Passed",OleDbType.TinyInt).Value=1;
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐