Halaman

Sabtu, 03 Desember 2011

ZEOSDB STORED PROC

. Sabtu, 03 Desember 2011 .

Mohon izinnx pak Budi, posting stored procedure dengan zeos?
pak Budi : silahkan aja....<tanya' jawab sendiri>
<mohon ma'af sebelumnx...>

buat stored procedure di mysqlnx:

DELIMITER $$
USE `pos`$$
DROP PROCEDURE IF EXISTS `pesan`$$
CREATE DEFINER=`pos`@`%` PROCEDURE `pesan`(OUT msg VARCHAR(25))
BEGIN
    SELECT "TEST" INTO msg;
    END$$
DELIMITER ;


panggil di zeos dengan zquery:

procedure TForm1.btn1Click(Sender: TObject);
begin

   with Qquery do
    begin
      Close;
      SQL.Clear;
      SQL.Text:='call pesan(@msg);';
      ExecSQL;
      SQL.Text:='select @msg;';
      Open;
      etext.Text:=Qquery.Fields[0].AsString;
    end;
end;

0 komentar:

:)) ;)) ;;) :D ;) :p :(( :) :( :X =(( :-o :-/ :-* :| 8-} :)] ~x( :-t b-( :-L x( =))

Posting Komentar

 
{nama-blog-anda} is proudly powered by Blogger.com | Template by Agus Ramadhani | o-om.com