Add Code to Send a Query to the Database (RDS)

   

Search for the words "Tutorial: Send a Query to the Database." Copy the following script and paste it under the comment.

SUB Run_OnClick
   ADC.Server = Server.Value
   ADC.Connect = Connect.Value
   ADC.SQL = SQL.Value

   ADC.Refresh
END SUB

Note   When you specify the data source through the Connect property, you will usually provide a data source name, user ID, and password (for example, "DSN=SalesDB;UID=Manager;PWD=secret;"). With Microsoft Access databases, you don't need to specify a user ID (UID) or password (PWD).

Next