<?xml version="1.0" encoding="iso-8859-9" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Clomosy | Forum : HATA</title>
  <link>https://forum.clomosy.com.tr/</link>
  <description><![CDATA[XML içerik linki; Clomosy | Forum : Genel &#304;&#351;lemler : HATA]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Mon, 04 May 2026 14:25:23 +0000</pubDate>
  <lastBuildDate>Thu, 19 Sep 2024 14:06:55 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.07</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>https://forum.clomosy.com.tr/RSS_post_feed.asp?TID=935</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Clomosy | Forum]]></title>
   <url>https://forum.clomosy.com.tr/forum_images/logo.png</url>
   <link>https://forum.clomosy.com.tr/</link>
  </image>
  <item>
   <title><![CDATA[HATA : Merhaba NurSena,A&#351;a&#287;&#305;daki sorgu...]]></title>
   <link>https://forum.clomosy.com.tr/forum_posts.asp?TID=935&amp;PID=1826#1826</link>
   <description>
    <![CDATA[<strong>Yazar:</strong> <a href="https://forum.clomosy.com.tr/member_profile.asp?PF=106">Developer</a><br /><strong>Konu:</strong> 935<br /><strong>Gönderim Zamanı:</strong> 19&nbsp;Eylül&nbsp;2024 Saat 14:06<br /><br />Merhaba NurSena,<div>Aşağıdaki sorgu da&nbsp;<span style=": rgb251, 251, 253;">edtProductPrice tanımlama yapmadığın için bu hatayı alıyorsun.</span><br><div><div style=": rgb251, 251, 253;">&nbsp;insertQuery.SQL.Text := 'INSERT INTO Cart (ProductID,ProductName, ProductPrice, ProductImageURL) ' +</div><div style=": rgb251, 251, 253;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'VALUES (' +QuotedStr(edtProductID.Text)&nbsp; + ', ' + QuotedStr(edtProductName.Text)+','+</div><div style=": rgb251, 251, 253;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;QuotedStr(edtProductPrice.Text) + ', ' +&nbsp;</div><div style=": rgb251, 251, 253;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;QuotedStr(edtProductImageURL.Text) + ');';</div><div style=": rgb251, 251, 253;">&nbsp; &nbsp; insertQuery.ExecSql;</div><div style=": rgb251, 251, 253;">&nbsp; &nbsp; ShowMessage('Veri ekleme başarılı');</div></div></div>]]>
   </description>
   <pubDate>Thu, 19 Sep 2024 14:06:55 +0000</pubDate>
   <guid isPermaLink="true">https://forum.clomosy.com.tr/forum_posts.asp?TID=935&amp;PID=1826#1826</guid>
  </item> 
  <item>
   <title><![CDATA[HATA :   ]]></title>
   <link>https://forum.clomosy.com.tr/forum_posts.asp?TID=935&amp;PID=1824#1824</link>
   <description>
    <![CDATA[<strong>Yazar:</strong> <a href="https://forum.clomosy.com.tr/member_profile.asp?PF=226">kacar.nursena</a><br /><strong>Konu:</strong> 935<br /><strong>Gönderim Zamanı:</strong> 17&nbsp;Eylül&nbsp;2024 Saat 18:24<br /><br /><img src="uploads/226/resim_2024-09-17_182212081.png" height="223" width="606" border="0" />]]>
   </description>
   <pubDate>Tue, 17 Sep 2024 18:24:09 +0000</pubDate>
   <guid isPermaLink="true">https://forum.clomosy.com.tr/forum_posts.asp?TID=935&amp;PID=1824#1824</guid>
  </item> 
  <item>
   <title><![CDATA[HATA : uploads/226/resim_2024-09-17_182212081.png  ...]]></title>
   <link>https://forum.clomosy.com.tr/forum_posts.asp?TID=935&amp;PID=1823#1823</link>
   <description>
    <![CDATA[<strong>Yazar:</strong> <a href="https://forum.clomosy.com.tr/member_profile.asp?PF=226">kacar.nursena</a><br /><strong>Konu:</strong> 935<br /><strong>Gönderim Zamanı:</strong> 17&nbsp;Eylül&nbsp;2024 Saat 18:23<br /><br /><a href="uploads/226/resim_2024-09-17_182212081.png" target="_blank" rel="nofollow">uploads/226/resim_2024-09-17_182212081.png</a>]]>
   </description>
   <pubDate>Tue, 17 Sep 2024 18:23:12 +0000</pubDate>
   <guid isPermaLink="true">https://forum.clomosy.com.tr/forum_posts.asp?TID=935&amp;PID=1823#1823</guid>
  </item> 
  <item>
   <title><![CDATA[HATA : Merhaba NurSena,Hata n&#305;n resmi...]]></title>
   <link>https://forum.clomosy.com.tr/forum_posts.asp?TID=935&amp;PID=1822#1822</link>
   <description>
    <![CDATA[<strong>Yazar:</strong> <a href="https://forum.clomosy.com.tr/member_profile.asp?PF=106">Developer</a><br /><strong>Konu:</strong> 935<br /><strong>Gönderim Zamanı:</strong> 17&nbsp;Eylül&nbsp;2024 Saat 18:11<br /><br />Merhaba NurSena,<div>Hata nın resmi görünmüyor.</div>]]>
   </description>
   <pubDate>Tue, 17 Sep 2024 18:11:16 +0000</pubDate>
   <guid isPermaLink="true">https://forum.clomosy.com.tr/forum_posts.asp?TID=935&amp;PID=1822#1822</guid>
  </item> 
  <item>
   <title><![CDATA[HATA :   ]]></title>
   <link>https://forum.clomosy.com.tr/forum_posts.asp?TID=935&amp;PID=1821#1821</link>
   <description>
    <![CDATA[<strong>Yazar:</strong> <a href="https://forum.clomosy.com.tr/member_profile.asp?PF=226">kacar.nursena</a><br /><strong>Konu:</strong> 935<br /><strong>Gönderim Zamanı:</strong> 17&nbsp;Eylül&nbsp;2024 Saat 18:03<br /><br /><img src="" border="0" />]]>
   </description>
   <pubDate>Tue, 17 Sep 2024 18:03:12 +0000</pubDate>
   <guid isPermaLink="true">https://forum.clomosy.com.tr/forum_posts.asp?TID=935&amp;PID=1821#1821</guid>
  </item> 
  <item>
   <title><![CDATA[HATA : hatan&#305;n ekran g&#246;r&#252;nt&#252;s&#252;: ]]></title>
   <link>https://forum.clomosy.com.tr/forum_posts.asp?TID=935&amp;PID=1820#1820</link>
   <description>
    <![CDATA[<strong>Yazar:</strong> <a href="https://forum.clomosy.com.tr/member_profile.asp?PF=226">kacar.nursena</a><br /><strong>Konu:</strong> 935<br /><strong>Gönderim Zamanı:</strong> 17&nbsp;Eylül&nbsp;2024 Saat 18:01<br /><br />hatanın ekran görüntüsü:<div><img src="" border="0" /></div>]]>
   </description>
   <pubDate>Tue, 17 Sep 2024 18:01:28 +0000</pubDate>
   <guid isPermaLink="true">https://forum.clomosy.com.tr/forum_posts.asp?TID=935&amp;PID=1820#1820</guid>
  </item> 
  <item>
   <title><![CDATA[HATA : Merhaba ,kodumda : var mainform:...]]></title>
   <link>https://forum.clomosy.com.tr/forum_posts.asp?TID=935&amp;PID=1818#1818</link>
   <description>
    <![CDATA[<strong>Yazar:</strong> <a href="https://forum.clomosy.com.tr/member_profile.asp?PF=226">kacar.nursena</a><br /><strong>Konu:</strong> 935<br /><strong>Gönderim Zamanı:</strong> 17&nbsp;Eylül&nbsp;2024 Saat 15:41<br /><br />Merhaba ,<div>kodumda :</div><div>&nbsp; var<div>&nbsp; mainform: TclForm;</div><div>&nbsp; AtistirmaliklarPage: TclProPanel;</div><div>&nbsp; Button: TclProButton;</div><div>&nbsp; ProductID: Integer;</div><div>&nbsp; ProductName: string;</div><div>&nbsp; ProductPrice: Double;</div><div>&nbsp; ProductImageURL: string;</div><div>&nbsp; insertQuery, ProductQuery: TclSqlQuery;</div><div>&nbsp; pricelabel, namelabel: TclProLabel;</div><div>&nbsp;edtProductID,edtProductName, edtProductPrice, edtProductImageURL: TclEdit;</div><div>&nbsp; i, previousButtonLeft, previousButtonTop: Integer;</div><div><br></div><div>// Veritabanına veri ekleme prosedürü</div><div>procedure insertToDatabase;</div><div>begin</div><div>&nbsp;insertQuery:= TclSqlQuery.Create(nil);</div><div>&nbsp; try</div><div>&nbsp; &nbsp; insertQuery.Connection := Clomosy.DBSQLServerConnection;</div><div>&nbsp; &nbsp; insertQuery.SQL.Text := 'INSERT INTO Cart (ProductID,ProductName, ProductPrice, ProductImageURL) ' +</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'VALUES (' +QuotedStr(edtProductID.Text)&nbsp; + ', ' + QuotedStr(edtProductName.Text)+','+</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;QuotedStr(edtProductPrice.Text) + ', ' +&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;QuotedStr(edtProductImageURL.Text) + ');';</div><div>&nbsp; &nbsp; insertQuery.ExecSql;</div><div>&nbsp; &nbsp; ShowMessage('Veri ekleme başarılı');</div><div>&nbsp; except</div><div>&nbsp; &nbsp; ShowMessage('Exception class: ' + LastExceptionClassName +</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ' Exception Message: ' + LastExceptionMessage);</div><div>&nbsp; end;</div><div>end;</div><div><br></div><div>// Veritabanı bağlantısını kurma prosedürü</div><div>procedure SetupDatabaseConnection;</div><div>begin</div><div>&nbsp; try</div><div>&nbsp; &nbsp; Clomosy.DBSQLServerConnect('SQL Server', 'su-db.database.windows.net','dbAdmin','Azure1234','suDb', 1433);</div><div>&nbsp; &nbsp; ShowMessage('Veritabanı bağlantısı başarıyla kuruldu!');</div><div>&nbsp; except</div><div>&nbsp; &nbsp; ShowMessage('Veritabanı bağlantısı kurulamadı: ' + LastExceptionMessage);</div><div>&nbsp; end;</div><div>end;</div><div><br></div><div>// Ürünleri sayfaya yükleme prosedürü</div><div>procedure LoadProductsToPage;</div><div>begin</div><div>&nbsp; ProductQuery := TclSqlQuery.Create(nil);</div><div>&nbsp; try</div><div>&nbsp; &nbsp; ProductQuery.Connection := Clomosy.DBSQLServerConnection;</div><div>&nbsp; &nbsp; ProductQuery.SQL.Text := 'SELECT ProductID, ProductName, ProductPrice, ProductImageURL FROM Products';</div><div>&nbsp; &nbsp; ProductQuery.Open;</div><div><br></div><div>&nbsp; &nbsp; previousButtonLeft := 10;&nbsp; // İlk butonun sol kenardan uzaklığı</div><div>&nbsp; &nbsp; previousButtonTop := 800;&nbsp; &nbsp;// İlk butonun üst kenardan uzaklığı</div><div>&nbsp; &nbsp; i := 0;</div><div><br></div><div>&nbsp; &nbsp; while not ProductQuery.Eof do</div><div>&nbsp; &nbsp; begin</div><div>&nbsp; &nbsp; &nbsp; try</div><div>&nbsp; &nbsp; &nbsp; &nbsp; ProductID := ProductQuery.FieldByName('ProductID').AsInteger;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; ProductName := ProductQuery.FieldByName('ProductName').AsString;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; ProductPrice := ProductQuery.FieldByName('ProductPrice').AsFloat;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; ProductImageURL := ProductQuery.FieldByName('ProductImageURL').AsString;</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; // Yeni buton oluşturma</div><div>&nbsp; &nbsp; &nbsp; &nbsp; Button := mainform.AddNewProButton(AtistirmaliklarPage, 'Button' + IntToStr(i), '');</div><div>&nbsp; &nbsp; &nbsp; &nbsp; mainform.AddNewEvent(Button, tbeOnClick, 'InsertToDatabase');</div><div>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; // Buton boyut ve pozisyon</div><div>&nbsp; &nbsp; &nbsp; &nbsp; Button.Width := 150;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; Button.Height := 150;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; // Butonun yerleşimi (yatay ve dikey)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; if (ProductID mod 2 = 1) then</div><div>&nbsp; &nbsp; &nbsp; &nbsp; begin</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Tek butonlar, sol tarafa hizalanacak</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Button.Margins.Bottom := previousButtonTop; // Önceki butonun altına yerleştirmek için</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Button.Margins.Right := 0;&nbsp; // Sol tarafa hizalanacak</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Button.Margins.Left := 10;&nbsp;</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Sonraki butonun üst mesafesini güncelle</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; previousButtonTop := Button.Top - Button.Height - 10;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; end</div><div>&nbsp; &nbsp; &nbsp; &nbsp; else</div><div>&nbsp; &nbsp; &nbsp; &nbsp; begin</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Çift butonlar, teklerin yanında yer alacak</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Button.Margins.Bottom := previousButtonTop;&nbsp; // Önceki butonla aynı hizaya yerleştirmek için</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Button.Margins.Right := 300;&nbsp; // Teklerin yanında olacak</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Button.Margins.Left := previousButtonLeft;</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Sonraki butonun sol mesafesini güncelle</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; previousButtonLeft := Button.Left - Button.Width - 10;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; end;</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; // Ürün resmini butona ekleme</div><div>&nbsp; &nbsp; &nbsp; &nbsp; if Assigned(mainform) then</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mainform.SetImage(Button, ProductImageURL);</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; // Ürün adını göstermek için etiket oluşturma</div><div>&nbsp; &nbsp; &nbsp; &nbsp; namelabel := mainform.AddNewProLabel(AtistirmaliklarPage, 'namelabel' + IntToStr(i), '');</div><div>&nbsp; &nbsp; &nbsp; &nbsp; namelabel.Margins.Bottom := Button.Margins.Bottom - Button.Height - 5;&nbsp; // Butonun hemen altında</div><div>&nbsp; &nbsp; &nbsp; &nbsp; namelabel.Margins.Left := Button.Margins.Left; // Butonla hizalı</div><div>&nbsp; &nbsp; &nbsp; &nbsp; namelabel.Margins.Right := Button.Margins.Right;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; namelabel.Text := ProductName;</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; // Ürün fiyatını göstermek için etiket oluşturma</div><div>&nbsp; &nbsp; &nbsp; &nbsp; pricelabel := mainform.AddNewProLabel(AtistirmaliklarPage, 'pricelabel' + IntToStr(i), '');</div><div>&nbsp; &nbsp; &nbsp; &nbsp; pricelabel.Margins.Bottom := namelabel.Margins.Bottom - namelabel.Height - 5;&nbsp; // Ürün adının altında</div><div>&nbsp; &nbsp; &nbsp; &nbsp; pricelabel.Margins.Left := namelabel.Margins.Left; // Butonla hizalı</div><div>&nbsp; &nbsp; &nbsp; &nbsp; pricelabel.Margins.Right := namelabel.Margins.Right;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; pricelabel.Text := Format('Fiyat: %.2f TL', &#091;ProductPrice&#093;);</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; ProductQuery.Next;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; Inc(i); // i'yi 1 artır</div><div>&nbsp; &nbsp; &nbsp; except</div><div>&nbsp; &nbsp; &nbsp; &nbsp; ShowMessage('Ürün bilgileri işlenirken hata: ' + LastExceptionMessage);</div><div>&nbsp; &nbsp; &nbsp; end;</div><div>&nbsp; &nbsp; end;</div><div>&nbsp; finally</div><div>&nbsp; &nbsp; ProductQuery.Close;</div><div>&nbsp; &nbsp; ProductQuery.Free;</div><div>&nbsp; end;</div><div>end;</div><div><br></div><div>// Ürün ekleme sayfasını oluşturma prosedürü</div><div>procedure AddProductPage;</div><div>begin</div><div>&nbsp; try</div><div>&nbsp; &nbsp; AtistirmaliklarPage := mainform.AddNewProPanel(mainform, 'AtistirmaliklarPage');</div><div>&nbsp; &nbsp; if Assigned(AtistirmaliklarPage) then</div><div>&nbsp; &nbsp; begin</div><div>&nbsp; &nbsp; &nbsp; AtistirmaliklarPage.Align := alNone;&nbsp; // Manuel hizalama</div><div>&nbsp; &nbsp; &nbsp; AtistirmaliklarPage.Width := 600;&nbsp; &nbsp; &nbsp;// Panel genişliği</div><div>&nbsp; &nbsp; &nbsp; AtistirmaliklarPage.Height := 800;&nbsp; &nbsp; // Panel yüksekliği</div><div>&nbsp; &nbsp; &nbsp; AtistirmaliklarPage.Left := 50;&nbsp; &nbsp; &nbsp; &nbsp;// Panelin sol kenardan uzaklığı</div><div>&nbsp; &nbsp; &nbsp; AtistirmaliklarPage.Top := 50;&nbsp; &nbsp; &nbsp; &nbsp; // Panelin üst kenardan uzaklığı</div><div>&nbsp; &nbsp; &nbsp; AtistirmaliklarPage.Margins.Left := 10;</div><div>&nbsp; &nbsp; &nbsp; AtistirmaliklarPage.Margins.Right := 10;</div><div>&nbsp; &nbsp; &nbsp; AtistirmaliklarPage.Margins.Top := 5;</div><div>&nbsp; &nbsp; &nbsp; AtistirmaliklarPage.Margins.Bottom := 10;</div><div>&nbsp; &nbsp; &nbsp; AtistirmaliklarPage.clProSettings.BackgroundColor := clAlphaColor.clHexToColor('#ffffff');</div><div>&nbsp; &nbsp; &nbsp; AtistirmaliklarPage.SetclProSettings(AtistirmaliklarPage.clProSettings);</div><div><br></div><div>&nbsp; &nbsp; &nbsp; // Ürünleri sayfaya yükle</div><div>&nbsp; &nbsp; &nbsp; LoadProductsToPage;</div><div>&nbsp; &nbsp; end</div><div>&nbsp; &nbsp; else</div><div>&nbsp; &nbsp; &nbsp; ShowMessage('Atıştırmalıklar sayfası oluşturulamadı');</div><div>&nbsp; except</div><div>&nbsp; &nbsp; ShowMessage('Panel oluşturulurken hata: ' + LastExceptionMessage);</div><div>&nbsp; end;</div><div>end;</div><div><br></div><div>// Ana program akışı</div><div>begin</div><div>&nbsp; mainform := TclForm.Create(nil);</div><div>&nbsp; try</div><div>&nbsp; &nbsp; mainform.SetFormColor('#CBEDD5', '', clGNone);</div><div>&nbsp; &nbsp; /*</div><div>&nbsp; &nbsp; edtProductID := mainform.AddNewEdit(mainform, 'edtProductID', 'ProductID');</div><div>&nbsp; &nbsp; edtProductID.Margins.Right := 150;</div><div>&nbsp;&nbsp;</div><div>&nbsp; &nbsp; edtProductName := mainform.AddNewEdit(mainform, 'edtProductName', 'ProductName');</div><div>&nbsp; &nbsp; edtProductName.Margins.Left := 150;</div><div>&nbsp;&nbsp;</div><div>&nbsp;&nbsp;</div><div>&nbsp; &nbsp; edtProductPrice := mainform.AddNewEdit(mainform, 'edtProductPrice', 'ProductPrice');</div><div>&nbsp; &nbsp; edtProductPrice.Margins.Left := 150;</div><div>&nbsp;&nbsp;</div><div>&nbsp;&nbsp;</div><div>&nbsp; &nbsp; edtProductImageURL := mainform.AddNewEdit(mainform, 'edtProductImageURL', 'ProductImageURL');</div><div>&nbsp; &nbsp; edtProductImageURL.Margins.Left := 150;</div><div>&nbsp; &nbsp; */</div><div>&nbsp; &nbsp; insertToDatabase;</div><div>&nbsp; &nbsp; SetupDatabaseConnection;</div><div>&nbsp; &nbsp; AddProductPage;</div><div>&nbsp; &nbsp; mainform.Run;</div><div>&nbsp; except</div><div>&nbsp; &nbsp; ShowMessage('Ana form çalıştırılırken hata: ' + LastExceptionMessage);</div><div>&nbsp; end;</div><div>end.</div><div><br></div><div>sanırım insertodatabase kısmında try'a girmiyor aşağıdakı hatayı alıyorum:</div></div><div><div>var</div><div>&nbsp; mainform: TclForm;</div><div>&nbsp; AtistirmaliklarPage: TclProPanel;</div><div>&nbsp; Button: TclProButton;</div><div>&nbsp; ProductID: Integer;</div><div>&nbsp; ProductName: string;</div><div>&nbsp; ProductPrice: Double;</div><div>&nbsp; ProductImageURL: string;</div><div>&nbsp; insertQuery, ProductQuery: TclSqlQuery;</div><div>&nbsp; pricelabel, namelabel: TclProLabel;</div><div>&nbsp;edtProductID,edtProductName, edtProductPrice, edtProductImageURL: TclEdit;</div><div>&nbsp; i, previousButtonLeft, previousButtonTop: Integer;</div><div><br></div><div>// Veritabanına veri ekleme prosedürü</div><div>procedure insertToDatabase;</div><div>begin</div><div>&nbsp;insertQuery:= TclSqlQuery.Create(nil);</div><div>&nbsp; try</div><div>&nbsp; &nbsp; insertQuery.Connection := Clomosy.DBSQLServerConnection;</div><div>&nbsp; &nbsp; insertQuery.SQL.Text := 'INSERT INTO Cart (ProductID,ProductName, ProductPrice, ProductImageURL) ' +</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'VALUES (' +QuotedStr(edtProductID.Text)&nbsp; + ', ' + QuotedStr(edtProductName.Text)+','+</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;QuotedStr(edtProductPrice.Text) + ', ' +&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;QuotedStr(edtProductImageURL.Text) + ');';</div><div>&nbsp; &nbsp; insertQuery.ExecSql;</div><div>&nbsp; &nbsp; ShowMessage('Veri ekleme başarılı');</div><div>&nbsp; except</div><div>&nbsp; &nbsp; ShowMessage('Exception class: ' + LastExceptionClassName +</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ' Exception Message: ' + LastExceptionMessage);</div><div>&nbsp; end;</div><div>end;</div><div><br></div><div>// Veritabanı bağlantısını kurma prosedürü</div><div>procedure SetupDatabaseConnection;</div><div>begin</div><div>&nbsp; try</div><div>&nbsp; &nbsp; Clomosy.DBSQLServerConnect('SQL Server', 'su-db.database.windows.net','dbAdmin','Azure1234','suDb', 1433);</div><div>&nbsp; &nbsp; ShowMessage('Veritabanı bağlantısı başarıyla kuruldu!');</div><div>&nbsp; except</div><div>&nbsp; &nbsp; ShowMessage('Veritabanı bağlantısı kurulamadı: ' + LastExceptionMessage);</div><div>&nbsp; end;</div><div>end;</div><div><br></div><div>// Ürünleri sayfaya yükleme prosedürü</div><div>procedure LoadProductsToPage;</div><div>begin</div><div>&nbsp; ProductQuery := TclSqlQuery.Create(nil);</div><div>&nbsp; try</div><div>&nbsp; &nbsp; ProductQuery.Connection := Clomosy.DBSQLServerConnection;</div><div>&nbsp; &nbsp; ProductQuery.SQL.Text := 'SELECT ProductID, ProductName, ProductPrice, ProductImageURL FROM Products';</div><div>&nbsp; &nbsp; ProductQuery.Open;</div><div><br></div><div>&nbsp; &nbsp; previousButtonLeft := 10;&nbsp; // İlk butonun sol kenardan uzaklığı</div><div>&nbsp; &nbsp; previousButtonTop := 800;&nbsp; &nbsp;// İlk butonun üst kenardan uzaklığı</div><div>&nbsp; &nbsp; i := 0;</div><div><br></div><div>&nbsp; &nbsp; while not ProductQuery.Eof do</div><div>&nbsp; &nbsp; begin</div><div>&nbsp; &nbsp; &nbsp; try</div><div>&nbsp; &nbsp; &nbsp; &nbsp; ProductID := ProductQuery.FieldByName('ProductID').AsInteger;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; ProductName := ProductQuery.FieldByName('ProductName').AsString;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; ProductPrice := ProductQuery.FieldByName('ProductPrice').AsFloat;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; ProductImageURL := ProductQuery.FieldByName('ProductImageURL').AsString;</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; // Yeni buton oluşturma</div><div>&nbsp; &nbsp; &nbsp; &nbsp; Button := mainform.AddNewProButton(AtistirmaliklarPage, 'Button' + IntToStr(i), '');</div><div>&nbsp; &nbsp; &nbsp; &nbsp; mainform.AddNewEvent(Button, tbeOnClick, 'InsertToDatabase');</div><div>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; // Buton boyut ve pozisyon</div><div>&nbsp; &nbsp; &nbsp; &nbsp; Button.Width := 150;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; Button.Height := 150;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; // Butonun yerleşimi (yatay ve dikey)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; if (ProductID mod 2 = 1) then</div><div>&nbsp; &nbsp; &nbsp; &nbsp; begin</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Tek butonlar, sol tarafa hizalanacak</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Button.Margins.Bottom := previousButtonTop; // Önceki butonun altına yerleştirmek için</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Button.Margins.Right := 0;&nbsp; // Sol tarafa hizalanacak</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Button.Margins.Left := 10;&nbsp;</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Sonraki butonun üst mesafesini güncelle</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; previousButtonTop := Button.Top - Button.Height - 10;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; end</div><div>&nbsp; &nbsp; &nbsp; &nbsp; else</div><div>&nbsp; &nbsp; &nbsp; &nbsp; begin</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Çift butonlar, teklerin yanında yer alacak</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Button.Margins.Bottom := previousButtonTop;&nbsp; // Önceki butonla aynı hizaya yerleştirmek için</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Button.Margins.Right := 300;&nbsp; // Teklerin yanında olacak</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Button.Margins.Left := previousButtonLeft;</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Sonraki butonun sol mesafesini güncelle</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; previousButtonLeft := Button.Left - Button.Width - 10;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; end;</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; // Ürün resmini butona ekleme</div><div>&nbsp; &nbsp; &nbsp; &nbsp; if Assigned(mainform) then</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mainform.SetImage(Button, ProductImageURL);</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; // Ürün adını göstermek için etiket oluşturma</div><div>&nbsp; &nbsp; &nbsp; &nbsp; namelabel := mainform.AddNewProLabel(AtistirmaliklarPage, 'namelabel' + IntToStr(i), '');</div><div>&nbsp; &nbsp; &nbsp; &nbsp; namelabel.Margins.Bottom := Button.Margins.Bottom - Button.Height - 5;&nbsp; // Butonun hemen altında</div><div>&nbsp; &nbsp; &nbsp; &nbsp; namelabel.Margins.Left := Button.Margins.Left; // Butonla hizalı</div><div>&nbsp; &nbsp; &nbsp; &nbsp; namelabel.Margins.Right := Button.Margins.Right;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; namelabel.Text := ProductName;</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; // Ürün fiyatını göstermek için etiket oluşturma</div><div>&nbsp; &nbsp; &nbsp; &nbsp; pricelabel := mainform.AddNewProLabel(AtistirmaliklarPage, 'pricelabel' + IntToStr(i), '');</div><div>&nbsp; &nbsp; &nbsp; &nbsp; pricelabel.Margins.Bottom := namelabel.Margins.Bottom - namelabel.Height - 5;&nbsp; // Ürün adının altında</div><div>&nbsp; &nbsp; &nbsp; &nbsp; pricelabel.Margins.Left := namelabel.Margins.Left; // Butonla hizalı</div><div>&nbsp; &nbsp; &nbsp; &nbsp; pricelabel.Margins.Right := namelabel.Margins.Right;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; pricelabel.Text := Format('Fiyat: %.2f TL', &#091;ProductPrice&#093;);</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; ProductQuery.Next;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; Inc(i); // i'yi 1 artır</div><div>&nbsp; &nbsp; &nbsp; except</div><div>&nbsp; &nbsp; &nbsp; &nbsp; ShowMessage('Ürün bilgileri işlenirken hata: ' + LastExceptionMessage);</div><div>&nbsp; &nbsp; &nbsp; end;</div><div>&nbsp; &nbsp; end;</div><div>&nbsp; finally</div><div>&nbsp; &nbsp; ProductQuery.Close;</div><div>&nbsp; &nbsp; ProductQuery.Free;</div><div>&nbsp; end;</div><div>end;</div><div><br></div><div>// Ürün ekleme sayfasını oluşturma prosedürü</div><div>procedure AddProductPage;</div><div>begin</div><div>&nbsp; try</div><div>&nbsp; &nbsp; AtistirmaliklarPage := mainform.AddNewProPanel(mainform, 'AtistirmaliklarPage');</div><div>&nbsp; &nbsp; if Assigned(AtistirmaliklarPage) then</div><div>&nbsp; &nbsp; begin</div><div>&nbsp; &nbsp; &nbsp; AtistirmaliklarPage.Align := alNone;&nbsp; // Manuel hizalama</div><div>&nbsp; &nbsp; &nbsp; AtistirmaliklarPage.Width := 600;&nbsp; &nbsp; &nbsp;// Panel genişliği</div><div>&nbsp; &nbsp; &nbsp; AtistirmaliklarPage.Height := 800;&nbsp; &nbsp; // Panel yüksekliği</div><div>&nbsp; &nbsp; &nbsp; AtistirmaliklarPage.Left := 50;&nbsp; &nbsp; &nbsp; &nbsp;// Panelin sol kenardan uzaklığı</div><div>&nbsp; &nbsp; &nbsp; AtistirmaliklarPage.Top := 50;&nbsp; &nbsp; &nbsp; &nbsp; // Panelin üst kenardan uzaklığı</div><div>&nbsp; &nbsp; &nbsp; AtistirmaliklarPage.Margins.Left := 10;</div><div>&nbsp; &nbsp; &nbsp; AtistirmaliklarPage.Margins.Right := 10;</div><div>&nbsp; &nbsp; &nbsp; AtistirmaliklarPage.Margins.Top := 5;</div><div>&nbsp; &nbsp; &nbsp; AtistirmaliklarPage.Margins.Bottom := 10;</div><div>&nbsp; &nbsp; &nbsp; AtistirmaliklarPage.clProSettings.BackgroundColor := clAlphaColor.clHexToColor('#ffffff');</div><div>&nbsp; &nbsp; &nbsp; AtistirmaliklarPage.SetclProSettings(AtistirmaliklarPage.clProSettings);</div><div><br></div><div>&nbsp; &nbsp; &nbsp; // Ürünleri sayfaya yükle</div><div>&nbsp; &nbsp; &nbsp; LoadProductsToPage;</div><div>&nbsp; &nbsp; end</div><div>&nbsp; &nbsp; else</div><div>&nbsp; &nbsp; &nbsp; ShowMessage('Atıştırmalıklar sayfası oluşturulamadı');</div><div>&nbsp; except</div><div>&nbsp; &nbsp; ShowMessage('Panel oluşturulurken hata: ' + LastExceptionMessage);</div><div>&nbsp; end;</div><div>end;</div><div><br></div><div>// Ana program akışı</div><div>begin</div><div>&nbsp; mainform := TclForm.Create(nil);</div><div>&nbsp; try</div><div>&nbsp; &nbsp; mainform.SetFormColor('#CBEDD5', '', clGNone);</div><div>&nbsp; &nbsp; /*</div><div>&nbsp; &nbsp; edtProductID := mainform.AddNewEdit(mainform, 'edtProductID', 'ProductID');</div><div>&nbsp; &nbsp; edtProductID.Margins.Right := 150;</div><div>&nbsp;&nbsp;</div><div>&nbsp; &nbsp; edtProductName := mainform.AddNewEdit(mainform, 'edtProductName', 'ProductName');</div><div>&nbsp; &nbsp; edtProductName.Margins.Left := 150;</div><div>&nbsp;&nbsp;</div><div>&nbsp;&nbsp;</div><div>&nbsp; &nbsp; edtProductPrice := mainform.AddNewEdit(mainform, 'edtProductPrice', 'ProductPrice');</div><div>&nbsp; &nbsp; edtProductPrice.Margins.Left := 150;</div><div>&nbsp;&nbsp;</div><div>&nbsp;&nbsp;</div><div>&nbsp; &nbsp; edtProductImageURL := mainform.AddNewEdit(mainform, 'edtProductImageURL', 'ProductImageURL');</div><div>&nbsp; &nbsp; edtProductImageURL.Margins.Left := 150;</div><div>&nbsp; &nbsp; */</div><div>&nbsp; &nbsp; insertToDatabase;</div><div>&nbsp; &nbsp; SetupDatabaseConnection;</div><div>&nbsp; &nbsp; AddProductPage;</div><div>&nbsp; &nbsp; mainform.Run;</div><div>&nbsp; except</div><div>&nbsp; &nbsp; ShowMessage('Ana form çalıştırılırken hata: ' + LastExceptionMessage);</div><div>&nbsp; end;</div><div>end.</div></div><div><img src="" border="0" /></div>]]>
   </description>
   <pubDate>Tue, 17 Sep 2024 15:41:27 +0000</pubDate>
   <guid isPermaLink="true">https://forum.clomosy.com.tr/forum_posts.asp?TID=935&amp;PID=1818#1818</guid>
  </item> 
 </channel>
</rss>