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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't create extern view of AS400 file by Member - please assist 1

Status
Not open for further replies.

fineday

Programmer
May 11, 1999
4
0
0
US
How do I create external views in a MS VisFoxPro5.0 Database using ODBC that will allow only SPECIFIC MEMBERS of a Physical File on the AS400 to be accessed? I am using the ODBC Manager supplied by Client Access (The software supplied with AS400s to allow interconnectivity with a Windows network or PC). I have attempted to create external views in my FoxPro Project Database using both 'Connections' and 'Avail. Data Sources'. I have tried specifying the Member by using '.' and by using parentheses. Does anyone know a connection string syntax that might help me?
 
You might need to work in code to establish the connection using 'SQLCONNECT(), 'SQLEXEC()' & 'SQLDISCONNECT()' or perhaps 'SQLSTRINGCONNECT()'. Then you can use a variable passed in the connect string but controlled from the front end. I am not AS400 literate so this may not work if it does not behave like say a SQL backend. Once the connection is opened use SQLEXEC() to select the records you want into a cursor of your choice. Once you go down this path, i.e. not using the Database setup you are commited to handling all the elements of the validation and commit process through SQL commands. You have to set the properties of the cursor and such so it become arduous. Perhaps, if this misses the mark, you could indicate the errors you are seeing using the Database connections and proceed from there as there are a number of issues with Windows and DNSes such as file versus system in the ODBC setup for the machine and if the DNS has been set up on the machine you are attempting to connect from.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top