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

SQL, Save to File, bound or unbound 1

Status
Not open for further replies.

Mezzzo

Technical User
May 30, 2003
56
US
HI

I started to learn visual basic 6.0. I had a programmer help me with the database issues. Saving control data, grid data, and project data via SQL. To a degree it seemed simpler then using bound controls. I maybe wrong, but many of the applications sold commercially don`t incorporate bound controls with the typical navigation control. All the tutorial examples I`ve seen use bound controls as a example but real apps don`t seem to use them.I`ve moved to Delphi but can`t seem to find good examples of SQL statement control via unbound controls. Does anyone have a personal project they would like to share. I can`t seem to find any real world solutions that deal with SQL. All the reference books on Delphi always seem to deal with bound controls.

This newbie is lost.
Thanks
 
Code:
Query1.DatabaseName := 'databasename';
    with Query1 do
    begin
        Close;
        SQL.Clear;
        SQL.Add('select * from tablename where fieldname = :parametername');
        ParambyName('parametername').AsString := Variable;
        Open;
        if not isempty do
        begin
            first;
            while not eof do
            begin
                Dostuff;
                next;
            end;
        end;
    end;

is this what you mean?

Tracey
Remember... True happiness is not getting what you want...

Its wanting what you have got!
 
Also, many commercial application do use bound controls, but they don't use the navigator so loved by demo writers.

Simon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top