bcp访问数据库失败?

[复制链接]
查看11 | 回复3 | 2007-6-14 12:46:38 | 显示全部楼层 |阅读模式
帮我看看这句话有什么错?
bcp "select * from test.dbo.a" out D:\test.tbl -S TESTCOMPUTER -U bill -P bill99 -n
错误提示是:
要求的“select * from test”要求的数据库打开失败,登录失败。
回复

使用道具 举报

千问 | 2007-6-14 12:46:38 | 显示全部楼层
解决,查询结果时必须使用queryout而不是out
bcp "select * from test.dbo.a" queryout D:\test.tbl -S TESTCOMPUTER -U bill -P bill99 -n
回复

使用道具 举报

千问 | 2007-6-14 12:46:38 | 显示全部楼层
out的参数是全表导出
回复

使用道具 举报

千问 | 2007-6-14 12:46:38 | 显示全部楼层
是啊是啊,现在知道啦
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行