الانتقال إلى المحتوى

مساعدة يا شبباب


SQL_STAR

Recommended Posts

بسم الله الرحمن الرحيم
شباب انا اشتغل في قطاع التخطيط العمراني ادارة معلومات التخطيط يقومون بادخال بينات الشوارع والخدمات مع صور المخططات التابعه لها بواسطة برنامج ال arcgis-map كل جهاز محمل عليه هذا البرنامج وكل مدخل يخزن البينات في نفس الجهاز هم طلبو مني الان تجميع كل هذة البينانات الموجوده على الاجهزه وتخزينها في السرفر وادارتها بواسطة dbmsيا شباب انا ما في عندي فكره كيف بتم العمليه ارجووووووووووووووو المساعدة بليييييييييييييييييز
وشكرا

رابط هذا التعليق
شارك

Import BLOB Contents :-



The following article presents a simple methods for importing a file into a BLOB datatype. First a directory object is created to point to the relevant filesystem directory:

CREATE OR REPLACE DIRECTORY images AS 'C:\';



Next we create a table to hold the BLOB:

CREATE TABLE tab1 (col1 BLOB);



Finally we import the file into a BLOB datatype and insert it into the table:

DECLARE
     l_bfile  BFILE;
     l_blob   BLOB;
   BEGIN INSERT INTO tab1 (col1)
     VALUES (empty_blob())
     RETURN col1 INTO l_blob; l_bfile := BFILENAME('IMAGES', 'MyImage.gif');
     DBMS_LOB.fileopen(l_bfile, Dbms_Lob.File_Readonly);
     DBMS_LOB.loadfromfile(l_blob, l_bfile, DBMS_LOB.getlength(l_bfile));
     DBMS_LOB.fileclose(l_bfile);

     COMMIT;
   END;
   /



Export BLOB Contents :-

First we create a directory object pointing to the destination directory:

CREATE OR REPLACE DIRECTORY BLOBS AS '/tmp/';

Next we open the BLOB, read chunks into a buffer and write them to a file:

DECLARE
 l_file      UTL_FILE.FILE_TYPE;
 l_buffer    RAW(32767);
 l_amount    BINARY_INTEGER := 32767;
 l_pos       INTEGER := 1;
 l_blob      BLOB;
 l_blob_len  INTEGER;
BEGIN -- Get LOB locator
 SELECT col1
 INTO l_blob FROM   tab1
 WHERE rownum = 1;

 l_blob_len := DBMS_LOB.getlength(l_blob);
 
 -- Open the destination file.
 l_file := UTL_FILE.fopen('BLOBS','MyImage.gif','w', 32767);

 -- Read chunks of the BLOB and write them to the file
 -- until complete.
 WHILE l_pos < l_blob_len LOOP
   DBMS_LOB.read(l_blob, l_amount, l_pos, l_buffer);
   UTL_FILE.put_raw(l_file, l_buffer, TRUE);
   l_pos := l_pos + l_amount;
 END LOOP;
 
 -- Close the file.
 UTL_FILE.fclose(l_file);
 
EXCEPTION
 WHEN OTHERS THEN
   -- Close the file if something goes wrong.
   IF UTL_FILE.is_open(l_file) THEN
     UTL_FILE.fclose(l_file);
   END IF;
   RAISE;
END;



Finally, you can check the file is produced correctly.
and to add pictures through form

first scan the pic u want to save in database
then create form on the base of that table

two text items to give file address on runtime


1. for file name
2. for file type

create button add pic
coding in when button pressed

declare
	v_file_name varchar2(100); /*  variable of file name */
	v_file_type varchar2(20);  /*  variable of tile type */
begin v_file_name := :a.file_name ; /* :block_name.item_name of file name */
	v_file_type := :a.file_type ;
read_image_file(v_file_name,v_file_type,'a.pic');

end;




منقول


رابط هذا التعليق
شارك

شكرا يا اخي على ردك الجمل لكن ممكن توضح اكثر الموضوغ تجمع ملفات dbf الى قاغدة بينات اوراكل وتشغيلها كيف الطريقه في نقلها وتشغيلها


وجزاكم الله خير شباب

رابط هذا التعليق
شارك

انضم إلى المناقشة

يمكنك المشاركة الآن والتسجيل لاحقاً. إذا كان لديك حساب, سجل دخولك الآن لتقوم بالمشاركة من خلال حسابك.

زائر
أضف رد على هذا الموضوع...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   تمت استعادة المحتوى السابق الخاص بك.   مسح المحرر

×   You cannot paste images directly. Upload or insert images from URL.

جاري التحميل
×
×
  • أضف...

برجاء الإنتباه

بإستخدامك للموقع فأنت تتعهد بالموافقة على هذه البنود: سياسة الخصوصية