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

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

问题描述

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

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:\Docs\database2.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:\Docs\database2.mdb].Table1

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

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

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

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

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