DSN-Less连接方法 [英] DSN-Less Connection How To

查看:140
本文介绍了DSN-Less连接方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对我的应用程序中的连接字符串有疑问;
我一直在阅读许多连接字符串,包括在此Webebsite中找到的连接字符串,而我却找到了连接到我的小型Acces数据库.accdb的方法.
这是我的代码:

Hay there Im having some doubts with the connection string in my app;
I´ve been reading many connection strings including ones I found in this webebsite and I havnt found the way to connecto to my little Acces database .accdb.
Here´s my code:

OdbcConnection Ocon = new OdbcConnection();
Ocon.ConnectionString = "Driver={Microsoft Access Driver (*.accdb)};";


知道,我能够自动找到数据库并获取路径,并且我知道它必须知道的一点点(只需在连接字符串上键入路径,包括其用户名和密码),问题是什么这样做的语法?
我已经尝试过&,& _和the,opperands,但没有任何结果.


Know, I´m able to find the database automatically and get the path, and I know its a little obvious what I have to do know(just type the path on the connection string including its user & password) the question is what is the syntax to do that??
I´ve tried with the &, &_ and the , opperands without any result.

推荐答案

^ ]


这篇关于DSN-Less连接方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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