Arsip: Bagaimana Login dengan User Dari MySQL

 
user image
more 12 years ago

mas_kofa

pake query spt ini : [sql] SELECT * FROM mysql.user where user=:user and password=password(:pass); [/sql]
user image
more 12 years ago

jainul

ok... saya coba dulu mas
user image
more 12 years ago

jainul

saya pake kode sperti ini, kq eror y mas? kira2 apa yang salah?
procedure TLogin.BitBtn1Click(Sender: TObject);
begin
with koneksi.ADOQuery1 do begin
Close;
SQL.Clear;
SQL.Add('select * from mysql.user where user='+QuotedStr(ComboBox1.Text));
Open;
end;
if koneksi.ADOQuery2.FieldByName('password').AsString <> Edit1.Text
then
// messagedlg('Maaf Password Salah',mtinformation,[mbok],0);
begin
Application.MessageBox('Maaf Password Salah','error', MB_OK or MB_ICONERROR);
Edit1.Clear;
end
else
begin
DataCostumer.Show;
Login.Hide;
end;
end;
user image
more 12 years ago

mas_kofa

lha error nya apa?
user image
more 12 years ago

jainul

sudah bisa mas.... dengan sedikit perubahan pada koneksinya.... heheheheehe,..... Btw, terima kasih y mas, sudah membantu saya..... :lol:
more ...
  • Pages:
  • 1
  • 2
Share to
Local Business Directory, Search Engine Submission & SEO Tools FreeWebSubmission.com SonicRun.com