Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Stopping ODBC connection window from coming up...

Re: Stopping ODBC connection window from coming up...

From: <cpereyra_at_ix.netcom.com>
Date: Thu, 07 Oct 1999 21:07:12 GMT
Message-ID: <7tj21l$ak6$1@nnrp1.deja.com>


Using DAO, the code is something pretty close to this:

dim db as database
dim strConn as string
strConn = "ODBC;DSN=<somedsn>;UID=<someuid>;PWD=<somepwd>"

set db = OpenDatabase("", dbDriverNoPrompt, False, strConn)

The combination of a full DSN string providing the user id, dsn and password in combination with the dbDriverNoPrompt parameter stops the Oracle logging window from showing up. Note that should the password or username provided be incorrect, the Oracle password window will come up. Make sure you have code to handle that possibility.

Carlos.
In article <7tij9b$v2f$1_at_nnrp1.deja.com>,   steve_billingsley_at_my-deja.com wrote:
> I am using Oracle 7 so the error number I list
> below might be different.
>
> Anyways, this is one way to do it..
>
> On error resume next
>
> Userid = Request("IDNO")
> Passid = Request("PassWd")
>
> Set Connect =
> Server.CreateObject("ADODB.Connection")
>
> Connect.Open "DatabaseName", Userid, Passid
> if Connect.Errors.Item(0).NativeError = 1017 then
> ' check the oracle error number for invalid
> username/password
> ErrorText = "<font color=red>Please enter a
> valid username and password</font><p>"
> else ...
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Thu Oct 07 1999 - 16:07:12 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US