H
honey_001
Unregistered / Unconfirmed
GUEST, unregistred user!
我的数据库是sql server2000,我的表建立为
create table myfrieds
(name varchar(15) notnull,
telephone varchar(12),
address varchar(30),
zipvarchar(8),
picture varchar(15),
image image);
其中,picture字段用于保存图像的名称(包括路径),image(Graphic字符)则用于存储图像,其数据类型为“image”。
图像保存的处理程序如下(我在其他地方见到的):
procedureTform1.Savebtnclick(sender:TObject);
var
graphic1:TGraphic;
begin
graphic1:=TGraphic.Create;
graphic1.loadfromfile(opendialog1.filename);
table1.insert;
table1.fieldbyname('name').asstring:=edit1.text;
table1.fieldbyname('telephon').asstring:=edit2.text;
table1.fieldbyname('address').asfloat:=edit3.text;
table1.fieldbyname('zip').asfloat:=edit4.text;
table1.fields[4].assign(graphic1);
table1.post;
graphic1.free;
end;
可却运行不了,提示
[Warning] Unit3.pas(61): Constructing instance of 'TGraphic' containing abstract methods.
abstract error!!!!!
请高手帮忙!!!!!!!!
为何table1.fields[4].assign(graphic1)而不是fields[5],image字段放什么数据呢?
create table myfrieds
(name varchar(15) notnull,
telephone varchar(12),
address varchar(30),
zipvarchar(8),
picture varchar(15),
image image);
其中,picture字段用于保存图像的名称(包括路径),image(Graphic字符)则用于存储图像,其数据类型为“image”。
图像保存的处理程序如下(我在其他地方见到的):
procedureTform1.Savebtnclick(sender:TObject);
var
graphic1:TGraphic;
begin
graphic1:=TGraphic.Create;
graphic1.loadfromfile(opendialog1.filename);
table1.insert;
table1.fieldbyname('name').asstring:=edit1.text;
table1.fieldbyname('telephon').asstring:=edit2.text;
table1.fieldbyname('address').asfloat:=edit3.text;
table1.fieldbyname('zip').asfloat:=edit4.text;
table1.fields[4].assign(graphic1);
table1.post;
graphic1.free;
end;
可却运行不了,提示
[Warning] Unit3.pas(61): Constructing instance of 'TGraphic' containing abstract methods.
abstract error!!!!!
请高手帮忙!!!!!!!!
为何table1.fields[4].assign(graphic1)而不是fields[5],image字段放什么数据呢?