Recent Posts
Selamat datang di Coding Delphi Land Weblog kumpulan source code pemogram delphi
(Bukan maksud untuk menggurui tetapi marilah kita berbagi ilmu tuk perkembangan kemajuan teknologi kita
Minggu, 15 November 2009
Create a table including an AutoInc field
uses AdoDB;
var
q: TAdoQuery;
db: TAdoConnection;
begin
q := TADOQuery.Create(nil);
q.Connection := db;
q.Close;
q.SQL.Clear;
q.SQL.Add('Create Table TABLENAME (ID COUNTER PRIMARY KEY, MYTEXT1 String, MYTEXT2 String);');
q.Prepared := True;
try
q.ExecSQL;
except
end;
q.Free;
end;
var
q: TAdoQuery;
db: TAdoConnection;
begin
q := TADOQuery.Create(nil);
q.Connection := db;
q.Close;
q.SQL.Clear;
q.SQL.Add('Create Table TABLENAME (ID COUNTER PRIMARY KEY, MYTEXT1 String, MYTEXT2 String);');
q.Prepared := True;
try
q.ExecSQL;
except
end;
q.Free;
end;
0 komentar:
Posting Komentar