![]() |
|
Web Server Application da Function Çalıştırma - Baskı Önizleme +- Delphi Can (https://www.delphican.com) +-- Forum: Delphi (https://www.delphican.com/forumdisplay.php?fid=3) +--- Forum: Delphi Linux (https://www.delphican.com/forumdisplay.php?fid=11) +--- Konu Başlığı: Web Server Application da Function Çalıştırma (/showthread.php?tid=5410) |
Web Server Application da Function Çalıştırma - barissagir - 15-11-2020 Merhabalar Fesih hocamın youtube ta anlattığı derslere bakarak linux servisi hakkında birşeyler öğrendim. Allah razı olsun kendisinden. Apache üzerinden servis bilgileri ve Postgres vb den veri alabiliyorum. Projemde Firedac bileşenleri kullanıyorum. Ancak iş Postgres üzerindeki bir fonksiyonu çalıştırmaya gelince hata veriyor. liste table [attachment=1468] find fonksiyonum [attachment=1464] fonksiyonu çağırınca gelen ekran [attachment=1465] kodlarım devam ediyor ama burada hata verdiği için buraya kadar aldım. [attachment=1466] sonuç [attachment=1467] Ben nerde hata yapıyorum. Saygılarımla. Barış SAĞIR Web Server Application da Function Çalıştırma - 3ddark - 15-11-2020 Fonksiyon içinde de abc.liste olarak yazarak deneyin Schema ismini her zaman yazmak daha az hatayla karşılaşmanız demektir Web Server Application da Function Çalıştırma - 3ddark - 15-11-2020 Hayır Pascal kodunuz sorunsuz görünüyordu. Ben sql fonksiyon kodunuz için demiştim Birde siz prepare dediğiniz zaman zaten parametreler oluşuyor neden silip tekrar olusturuyorsunuz. Paramname ile karşılaştırıp direkt value değerini atamiyorsunuz Select ... From abc.liste l Cvp: Web Server Application da Function Çalıştırma - barissagir - 15-11-2020 (15-11-2020, Saat: 09:43)3ddark Adlı Kullanıcıdan Alıntı: Fonksiyon içinde de abc.liste olarak yazarak deneyin Evet dediğiniz gibi yaptım. Fonksiyonun içinde Table isminden önce Shema ismi yazınca sorunsuz çalışıyor. Çok teşekkür ederim. Allah razı olsun. Saygılarımla procedure TWebModule1.WebModule1YeniAction(Sender: TObject;
Request: TWebRequest; Response: TWebResponse; var Handled: Boolean);
var JsonSonuc:TJSONObjectWriter;
begin
FDConnection1.Connected := True;
FDStoredProc1.Connection := FDConnection1;
FDStoredProc1.StoredProcName := 'find';
FDStoredProc1.Prepare;
FDStoredProc1.Params[0].AsString := '1234';
FDStoredProc1.Open;
JsonSonuc:=TJsonObjectWriter.Create;
try
JsonSonuc.WriteStartObject;
JsonSonuc.WritePropertyName('id');
JsonSonuc.WriteValue(FDStoredProc1.Fields[0].Asstring);
JsonSonuc.WritePropertyName('adisoyadi');
JsonSonuc.WriteValue(FDStoredProc1.Fields[1].Asstring);
JsonSonuc.WriteEndObject;
Response.ContentType:='text/html; charset=UTF8';
Response.Content:=JsonSonuc.JSON.ToJSON;
finally
FDStoredProc1.Close;
JsonSonuc.DisposeOf;
end;
end;
Buna ek olarak FDConnection1 in MetaCurShema değerinide abc yapmak gerekir aksi halde hata veriyor. Cvp: Web Server Application da Function Çalıştırma - Davidmenk3 - 19-11-2024 Hello, It seems like you're facing an issue with running functions in Postgres via Apache, possibly due to incorrect syntax or connection issues. Make sure your Postgres function call is properly executed, and check the logs for any specific errors. For more seamless server management, you might consider using Hostnoc for Terraria server hosting and other related hosting services to ensure smooth performance in your projects. |