Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VFP to AS400

Status
Not open for further replies.

mcoupal

Technical User
Jul 9, 2001
61
0
0
US
Using VFP 8 on Windows 2000, I have been unable to programmatically connect to an AS/400 without manually typing in a password. I am using IBM's Client Access Express. I'll be using SQLExec() commands over this connection.

I have tried creating a connection in the DBC using both the Data Source Name and Connection String methods, trying various ways to get a default login/password combination to be used. I have looked over the Wikipedia documents about DSN and DSN-less connections and tried those methods. I have tried using SQLConnect('connectionname','login','password') method. I have tried using the SQLStringConnect method as well.

No matter what I try, I get prompted for the password to the default login. Any help would be appreciated :)
 
We connect to the AS400 programmatically in VFP7 by disabling the Display Login Pop-Up Form. This is done by the command:

SQLSETPROP(0,"DispLogin",3).

The "0" Handle used SQLSETPROP set the property at the Environment level.The connection string shown below was obtained from a manual ODBC set up to our CAFET Library, so yours will be different.

SQLSETPROP(0,"DispLogin",3)

MyConn= "DRIVER=Client Access ODBC Driver (32-bit);SYSTEM=AS4Server;UID=MyID;PWD=MYPAssword;DBQ=CAFET;DFTPKGLIB=CAFET;LANGUAGEID=ENU"

CN=SQLSTRINGCONNECT(MyConn)

Hope this helps

Sami
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top