Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Other Languages
»
Arabic
(Moderators:
nouzi
,
pascal111
) »
مشكلة في استعلام sql
Free Pascal
Website
Downloads
Wiki
Documentation
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Documentation (RTL/FCL/LCL)
Bugtracker
CCR Bugs
GIT
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
Error, the IF function do...
by
veb86
[
Today
at 06:47:30 am]
Source Editor - Open Sour...
by
n7800
[
Today
at 05:13:12 am]
Form Positioning (Run & D...
by
Tony Stone
[
Today
at 03:28:03 am]
StrToInt not raising an e...
by
ALLIGATOR
[
Today
at 03:17:25 am]
Unselect all rows in stri...
by
Jonny
[
Today
at 01:07:15 am]
[solved] Issues was wrong...
by
What I can do
[
Today
at 01:03:09 am]
Specialisation doesn't se...
by
nixbody
[
Today
at 12:38:49 am]
User Domain
by
Remy Lebeau
[
Today
at 12:20:36 am]
Treeview: full-width back...
by
wp
[
Today
at 12:06:20 am]
visasession
by
Laksen
[
Today
at 12:03:45 am]
UADE Library
by
Gigatron
[February 06, 2025, 11:41:14 pm]
Please explain what is Po...
by
PascalDragon
[February 06, 2025, 11:03:56 pm]
"set of": order of elemen...
by
PascalDragon
[February 06, 2025, 10:14:14 pm]
Compile App Error
by
eldonfsr
[February 06, 2025, 10:03:23 pm]
ellipse ? off topic
by
d2010
[February 06, 2025, 09:10:42 pm]
using RunCommand to wrap ...
by
MarkMLl
[February 06, 2025, 08:54:16 pm]
Telegram bots API Wrapper
by
Renat.Su
[February 06, 2025, 07:51:49 pm]
Custom self drawn compone...
by
wp
[February 06, 2025, 06:29:29 pm]
working on multiple proje...
by
TRon
[February 06, 2025, 05:39:14 pm]
Problema como barra de ro...
by
mfdzerohour
[February 06, 2025, 05:14:28 pm]
image processing library
by
JernejL
[February 06, 2025, 04:27:07 pm]
Reading and writing AVIF ...
by
Tomxe
[February 06, 2025, 02:34:13 pm]
Pointer and/xor set failu...
by
BrunoK
[February 06, 2025, 12:41:51 pm]
Dialogs and Windows PE
by
d2010
[February 06, 2025, 11:52:49 am]
What is more (memory) eff...
by
DragoRosso
[February 06, 2025, 11:51:34 am]
« previous
next »
Print
Pages: [
1
]
Author
Topic: مشكلة في استعلام sql (Read 344 times)
Gebo
New Member
Posts: 49
مشكلة في استعلام sql
«
on:
January 26, 2025, 02:10:26 pm »
أنا بنفذ بكون استعلام sql ولكن لا تأتي بسجل واحد
فما هو السبب
Code: Pascal
[Select]
[+]
[-]
SQLQuery1
.
Close
;
ODBCConnection1
.
Close
(
)
;
SQLQuery1
.
SQL
.
Text
:
=
'select weight,meter,lot,user,rolldate,colors.col_code,cloth.cloth_code from recorded_rolls inner join cloth on cloth.id=recorded_rolls.type_cloth inner join colors on colors.id=recorded_rolls.roll_color where '
;
if
Trim
(
DBLookupComboBox1
.
Text
)
<>
''
then
SQLQuery1
.
SQL
.
Add
(
'recorded_rolls.roll_color ='
+
DBLookupComboBox1
.
KeyField
+
' and '
)
;
if
Trim
(
DBLookupComboBox2
.
Text
)
<>
''
then
SQLQuery1
.
SQL
.
Add
(
'recorded_rolls.type_cloth= '
+
DBLookupComboBox2
.
KeyField
+
' and '
)
;
//فحص حقل الوزن وإضافته لكود sql
if
Trim
(
Edit1
.
Text
)
<>
''
then
SQLQuery1
.
SQL
.
Add
(
'recorded_rolls.weight = '
+
Edit1
.
Text
+
' and '
)
;
//فحص حقل طول الرول وإضافته لكود sql
if
Trim
(
Edit2
.
Text
)
<>
''
then
SQLQuery1
.
SQL
.
Add
(
'recorded_rolls.meter = '
+
Edit2
.
Text
+
' and '
)
;
SQLQuery1
.
SQL
.
Add
(
'recorded_rolls.rolldate between '
+
DateToStr
(
DateTimePicker1
.
Date
)
+
' and '
+
DateToStr
(
DateTimePicker2
.
Date
)
+
' and '
)
;
SQLQuery1
.
SQL
.
Add
(
'1=1'
)
;
SQLQuery1
.
Open
;
Logged
I like programming I begun by vb,vb.net,c# and finally free pascal and lazarus .I like martial arts sports and I am a kickboxer and made our team sport club called black eagle school I have a website for modern clothes..
nouzi
Moderator
Sr. Member
Posts: 314
Re: مشكلة في استعلام sql
«
Reply #1 on:
January 26, 2025, 08:35:19 pm »
ماهي نتيجة الاستعلام عند تنفيده مباشرة على محرك قواعد المعطيات ؟
حول أستعمل FieldByName يكون الامر افضل
«
Last Edit: January 26, 2025, 08:48:15 pm by nouzi
»
Logged
My English is bad
Lazarus last version free pascal last version
Lazarus trunk free pascal trunk
System : Linux mint 64bit Windows 7 64bit
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Other Languages
»
Arabic
(Moderators:
nouzi
,
pascal111
) »
مشكلة في استعلام sql
TinyPortal
© 2005-2018