连接数据库字符串编辑

右键新建一个txt文本。然后把后缀名改为udl。双击打开,点击上方的‘提供程序’选择你所使用的数据库--(现在使用一般是ORaCLE或者是 sql Server。你使用的那个,选哪个。)选择后下一步。输入数据库名称、帐号,密码。选择允许保存密码。点击测试。提示测试成功。点击确定。然后把udl后缀名改回txt双击打开。你会得到:
[oledb]
; Everything after this line is an OLE DB initstring
Provider=MSDAORA.1;Password=solex;User ID=crcwms;Data Source=orcl;Persist Security Info=True
其中"Provider=MSDAORA.1;Password=solex;User ID=crcwms;Data Source=orcl;Persist Security Info=True”
就是数据源。。。Provider是提供者。Password是密码。ID:是你的帐号:Source:是使用的数据库。

猜你喜欢

转载自ktc7000.iteye.com/blog/1773808