<< Click to Display Table of Contents >> Navigation: Apollo VCL Components > Installing and Using Apollo VCL > Using TApolloQuery to Connect to Apollo Server |
To use SQL with the Apollo Database Server, follow these steps:
1.Run any edition of the Apollo Database Server, (e.g. 2-User Server). Enable the Monitor option in the Apollo Server so you can track the connection activity.
2.Create a new application (Or use the application created above)
3.Drop a TApolloConnection and a TApolloQuery component on the form.
4.Set TApolloQuery.ApolloConnection property to ApolloConnection1.
5.Set the following ApolloConnection1 properties:
User (Login name)
Password (Login Password)
Host (The address where the Apollo Server is running)
Set to Active
6.Set ApolloQuery1.AccessMethod to amServer.
7.Set ApolloQuery1.DatabaseName to a Database alias that is available on the Apollo Server. This list will show all the Database Aliases defined on the server.
8.ApolloQuery1 is now ready to process SQL statements. Set the TApolloQuery.SQL property with your SQL query.
9.Set Active to true to execute your query. Or in code, call Open or ExecSQL to issue DDL statements, which commands that do not return a result set such as UPDATE, DELTE, INSERT, CREATE TABLE, etc.
See Also