Login Prompt


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Login Prompt

  1. #1
    Levi Nkata Guest

    Login Prompt

    I have the code below to connect to an oracle database. How can I pass
    variables into "User ID", "Password" and "Data Source", so I can use a login
    dialog?


    Set Oracon = CreateObject("ADODB.Connection")
    With Oracon
    .CursorLocation = adUseClient
    .ConnectionString = "Provider=OraOLEDB.Oracle;" & _
    "Data Source=ora8i;" & _
    "User ID=levi;" & _
    "Password=levi;" & _
    "PLSQLRSet=1;"
    .Open
    End With

    Regards,

    Levi Nkata




  2. #2
    Salvador Guest

    Re: Login Prompt

    Do this:

    Using the login dialog, get the user name and password and if necessary, the
    Data
    Source. For this example I'll use just the username and password. The
    variables
    strUsr and strPwd contain the username and password, respectively.

    Now proceed to do this:

    .ConnectionString = "Provider=OraOLEDB.Oracle;" & _
    "Data Source=ora8i;" & _
    "User ID=" & strUsr & ";" & _
    "Password="& strPwd &";" & _
    "PLSQLRSet=1;"

    That should do it.

    Good luck

    BTW: Would you happen to know how to return only a fixed number of rows from
    an SQL statement. I know of ROWCOUNT, but I'm new to Oracle and
    I
    can't seem to make it work. Thanks

    Salvador



    "Levi Nkata" <levi@zamnet.zm> wrote in message
    news:3afa5261@news.devx.com...
    > I have the code below to connect to an oracle database. How can I pass
    > variables into "User ID", "Password" and "Data Source", so I can use a

    login
    > dialog?
    >
    >
    > Set Oracon = CreateObject("ADODB.Connection")
    > With Oracon
    > .CursorLocation = adUseClient
    > .ConnectionString = "Provider=OraOLEDB.Oracle;" & _
    > "Data Source=ora8i;" & _
    > "User ID=levi;" & _
    > "Password=levi;" & _
    > "PLSQLRSet=1;"
    > .Open
    > End With
    >
    > Regards,
    >
    > Levi Nkata
    >
    >
    >




  3. #3
    George Handlin Guest

    Re:

    Sorry for the no subject... hit the wrong button.. : )


    "George Handlin" <handling@nospam.home.com> wrote in message
    news:3b02cb0c@news.devx.com...
    > MS states that Oracle should be on it's own dedicated machine and that
    > customers have reported problems with running MTS/COM+ on the same box.
    > Does anyone have any personal experience with this? We are developing a
    > client/server app with Oracle and VB and thought of using MTS or COM+ (not
    > sure if the server will be NT4 or Win2k) but we don't have the option of
    > purchasing two servers. If this truly does pose a problem, what would be

    a
    > good alternative?
    >
    > Thanx...
    >
    > --
    > -George Handlin, MCP
    > ICQ# 50614665
    >
    >
    >




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center