vfp9 sp1

I have setup an ODBC connection to an AS400. The connection has the
password included. I have also checked the "never" ask for a password
box.

Still, if a client pc has rebooted (or just logged off the user and re-
logged on), the next time the connection is accessed, it prompts for
the password. After that, no problems until the next reboot.

What setting am I missing?

Thanks

Re: ODBC connection question by Sergey

Sergey
Thu Jul 17 13:23:51 CDT 2008

George Smith wrote:
> vfp9 sp1
>
> I have setup an ODBC connection to an AS400. The connection has the
> password included. I have also checked the "never" ask for a password
> box.
>
> Still, if a client pc has rebooted (or just logged off the user and re-
> logged on), the next time the connection is accessed, it prompts for
> the password. After that, no problems until the next reboot.
>
> What setting am I missing?
>
> Thanks

Hi George,

To disable login prompt for all connections issue once

= SQLSETPROP(0, 'Displogin', 3)

You may also want to suppress ODBC error dialogs

= SQLSETPROP(0, "DispWarnings", .F.)

--
--sb--

VFP MVP

Re: ODBC connection question by George

George
Thu Jul 17 19:15:02 CDT 2008

I tried

SQLSETPROP(0, 'Displogin', 3)

Sergey, but all it did was change the login dialog to an error
(password length is 0)

This is all very strange. I can step through the code, and the
trouble comes at

OPEN DATABASE (odbc_path+'lms_logger')

I can do this at the command prompt with no trouble.

Also, when the program starts it checks to see if an ODBC connection
exists. If does this by opening the database (exactly as above) and
creating an empty view - it is looking for a timeout.)

That works fine.

If I change the connection to "Always ask" and start the program, I
get a different dialog - that doesn't ask for a password, but wants me
to pick a data source. Click okay and the connection tests out. I
get the same dialog where the problem is now. In this case, I click
okay and it then asks for a password.

(And, of course, if I enter a password, it doesn't ask again until the
user logs off.)

Does this make any sense?



Re: ODBC connection question by Sergey

Sergey
Fri Jul 18 05:52:40 CDT 2008

George Smith wrote:
> I tried
>
> SQLSETPROP(0, 'Displogin', 3)
>
> Sergey, but all it did was change the login dialog to an error
> (password length is 0)
>
> This is all very strange. I can step through the code, and the
> trouble comes at
>
> OPEN DATABASE (odbc_path+'lms_logger')
>
> I can do this at the command prompt with no trouble.
>
> Also, when the program starts it checks to see if an ODBC connection
> exists. If does this by opening the database (exactly as above) and
> creating an empty view - it is looking for a timeout.)
>
> That works fine.
>
> If I change the connection to "Always ask" and start the program, I
> get a different dialog - that doesn't ask for a password, but wants me
> to pick a data source. Click okay and the connection tests out. I
> get the same dialog where the problem is now. In this case, I click
> okay and it then asks for a password.
>
> (And, of course, if I enter a password, it doesn't ask again until the
> user logs off.)
>
> Does this make any sense?
>
>

Hi George,

Are you using created connection in a view or SPT?

--
--sb--

VFP MVP

Re: ODBC connection question by George

George
Fri Jul 18 09:18:42 CDT 2008

Just simple views.

>
> Hi George,
>
> Are you using created connection in a view or SPT?
>
> --
> --sb--
>
> VFP MVP


Re: ODBC connection question by George

George
Fri Jul 18 18:33:24 CDT 2008

I wasted everyones time on this. Turned out just to be a new view
that was created with the "wrong" data source (rather than the
connection).


On Jul 18, 7:18 am, George Smith <grsassocia...@gmail.com> wrote:
> Just simple views.
>
>
>
> > Hi George,
>
> > Are you using created connection in a view or SPT?
>
> > --
> > --sb--
>
> > VFP MVP