-
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
-
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
>
>
>
-
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
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks