选择DSN时提示输入密码 [英] Prompt for Password when DSN is selected

查看:72
本文介绍了选择DSN时提示输入密码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我当前正在做一个必须连接到oracle数据库的项目

我为此使用ODBC,并且在VB.net组合框中获得了可用DSN的列表.
如果我选择与Oracle相关的DSN,它会提示我输入用户名和密码.

AdPromptAlways此方法始终在VB中有效,但在VB.net中不知道该怎么做

I am currently doing a project where i have to connect to oracle database

I am using ODBC for this and I got list of available DSN''s in VB.net Combobox.
If i select Oracle related DSN it should prompt me for userid and password.

AdPromptAlways this method is working in VB, but in VB.net don''t know how to do

推荐答案

也许在ComboBox的SelectedIndexChange事件上,然后您可以检查看看选择了哪个值,如果是oracle,则可以提示输入用户名/密码(无论您想怎么做)
Perhaps on the SelectedIndexChange event for the ComboBox then you can check to see which value was select and if it is oracle then you can prompt for username/password (however you want to do that)


在这里看看:

http://msdn.microsoft.com/en-us/library/xexk8kx3 (v = VS.90).aspx [
Have a look here:

http://msdn.microsoft.com/en-us/library/xexk8kx3(v=VS.90).aspx[^]


这篇关于选择DSN时提示输入密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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