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

رجاء منكم

مغلق
بدأه kimo في 15 فبراير 2002 · 4 رد · 620 مشاهدة · في لغة Ms Visual Basic 6 وما قبلها من إصدارات
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

أريد مثال مكتوب (كود) على جملةINSERT INTO

يكون فيها تحديد لحقول معينه مثل الاتى

'INSERT INTO table_name

'(col1, col2...)

'SELECT col1, col2...

'From tablename

'Where search_condition

ممكن:o

#2

أخى كيمو انصحك بالبحث فى الهلب قبل ان تسأل

وبالنسبه لإجابة سؤالك هذا مثال من الهلب لم يستغرق البحث عنه أكثر من 30 ثانيه

INSERT INTO Statement Example

This example selects all records in a hypothetical New 
Customers table and adds them to the Customers table. When 
individual columns are not designated, the SELECT table 
column names must match exactly those in the INSERT INTO 
table.

Sub InsertIntoX1()

   Dim dbs As Database

   ' Modify this line to include the path to Northwind
   ' on your computer.
   Set dbs = OpenDatabase("Northwind.mdb")

   ' Select all records in the New Customers table 
   ' and add them to the Customers table.
   dbs.Execute " INSERT INTO Customers " _
      & "SELECT * " _
      & "FROM [New Customers];"

   dbs.Close

End Sub

This example creates a new record in the Employees table.


Sub InsertIntoX2()

   Dim dbs As Database

   ' Modify this line to include the path to Northwind
   ' on your computer.
   Set dbs = OpenDatabase("Northwind.mdb")

   ' Create a new record in the Employees table. The 
   ' first name is Harry, the last name is Washington, 
   ' and the job title is Trainee.
   dbs.Execute " INSERT INTO Employees " _
      & "(FirstName,LastName, Title) VALUES " _
      & "('Harry', 'Washington', 'Trainee');"

   dbs.Close

End Sub
#3

استاذي الكريم / رمضان

هل تقصد بالهلب مكتبة ال MSDN ام غيرها ؟؟؟

ارجو منك التوضيح اكثر

©

#4

إنه يقصد مكتبة msdn

أخوك

jjkk

#5

:mad: :mad: :mad: انا صار اسمي دلور :mad: :mad: :mad:

هذا الموضوع مغلق.

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