ORA-01465: invalid hex number Cause: In an UPDATE statement following a SELECT FOR UPDATE, part of the ROWID contains invalid characters. ROWID must be expressed in the proper and expected format for ROWID and within quotes. Action: Enter the ROWID just as it was returned in the SELECT FOR UPDATE.研究一下!---The end;
估计对你有所帮助!!! ---------------------------------------------------------------- Example 1: Inserting a Word document into a BLOB Column using PL/SQL The following code (steps 2-5) inserts MyResume.doc in the resume column of sam_emp table.Create a directory object in Oracle. Here is how to create a directory object called MY_FILES which represents C:\MY_DATA directory. You must have CREATE DIRECTORY privilege in Oracle.create or replace directory MY_FILES as 'C:\MY_DATA';Insert a row with empty BLOB in your table and return the locator. Point to the Word file to be loaded from the directory created in Step 1, using the BFILE data type. Open the file and use the locator from step 2 to insert the file. Close the file and commit the transaction. declare f_lob bfile; b_lob blob;begin insert into sam_emp(empno,ename,resume) values ( 9001, 'Samir',empty_blob() ) return documents into b_lob; f_lob := bfilename( 'MY_FILES', 'MyResume.doc' ); dbms_lob.fileopen(f_lob, dbms_lob.file_readonly); dbms_lob.loadfromfile ( b_lob, f_lob, dbms_lob.getlength(f_lob) ); dbms_lob.fileclose(f_lob); commit;end; /
請問怎麼升级ado组件 ??? (我在用delphi 5+oracle 8.17) 謝謝, netlib(河外孤星) ,您貼出來吧!!
我的有一部分是用olecontainer的,这样写的
var
mslr,msda:tmemorystream;
begin
panel4.Enabled:=true;
n15.Enabled:=true;
mslr:=tmemorystream.Create;
msda:=tmemorystream.Create;
olecontainer1.SaveToStream(mslr);
olecontainer2.SaveToStream(msda);
clientdataset2.Edit;
clientdataset2lr.LoadFromStream(mslr);
clientdataset2lrda.LoadFromStream(msda);
clientdataset2.fieldbyname('tmm').asstring:=TabControl1.tabs[tabcontrol1.tabindex]+inttostr(clientdataset2.fieldbyname('tid').asinteger);
clientdataset2.post;
clientdataset2.applyupdates(-1);
mslr.Free;
msda.Free;
end;
用文件的,我找到了在给你看,(现在忘的差不多了)^_^
server端; ADOConnection+ ADOTable+ DataSetProvider
client端; SocketConnection+ ClientDataSet2).升级ado组件了嗎 ???
读文件是这样的,我想这个你应该都知道,
var
mslr,msda:tfilestream;
begin
panel4.Enabled:=true;
n15.Enabled:=true;
mslr:=tfilestream.Create('\temp1.doc',fmopenread);
msda:=tfilestream.Create('\temp2.doc',fmopenread);
clientdataset2.Edit;
clientdataset2lr.LoadFromStream(mslr);
clientdataset2lrda.LoadFromStream(msda);
clientdataset2.fieldbyname('tmm').asstring:=TabControl1.tabs[tabcontrol1.tabindex]+inttostr(clientdataset2.fieldbyname('tid').asinteger);
clientdataset2.post;
clientdataset2.applyupdates(-1);
mslr.Free;
msda.Free;
end;
可能是你的数据库连接那个环节不匹配造成的,所以你在检查一下你的数据库设置
client端; SocketConnection+ ClientDataSet
ORA-01465: invalid hex number
Cause: In an UPDATE statement following a SELECT FOR UPDATE, part of the ROWID contains invalid characters. ROWID must be expressed in the proper and expected format for ROWID and within quotes. Action: Enter the ROWID just as it was returned in the SELECT FOR UPDATE.研究一下!---The end;
----------------------------------------------------------------
Example 1: Inserting a Word document into a BLOB Column using PL/SQL
The following code (steps 2-5) inserts MyResume.doc in the resume column of sam_emp table.Create a directory object in Oracle. Here is how to create a directory object called MY_FILES which represents C:\MY_DATA directory. You must have CREATE DIRECTORY privilege in Oracle.create or replace directory MY_FILES as 'C:\MY_DATA';Insert a row with empty BLOB in your table and return the locator.
Point to the Word file to be loaded from the directory created in Step 1, using the BFILE data type.
Open the file and use the locator from step 2 to insert the file.
Close the file and commit the transaction. declare
f_lob bfile;
b_lob blob;begin insert into sam_emp(empno,ename,resume)
values ( 9001, 'Samir',empty_blob() )
return documents into b_lob; f_lob := bfilename( 'MY_FILES', 'MyResume.doc' );
dbms_lob.fileopen(f_lob, dbms_lob.file_readonly);
dbms_lob.loadfromfile
( b_lob, f_lob, dbms_lob.getlength(f_lob) );
dbms_lob.fileclose(f_lob); commit;end;
/