الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

التعامل مع قواعد البيانات الاخرى Sql – Mysql – Mdb من خلال الفوكس برو

مثبّترائج
بدأه Shadowz في 11 أبريل 2009 · 58 رد · 14,964 مشاهدة · في قواعد بيانات Visual FoxPro
مشاركة: واتساب X فيسبوك تيليجرام
#51

رابعا :CURSORGETPROP( ) Function

Retrieves the current property settings for a Visual FoxPro table or a cursor. 

Note  
To set a specific property for a Visual FoxPro table or a cursor, use CURSORSETPROP( ). For additional information about each of the properties and their settings, see CURSORSETPROP( ) Function.
CURSORGETPROP(cProperty [, nWorkArea | cTableAlias])
Parameters
cProperty 
Specifies the property setting to retrieve.

The following table includes a list of properties whose settings can be returned, the data type of the return value, and a description of the return value. 

cProperty  Type  Description  
ADOBookmark
 Variant
 Contains a value that corresponds to an ADO Bookmark for the current record in an ADO-based cursor.
 
ADOCodePage
 N
 Returns the code page bound to an ADO-based cursor as specified by the ADOCodePage Property. Read-only.
 
ADORecordset
 O
 Contains an object reference to the ActiveX Data Object (ADO) Recordset associated with the cursor. Not valid for cursors that are not based on ADO Recordsets. Read-only. 
 
AllowSimultaneousFetch
 L
 Applies when using remote views, a shared connection, and to cursors created using ODBC. 

AllowSimultaneousFetch contains True (.T.) when similarly configured cursors sharing the connection are permitted to fetch rows simultaneously. 

Otherwise, AllowSimultaneousFetch contains False (.F.) when fetching rows simultaneously is not permitted.
 
AutoIncError
 L
 Contains True (.T.) when attempts to insert or update a value in a field that uses automatically incrementing field values generate an error message. 

Contains False (.F.) when attempts to insert or update a value in a field that uses automatically incrementing field values does not generate an error message and the specified value to be inserted or updated is disregarded.

Applies to cursors and sessions.

Read/write.
 
BatchUpdateCount*
 N
 Contains the number of update statements sent to the remote data source for buffered tables. The default value is 1. Adjusting this value can greatly increase update performance.

Read/write.
 
Buffering
 N
 1 – Row and table buffering is off. (Default)

2 – Pessimistic row buffering is on.

3 – Optimistic row buffering is on.

4 – Pessimistic table buffering is on.

5 – Optimistic table buffering is on.

Read/write.
 
CompareMemo
 L
 Contains True (.T.) if WHERE clause for updates includes memo fields of type Memo, General, or Picture. (Default). 

Otherwise, contains False (.F.).

For views only.

Read/write.
 
ConnectHandle
 N
 The connection handle. This property is valid only when the data source contains a remote table. The connection handle obtained for a view might close when the view closes.

Read-only.
 
ConnectName
 C
 The connection name used when the cursor is created. This property is valid only when the data source contains a remote table.

Read-only. 
 
Database
 C
 The name of the database that contains the table or view. If a table is a free table, Database contains an empty string.

Read-only.
 
FetchAsNeeded
 L
 If True (.T.), data is fetched only when needed, such as when record pointer moves to a row that has not been fetched.

If False (.F.), additional data is fetched during idle time. (Default)

NoteNote  
FetchAsNeeded does not apply when progressive fetching is disabled (FetchSize is -1).
 

Read/write.
 
FetchIsComplete
 L
 If True (.T.), the fetch process is complete for an ODBC or ADO-based cursor.

If False (.F.), the fetch process has not been completed.

This option is not supported for tables and local views or on the environment level (work area 0).
 
FetchMemo*
 L
 Contains True (.T.) if memo fields are fetched with the view results. Otherwise, contains False (.F.). (Default).

Use the ISMEMOFETCHED( ) Function to determine if the memo field has been fetched.

Read/write.
 
FetchSize*
 N
 Contains the number of rows fetched at a time from the remote tables. The default is 100 rows. Setting FetchSize to –1 retrieves the complete result set, limited by the MaxRecords setting.

NoteNote  
Progressive fetching holds the connection until all rows are retrieved. Use caution coding with FetchSize if ShareConnection is True (.T.).
 

Read/write.
 
KeyFieldList
 C
 A comma delimited list of primary fields for the cursor.

Read/write.
 
MapBinary
 L
 Contains True (.T.) if Varbinary mapping is turned on. Otherwise, contains (.F.).

Read/write for nWorkArea set to 0 only. Read-only for SQL Pass-Through cursors. Invalid for table cursors (nWorkArea equal to or greater than 1).
 
MapVarchar
 L
 Contains True (.T.) if Varchar mapping is turned on. Otherwise, contains False (.F.).

Read/write for nWorkArea set to 0 only. Read-only for SQL Pass-Through cursors. Invalid for table cursors (nWorkArea equal to or greater than 1).
 
MaxRecords*
 N
 The maximum number of rows fetched when result sets are returned. The default value is – 1 (all rows are returned). A value of 0 specifies that the view is executed but no results are fetched.

Read/write.
 
ParameterList
 C
 A semi-colon delimited list of view parameters and parameter types. For views only.

Read/write.
 
Prepared
 L
 Contains True (.T.) if SQL statements are prepared for subsequent REQUERY( ) function calls. Otherwise, contains False (.F.). (Default). 

REQUERY( ) is used to retrieve data again for a SQL view. See SQLPREPARE( ) for additional information about preparing SQL statements. For views only.

Read/write.
 
RecordsFetched
 N
 Contains a numeric value that indicates the number of records fetched from the data source for an ODBC or ADO-based cursor.

This numeric value may not reflect the current record count for the cursor if records were locally deleted or appended.

This option is not supported for tables and local views or on the environment level (work area 0).

NoteNote  
Any filter conditions are ignored in the record count.
 

Read-only.
 
Refresh
 N
 Contains a numeric value that indicates the refresh setting for an individual cursor in the current data session or an initial refresh value for newly opened cursors in the current data session.
 
SendUpdates
 L
 Contains True (.T.) if a SQL update query is sent to update tables when an update is made using the view; otherwise, contains false (.F.) (default).

Read/write.
 
SourceName
 C
 Contains the long name for a SQL view or a table in a database, or the file path and table name for a free table.

Read-only.
 
SourceType
 N
 1 – The data source is a local SQL view.

101 (1 + 100) - Cursor is created by the CursorFill method.

201 (1 + 200) - Cursor is attached to a CursorAdapter object using the CursorAttach method.

2 – The data source is a remote SQL view.

102 (2 + 100) - Cursor is created by CursorFill.

202 (2 + 200) - Cursor is attached to a CursorAdapter object using CursorAttach.

3 – The data source is a table.

103 (3 + 100) - Cursor is created by CursorFill.

203 (3 + 200) - Cursor is attached to a CursorAdapter object using CursorAttach.

4 - The cursor is based on ADO Recordset and attached to a CursorAdapter object.

104 (4 + 100) - Cursor is created by CursorFill.

204 (4 + 200) - Cursor is attached to a CursorAdapter object using CursorAttach.

Read-only.
 
SQL
 C
 The SQL statement executed when the cursor is created.

Read-only.
 
Tables
 C
 A comma delimited list of the names of tables.

Read/write.
 
UpdatableFieldList
 C
 A comma delimited list of fields in the view. This list can include fields from local and remote tables.

Read/write.
 
UpdateNameList
 C
 A comma delimited list of remote field names and the local field names assigned to the cursor. Use this option to specify valid Visual FoxPro names for fields in the cursor that have invalid Visual FoxPro field names.

Read/write.
 
UpdateType
 N
 1 – Specifies that old data is updated with the new data. (Default).

2 – Specifies that updates occur by deleting the old data and inserting the new data.

Read/write.
 
UseMemoSize*
 N
 The minimum size, in bytes, for result columns to return in memo fields. For example, if the width of a column result is greater than the value of UseMemoSize, the column result is stored in a memo field. UseMemoSize may vary from 1 to 255; the default value is 255.

Read/write.
 
WhereType
 N
 The WHERE clause for updates to tables. WhereType can specify the following values:

1 or DB_KEY (from FOXPRO.H). The WHERE clause used to update tables consists of only the primary fields specified with the KeyFieldList property.

2 or DB_KEYANDUPDATABLE (from FOXPRO.H). The WHERE clause used to update tables consists of the primary fields specified with the KeyFieldList property and any updatable fields.

3 or DB_KEYANDMODIFIED (from FOXPRO.H) (default). The WHERE clause used to update tables consists of the primary fields specified with the KeyFieldList property and any other fields that are modified.

4 or DB_KEYANDTIMESTAMP (from FOXPRO.H). The WHERE clause used to update tables consists of the primary fields specified with the KeyFieldList property and a comparison of the time stamps.

Read/write.
 

* The value returned by this property is significant only for remote views; if you get this property for local views, the CURSORGETPROP( ) function returns the default value.

The following table includes a list of properties whose settings can be returned, the data type of the return value, and a description of the return value. 

nWorkArea 
Specifies the work area of the table or cursor from which the property setting is returned. If you specify 0 for nWorkArea, CURSORGETPROP( ) returns the environment setting.

cTableAlias 
Specifies the alias of the table or cursor from which the property setting is returned.

Return Value
Character, Numeric, or Logical data type

Remarks
The current property settings are returned for the table or cursor open in the currently selected work area if CURSORGETPROP( ) is issued without the optional cTableAlias or nWorkArea arguments. If you use CURSORGETPROP( ) without a table selected, a cursor open, or an alias specified, you get Error 52 (No table is open in current work area.) unless a work area is specified as in this example, CURSORSETPROP("Refresh",-2,0).

Example
When a cursor is opened, the default value for the AutoIncError property is read from the session default value, which is the current default data session setting. The following example shows how you can retrieve the default AutoIncError value for each session by specifying 0 (default session) as the last parameter:
CURSORGETPROP("AutoIncError", 0)
The default session is used when opening a new private data session or cursor. The following example shows how you can retrieve the cursor or table AutoIncError setting for each table by using the nWorkArea or cTableAlias parameter as the last parameter:
CURSORGETPROP("AutoIncError", nWorkArea | cTableAlias)
The following example opens a "Customer" table in the "Testdata" database and uses CURSORGETPROP( ) to display the buffering mode for the table and the name of the database in which the table is contained:
CLOSE DATABASES

CLEAR



OPEN DATABASE (HOME(2) + 'data\testdata')

USE customer     && Open customer table



? CURSORGETPROP("Buffering") && Displays buffering mode

? CURSORGETPROP("Database")  && Displays database name

وهذة الشرح من الشركة المبرمجة للغة مع الامثلة الافتراضية دون انقاص او زيادة

 وانا وجميع الاخوة الاعضاء ان شاء الله موجودين لاي سوال

تحياتي للجميع

#52
lion iraq كتب:

السلام عليكم وتحياتي للاخ شادو المبدع 

اخوتي الكرام اذا كنتم  قراتم مشاركتي قبل الاخير ومشاركة الاخ شادو فتاكدو  انه لا يوجد اختلاف كما اتصل بي احد الاعضاء وذكر ان كلامك او كلام شادو متناقضان  بارك الله فيه واتمنى من الجميع اي يعبروا عن تسالهم 

حبيت ان اذكر الخصائص للادوات والامثله عليها من المصدر اي كما شرحها فيجوال فوكس برو 

 

سأُخالفك الرأي هنا يا فراس...فالفرق ما بين الردود ظاهر ويميزه الجميع فلا مجال للنقاش في هذا الموضوع، ولا مجال الا للكلام المباشر الصريح

 

وردي هنا ليس لابراز الصح من الخطأ... فهذا ليس ما يثير غضبي الآن

 

ولأتكلم بصراحة ....كان بعدي في البداية عن المنتدى بسبب الأحاديث الجانبية التي أصبحت تُدار هنا وهناك ( ولن أقدم أي تفسير لما أقول )

 

أعتقد وحسب فهمي للأمور أننا في منتدى علمي مفتوح للنقاش....وهذا النقاش يحتمل الصح والخطأ....

 

قد أخطئ اليوم وقد أصيب غدا، وحتى أنني قد أكون على خطأ طوال الوقت فهذا لا يهم لأنني سأتعلم بالنهاية من أخطائي، أو أجد من يصححها لي......وهو الحال بالنسبة لأي عضو.

 

 

سُمي منتدى للحديث والنقاش المباشر للوصول للمعلومة الصحيحة ....وليس لمتابعة المواضيع على الخاص....( الا اذا كان لدى أحد الأعضاء الأكارم أي وجهة نظر أخرى )

 

لذا أتمنى على من له رأي في المواضيع المطروحة بالمنتدى أن يقوم بطرحه هنا وليس على الخاص

 

وللتأكيد أكثر....أنا أتكلم عن المواضيع المطروحة في المنتدى للنقاش وليس عن أي شؤون أخرى

 

هذه وجهة نظري...فاما أن نستمر على المنتدى....واما أن نتحول على الخاص

 

والله من وراء القصد

 

مع التحية للجميع ( على العام والخاص )

أستغفر الله العظيم و أتوب إليه

#53

الاخ العزيز شادو

لكل شخص رايه الخاص وعلى الجميع احترامه في الحياة العادية او جميع الامور فما رايك اذا كان عن البرمجة 

تختلف وجهات النظر فيه 

اما عن الفرق الضاهر في الردود فهو موجود اما عن تشابه عند استيعاب المستخدم للايعازات يفهم ماكنت تقصد وما انا قصد لان بطبيعة الحال انهُ شي ليس من علمنا وانا هي حقيقة موجودة 

فثلاً 

انت ذكرت التوضيح الاتي

SQLSETPROP

يستخدم لتحديد بعض الخصائص المتعلقة بالاتصال الحالي ( موجودة كلها بملفات المساعدة بالفوكس )

وانا ذكرت 

1- SQLSETPROP:يلغي الاجراءات والتغييرات الذي يتم اجراءها في الاتصال الحالي.

 
فانا لا اعتقد هنالك فرق في  التطبيق 
فعند استخدامها انك تريد بها خصائص غير الخصائص العامله حاليا في هذا الاتصال وهذا غاية نتوصل اليها من توضيحك وتوضيحي وكما ذكرت انت موجودة كلها بملفات المساعدة وانا ذكرت نص الملفات المساعدة لغاية واحدة فقط والله يشهد هي للتوضيح اكثر
ولان المستخدم الذي يستخدم الاتصال يكون مستخدم متقدم 
واعتقد انك لا تحتاج الى توضيح في هذة المسائله اما عن الصح والخطا فالانسان بطبيعته خطا وليس بمعصوم عنهُ الا ماامر ربي عزوجل 
 
ولماذا هذا الغضب في اسلوب ردك لا داعي لهُ وكما تقول انت منتدى نقاش علمي  وبما انهُ نقاش علمي يختلف فيه الاراء وهذا من الجيد أليس كذلك؟
اما عن الطرح الخاص لم اذكر انهُ في المنتدى فهنالك الايميل والفيس بوك والموبايل وعندما ذكر لي العضو انه متناقض قصد فيه الكلام او انهُ لم يعرف المقصود ونحن بدورنا بقوم بالامكان للتوضيح 
وليس الردود انا الافضل او انت فللبرمجة قواعد كل مستخدميها يتبعوها 
اما عن ابتعادك بسبب الكلام هنا وهنالك فيجب ان لا يوثر فيك وانت من نصحني بذلك وهو لم يوثر في واردت الانسحاب لانهُ كان خياري برجوع الاعضاء اذا كنت انا قد اغضبتهم والله علي شهيدا لم اكن افكر في ردودي فقط في تقديم  الحلول قدر المستطاع لطالبيها 
لانه مرت لي تساولات في بداية عملي لم يقدمها لي احد 
 
وهل في كلامي خطا او شك من عدم الصحة ان انتظرك هنا كما تقول ليس على اي شي خاص
#54
lion iraq كتب:
ولماذا هذا الغضب في اسلوب ردك لا داعي لهُ وكما تقول انت منتدى نقاش علمي  وبما انهُ نقاش علمي يختلف فيه الاراء وهذا من الجيد أليس كذلك؟
اما عن الطرح الخاص لم اذكر انهُ في المنتدى فهنالك الايميل والفيس بوك والموبايل وعندما ذكر لي العضو انه متناقض قصد فيه الكلام او انهُ لم يعرف المقصود ونحن بدورنا بقوم بالامكان للتوضيح 
وليس الردود انا الافضل او انت فللبرمجة قواعد كل مستخدميها يتبعوها 
اما عن ابتعادك بسبب الكلام هنا وهنالك فيجب ان لا يوثر فيك وانت من نصحني بذلك وهو لم يوثر في واردت الانسحاب لانهُ كان خياري برجوع الاعضاء اذا كنت انا قد اغضبتهم والله علي شهيدا لم اكن افكر في ردودي فقط في تقديم  الحلول قدر المستطاع لطالبيها 
لانه مرت لي تساولات في بداية عملي لم يقدمها لي احد 
 
وهل في كلامي خطا او شك من عدم الصحة ان انتظرك هنا كما تقول ليس على اي شي خاص

 

 

عزيزي فراس....

بداية غضبي ليس موجه لك أنت بشكل شخصي

وليس متعلقاً بالجزء الذي لم أقتبسه من ردك ( بمعنى أنه ليس له علاقة بأوامر الفوكس ولا بالصح ولا الخطأ ونناقشها لاحقا )

ولا يتعلق بالأحاديث الجانبية ( سواء الشخصية، أو سواء ما دار بيننا من حديث أثناء تفكيرك بالانسحاب من الاشراف، أو أي أحاديث أخرى...وأنت تعلم أن معظم ما دار بيننا بشكل خاص لم يكن متعلقاً بالبرمجة )

 

ولقد أوضحت ذلك بشكل جلي في ردي ان ما أقصده هو ( المواضيع المطروحة بالمنتدى )

ولا أعتقد أن مواضيع المنتدى قد تجزّأ ما بين الفيس والموبايل والايميل.....

 

وأنت كمشرف تريد انعاش المنتدى.....وهذا لن يتم اذا كان جزءاً من المواضيع تناقش هنا وجزء يناقش هناك

 

ولا أعتقد أن هناك ما يمنع أي أحد من المشتركين من وضع رده هنا...

 

وبصراحة لو أردت الخاص بمواضيع المنتدى....لكان ذلك من زمن...

 

عزيزي المواضيع...التي تثار هنا وهناك....بصراحة موضوعها لا يهمني كثيرا لانها ليست من شأني....

 

لكن ان جلست لمتابعة المنتدى..فجميع مواضيعه ستهمني وتعنيني ( ولن أنتظر أو أبحث أو أتساءل أو أقول لنفسي ربما تم انهاء الموضع على الخاص..او الفيس ... او الايميل )

 

أتمنى أن أكون واضحاً...

 

ودمتم،،

تم تعديل هذه المشاركة بواسطة Shadowz في 21 يونيو 2013 في 13:01

أستغفر الله العظيم و أتوب إليه

#55

السلام عليكم
اخي العزيز شادو
اولا انا ادخل هنا اولا بمبدى الخير وتقديم المساعدة لمن يطلبها وبما قدر الله لي
اما عن نشاط المنتدى فانا ابحث دائما عن النشاط به
ومتابع يوميا له
ولا اريد اذكر فقط شي بسيط وموجود في مشاركتي ذكرت تم الاتصال بي وكان جوابي في المشاركة اي اني لم اقوم بالاجابة وانما بالمنتدى
انا عامل صفحة للفيجوال فوكس برو وجميع الاعضاء يعرفها على الفيس وكل سوال اقوم بتوجيه السائل الى المنتدى لغرض التفاعل في القسم
واعلم اخي عبدالله انه ليس في بالي ولا عقلي شي قيد الشعر عن اي شخص لا من بعيد ولا من قريب وما دار بيننا حول الانسحاب شي لا يوجد في القلب وانما كان نقاش ونصيحة
وانا اعتبرك اخي وجميع الاعضاء كذلك  وليس هنالك ما يجبرني على الدخول للقسم فقط الضمير والامانه الذي كلفني بها الاخوة الاداري للمنتدى
واذا تكرر  كلامك بهذا الاسلوب فان  سوف استقبلهُ بشكل شخصي  وانا لا اهتم لاي شي شخصي ليس له داعي
وهذا المنتدى ليس للنقاش الشخصي
وخلال مشاركتك السابقتين اعتقد وعذرت اسلوبك في الطرح انهُ توجد مشكله قد واجهتك والاخ يحمل اخاه على قدر استطاعتهُ
واذا كنت تراني ليس اهل للاشراف قل يااخي
سوف احترم رايك من جهتي  وان كان هذا يعني اني فاشل في الاشراف وانسحب بكل قوة من المنتدى بدون الطلب من الادارة كما فعلت سابقا ولم يرد علي احد لغاية اليوم
مع السلامة ولايوجد  موضوع غير منتهي في المنتدى

ويزعجني جدا هذا الكلام منك وكلامي ايضا
 

#56

عزيزي فراس....

 

أولاً: كلنا ندخل هنا من مبدأ الخير ومبدأ الاستفادة من النقاشات سواء بأخذ معلومة جديدة أو باعطاء معلومة....

 

ثانياً: أعلم مقدار الجهد الذي تبذله لابقاء المنتدى نشيطاً ولا أنكره عليك، على العكس أحُثك على الاستمرار وجميع مجهوداتك محط تقدير

 

ثالثاً: اتمنى ان لا تُشخصن الأمور ( لاني لم أشخصنها ولم أتلفظ بأي شيء مُسيء أو أشير لك بشكل شخصي )، وبالنسبة للفيس بوك أنت تعلم بأني أعلم بمجموعتك وبأني مشارك بها فلا مشكلة لي بهذا.

 

رابعاً: أستغرب وأستعجب لذكر الانسحاب من الاشراف !!! أو موضوع نجاحك أو فشلك فيه !!! فهذا ليس من اختصاصي.

 

خامسأ وأخيراً ..... بصراحة لا أرى بكلامي ما يزعج...ولا أرى فيه سوى المصلحة العامة.. وان كان هناك من يرى غير ذلك فليتقدم ويقنعني مشكوراً بأني على خطأ

 

وحتى لا تظن أن الكلام موجه لك، أقول بأن الكلام موجه لمن حوّل أو يحوّل أي مشاركة هنا للخاص...

 

وأعود....وأقول الله من وراء القصد

 

ودمتم بود

أستغفر الله العظيم و أتوب إليه

#57

عزيزي عبدالله وضحت فكرتك او الغاية منها وحسناً قلت ودمت ودام الجميع بخير 

انتهى النقاش على هذة النقطة في هذا الموضوع 

واتمنى عدم ذكر اي مشاركة لا تخص الموضوع 

تحياتي للجميع

#58
Shadowz كتب:

السلام عليكم ورحمة الله وبركاته،،

كثرت الاسئلة حول هذا الموضوع سابقا، وبصراحة لم يكن لي دراية بها لعدم حاجتي لها ولاعتمادي على قواعد بيانات الفوكس برو بشكل اساسي، والمهم جاءت الحاجة والله لا يحشركم هيك حشرة

علما بانه علاقتي بالثلاثة قواعد المذكورة اعلاه علاقة وثيقة لا تتجاوز المعرفة بالاسم والحمد لله

المهم :

للتواصل مع قواعد البيانات الاخرى لا بد من وجود وصلة خير وهي هنا نوعان ODBC و OLEDB

ويمكن تحميل النوعان من موقع Microsoft

ولان للفوكس برو دائما اكثر من طريقة لانجاز وحل الواجبات سأشرح هنا طريقة طريقة التعامل عبر Connection String

تسلسل الاحداث يقع ضمن البنود التالية:

انشاء اتصال مع قواعد البيانات ( بواسطة ODBC او OLEDB Provider )

سحب ما تريد من بيانات لجهازك

معالجة هذه البيانات بعمليات التعديل او الحذف او الاضافة او لمجرد استخراج تقرير....

حفظ البيانات بعد التأكد من عدم وجود مشاكل

اغلاق الاتصال

انشاء اتصال ( Sqlstringconnect )

lcConnection = [Driver={Microsoft Access Driver (*.mdb)};DBQ=MyData.mdb;UID=Admin;PWD=pas]
oConn=Sqlstringconnect(lcConnection)
if oConn<0
Not Connected
Else
oConn= Connection No
endif
سحب البيانات للفوكس برو ( SQLExec )

lnCmd=SQLExec(oConn, "SELECT * FROM Emp ", "LocalCursor")
if lnCmd < 0
Error
Else
Cursor is ready 
endif

تجهيز الــ Cursor لارسال التعديلات للجدول الرئيسي بواسطة الامر CursorSetProp

CursorSetProp( "TABLES", "MyData.Emp", "LocalCursor" ) تحديد الجدول
CursorSetProp( "KEYFIELDLIST", "EmpNO", "LocalCursor" ) تحديد المفتاح الرئيسي
CursorSetProp( "UPDATABLEFIELDLIST", "EmpName, EmpTel", "LocalCursor") قائمة المتغيرات
CursorSetProp( "UPDATENAMELIST", "EmpNO MyData.Emp.EmpNO, EmpName  MyData.Emp.EmpName, EmpTel MyData.Emp.EmpTel", "LocalCursor" ) قائمة الحقول التي سيتم التخزين فيها 
CursorSetProp( "WHERETYPE", 1, "LocalCursor" ) لاختيار نوع الحفظ
CursorSetProp( "SENDUPDATES", .T., "LocalCursor" ) لقبول ارسال البيانات للجداول
CursorSetProp( "Buffering", 5, "LocalCursor" ) لتحديد الية التعامل مع السجلات وطريقةحجزها

الان الـــ Cursor جاهز ويتم التعامل معه كأي جدول فوكس برو عادي

وبعد الانتهاء من العمل يتم حفظ التعديلات باستخدام الامر TableUpdate

Local llOk
llOk = Tableupdate( .T., .T., 'LocalCursor' )
If llOk
Done…
Else
Error while saving….
Tablerevert( .T., ' LocalCursor' )
Endif
واخيرا الغاء الاتصال باستخدام الامر SQlDisconnect

SqlDisconnect(oConn)
والمثال المرفق يوضح العمليات السابقة عن طريق الربط مع قاعدة بيانات Access

attachicon.gifRemot.rar

مع التحية

ويتبع ان شاء الله

 

عذرا احتاج الى توضيح اكثروبالصور لو امكن لاني جديد على فوكس برو ولدي بيانات على اكسل اريد تحويلها الى فوكس برو

#59

thanks 

مواضيع مشابهة