0
votes

I'm really new in delphi 7 and trying to create database application, populate data from a table and display on a grid.

Through some resources on the web, I managed to add into the form with DBGrid, ADOConnection, ADOQuery and Datasource. In ADOConnection, use the delphi IDE to build connection string to MSSQL server and table, then wired them up. It runs successfully with the grid populated with data.

Now, I would like to make the ADOConnection connectionstring to initialize through variables (server, username, password, catalog etc) from a setting file during runtime.

Would be great to show a procedure from initialization to population of data grid in delphi 7.

Appreciate any help.

1
Right-click on the form where your ADOConnection is located and choose View as Text from the context menu, which will show you the text content of your form. Find your ADOConnection in that text, which will show you the names of the properties and the values they're initialized to when the connection is created when your app is starting. Those are the properties you need to set and the values they need to be set to contain. When you're done, right-click on the editor window and choose View as Form to get back to normal.Ken White

1 Answers