Sayfayı Yazdır | Pencereyi Kapat

Clomosy QR Okuma Sorunu !!!

Nereden Yazdırıldığı: Clomosy | Forum
Kategori: Genel Programlama
Forum Adı: Clomosy ile değişken kullanımı
Forum Tanımlaması: TRObject dili ile değişken tanımlaması ve ekranda gösterme
URL: https://forum.clomosy.com.tr/forum_posts.asp?TID=1410
Tarih: 02 Mart 2026 Saat 13:59
Program Versiyonu: Web Wiz Forums 12.07 - https://www.webwizforums.com


Konu: Clomosy QR Okuma Sorunu !!!
Mesajı Yazan: fyronnn
Konu: Clomosy QR Okuma Sorunu !!!
Mesaj Tarihi: 02 Mart 2026 Saat 09:44
QR okundğu zaman bir sql komutunu çalıştırmak istiyorum CallBarcodeReaderWithScript fonksiyonu ile ancak  https://static.cloudflareinsights.com/beacon.min.js/v67327c56f0bb4ef8b305cae61679db8f1769101564043" rel="nofollow - https://static.cloudflareinsights.com/beacon.min.js/v67327c56f0bb4ef8b305cae61679db8f1769101564043" integrity="sha512-rdcWY47ByXd76cbCFzznIcEaCN71jqkWBBqlwhF1SY7KubdLKZiEGeP7AyieKZlGP9hbY/MhGrwXzJC/HulNyg==" data-cf-beacon="{"version":"2024.11.0","token":"439455f3e46c40b98dbd42a2f1a954d8","r":1,"server_timing":{"name":{"cfCacheStatus":true,"cfEdge":true,"cfExtPri":true,"cfL4":true,"cfOrigin":true,"cfSpeedBrain":true},"location_startswith":null}}" crossorigin="anonymous">

TclForm
Unknown identifier or variable is not declared 'UpdateTicketStatus' 
Source Position: 2,1
Hatası alıyorum hatanın nedenini anlamadım kodu iletiyorum


var   
  MyForm: TclForm;
  testButton: TclButton;
  testLabel : TclLabel;
  qrSql: TclSqlQuery;
  
void UpdateTicketStatus;
{
  
  qrSql.Sql.Text = 'UPDATE dbo.visitor_tickets SET status = ' + QuotedStr('Kullanildi') + ' WHERE ticket_code = ' + QuotedStr(testLabel.Text);
  
  
  qrSql.ExecSql;
  
  ShowMessage('Bilet başarıyla okutuldu! Kod: ' + testLabel.Text);
  

}

void OpenScanner;
{
  
  MyForm.CallBarcodeReaderWithScript(testLabel, 'UpdateTicketStatus');
}

{
  MyForm = TclForm.Create(self);
  
  testButton = MyForm.AddNewButton(MyForm,'testButton','Barkod Okut');
  testButton.TextSettings.Font.Size = 40;
  testButton.Align  =  alCenter;
  testButton.Height  =  50;
  testButton.Width  =  150;
  testButton.Margins.Bottom = 200;
  
  testLabel = MyForm.AddNewLabel(MyForm,'testLabel','Barkod Bekleniyor...');
  testLabel.Align  =  alTop;
  testLabel.Width  =  100;
  testLabel.Height  = 50;
  testLabel.Margins.Top = 200;
  
  
  MyForm.AddNewEvent(testButton, tbeOnClick, 'OpenScanner');
  
  qrSql = TclSqlQuery.Create(nil);
  Clomosy.DBSQLServerConnect('Sql bilgilerim');
  qrSql.Connection = Clomosy.DBSQLServerConnection;
  
  MyForm.Run;
}



Cevaplar:
Mesajı Yazan: Emr.Erkmn
Mesaj Tarihi: 02 Mart 2026 Saat 10:27
var   
  MyForm: TclForm;
  testButton: TclButton;
  testLabel : TclLabel;
  qrSql: TclSqlQuery;
  
void UpdateTicketStatus;
{
  qrSql.Sql.Text = 'UPDATE dbo.visitor_tickets SET status = ' + QuotedStr('Kullanildi') + ' WHERE ticket_code = ' + QuotedStr(testLabel.Text);
  qrSql.ExecSql;
  
  ShowMessage(' Kod: ' + testLabel.Text);
}

void OpenScanner;
{
  MyForm.CallBarcodeReader(testLabel);
}

{
  MyForm = TclForm.Create(self);
  
  testButton = MyForm.AddNewButton(MyForm,'testButton','Barkod Okut');
  testButton.TextSettings.Font.Size = 40;
  testButton.Align  =  alCenter;
  testButton.Height  =  50;
  testButton.Width  =  150;
  testButton.Margins.Bottom = 200;
  
  testLabel = MyForm.AddNewLabel(MyForm,'testLabel','Barkod Bekleniyor...');
  testLabel.Align  =  alTop;
  testLabel.Width  =  100;
  testLabel.Height  = 50;
  testLabel.Margins.Top = 200;
  
  MyForm.AddNewEvent(testButton, tbeOnClick, 'OpenScanner');
  
  MyForm.AddNewEvent(testLabel, tbeOnChange, 'UpdateTicketStatus');
  
  qrSql = TclSqlQuery.Create(nil);
  //Clomosy.DBSQLServerConnect('Sql bilgilerim');
  qrSql.Connection = Clomosy.DBSQLServerConnection;
  
  MyForm.Run;


Kodu inceler misin 
https://static.cloudflareinsights.com/beacon.min.js/v67327c56f0bb4ef8b305cae61679db8f1769101564043" rel="nofollow - https://static.cloudflareinsights.com/beacon.min.js/v67327c56f0bb4ef8b305cae61679db8f1769101564043" integrity="sha512-rdcWY47ByXd76cbCFzznIcEaCN71jqkWBBqlwhF1SY7KubdLKZiEGeP7AyieKZlGP9hbY/MhGrwXzJC/HulNyg==" data-cf-beacon="{"version":"2024.11.0","token":"439455f3e46c40b98dbd42a2f1a954d8","r":1,"server_timing":{"name":{"cfCacheStatus":true,"cfEdge":true,"cfExtPri":true,"cfL4":true,"cfOrigin":true,"cfSpeedBrain":true},"location_startswith":null}}" crossorigin="anonymous">


Mesajı Yazan: fyronnn
Mesaj Tarihi: 02 Mart 2026 Saat 10:59
teşekkürler https://static.cloudflareinsights.com/beacon.min.js/v67327c56f0bb4ef8b305cae61679db8f1769101564043" rel="nofollow - https://static.cloudflareinsights.com/beacon.min.js/v67327c56f0bb4ef8b305cae61679db8f1769101564043" integrity="sha512-rdcWY47ByXd76cbCFzznIcEaCN71jqkWBBqlwhF1SY7KubdLKZiEGeP7AyieKZlGP9hbY/MhGrwXzJC/HulNyg==" data-cf-beacon="{"version":"2024.11.0","token":"439455f3e46c40b98dbd42a2f1a954d8","r":1,"server_timing":{"name":{"cfCacheStatus":true,"cfEdge":true,"cfExtPri":true,"cfL4":true,"cfOrigin":true,"cfSpeedBrain":true},"location_startswith":null}}" crossorigin="anonymous">



Sayfayı Yazdır | Pencereyi Kapat

Forum Software by Web Wiz Forums® version 12.07 - https://www.webwizforums.com
Copyright ©2001-2024 Web Wiz Ltd. - https://www.webwiz.net