الفلترة في جداول Absolute Database
#3
السلام عليكم ورحمة الله وبركاته
شكرا أخي Prince
عكست العملية لكن دون جدوى
يبدو أنه خلل أصلي فقد وجدت في ملف المسـاعدة مايلي :
PHP كود :
The date, time, number, and currency formats used in your application should be localized for the target locale. 
All DB-Aware controls display date, time, number and currency values using the default system locale settings. 
The problem could happen when you are specifying a date, time, ... constant in a filter string or in a SQL command. 

Then you should remember the following issues: 
 
· Point character ('.') is fixed as a decimal separator.  
 
 
· ISO format could be used for date/time constants: YYYY-MM-DD HH:MM:SS to avoid problems with locale settings.  
 
 
· In other cases Absolute Database uses the current system locale settings to format date, time, and currency.  
 
   

So if you are using date, time, number, or currency in a string format for filtering, searching, or with SQL command, you must use one of the following methods: 

 
· Use the fixed decimal point character '.' for float and currency constants  
 
 · 
Use the ISO format YYYY-MM-DD for date, HH:MM:SS for time constants  
 
 · 
Use the default locale settings to convert date, time, ... value to a string  
 
 · 
Use query parameters  
 
 · Specify the format via special format string 
and SQL function  
 
   


The following example illustrates how you can use the float value in a filter string: 

 
ABSTable1.Filter := 'Weight > 3.5';  
 
  
 
  
 
  
The code below shows how to use ISO format date constant in SQL query: 

 
ABSQuery1.SQL.Text := 'INSERT INTO Orders (ID, BillDate) VALUES (1, ''2003-07-31'')';  
 
  
 
  
 
  
The next sample demonstrates how you can use the default locale settings to convert date value to a string for SQL query: 

 
ABSQuery1.SQL.Text := 'INSERT INTO Orders (ID, BillDate) VALUES (1, '+QuotedStr(DateToStr(Date))+')';  
 
  
 
  
 
  
The code below shows how to use query parameters to avoid converting problems: 

 
ABSQuery1.SQL.Text := 'INSERT INTO Orders (ID, BillDate) VALUES (2, :BillDate)';  
 
 
ABSQuery1.Params[0].AsDateTime := Date;  
 
  
 
  
 
  
The last example illustrates how to use TODATE SQL function to insert DateTime field value: 

 
INSERT INTO Orders (ID, BillDate) VALUES (3, TODATE('12/16/2002 11:10:30 am','MM/DD/YYYY hh:nn:ss ampm')) 
من فهم شيئا في الإنجليزية فليتحفنا
وفقكم الله
الرد


الردود في هذا الموضوع
الفلترة في جداول Absolute Database - بواسطة rm31 - 18-06-2009, 11:11 AM
الفلترة في جداول Absolute Database - بواسطة Prince - 19-06-2009, 11:14 PM
الفلترة في جداول Absolute Database - بواسطة rm31 - 20-06-2009, 12:06 PM
الفلترة في جداول Absolute Database - بواسطة Prince - 20-06-2009, 09:53 PM
الفلترة في جداول Absolute Database - بواسطة rm31 - 22-06-2009, 04:02 PM
الفلترة في جداول Absolute Database - بواسطة rm31 - 22-06-2009, 05:50 PM
الفلترة في جداول Absolute Database - بواسطة rm31 - 23-06-2009, 10:46 AM
الفلترة في جداول Absolute Database - بواسطة Prince - 23-06-2009, 11:47 AM
الفلترة في جداول Absolute Database - بواسطة rm31 - 23-06-2009, 03:11 PM
الفلترة في جداول Absolute Database - بواسطة Effector - 27-06-2009, 05:09 PM
الفلترة في جداول Absolute Database - بواسطة Shaieb - 24-03-2012, 01:18 PM

التنقل السريع :


يقوم بقرائة الموضوع: بالاضافة الى ( 1 ) ضيف كريم