在另一个受密码保护的数据库中选择表? [英] Select into table in another database that is password protected?

查看:25
本文介绍了在另一个受密码保护的数据库中选择表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Microsoft Access 2003 和 Visual Basic 6 中,我试图将表复制到另一个受密码保护的 access 数据库中...

In Microsoft Access 2003 and Visual Basic 6 I'm trying to copy a table to another access database that is password protected like this...

Select * INTO table2 IN 'database2.mdb' [;Password=TestPass] From table1

失败并出现错误:密码无效

Select INTO 格式是否不接受带有 mdb 的密码,并且密码必须在连接字符串中?如果不是,如何引用不同的连接字符串/数据库?

Does the Select INTO format not accept the password with the mdb, and the password has to be in a connection string? If not, how do you reference a different connection string/database?

谢谢

推荐答案

怎么样:

SELECT * INTO Table2 IN '' [MS Access;PWD=TestPass;DATABASE=C:Docsdatabase2.mdb]
FROM Table1

这些天我更倾向于使用类似下面这行的东西,它提供了更多的控制并允许不同的后端:

These days I would be more inclined to use something like the line below, it gives more control and allows for different back-ends:

SELECT * INTO Table2 FROM [MS Access;PWD=password;DATABASE=C:Docsdatabase2.mdb].Table1

您可以在方括号之间放置任何有效的连接字符串.

You can put any valid connection string between the square brackets.

参考:http://www.connectionstrings.com/

这篇关于在另一个受密码保护的数据库中选择表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆