delphi 没初始化 5
procedureTForm2.Button1Click(Sender:TObject);vartestStream:TMemoryStream;begintestStr...
procedure TForm2.Button1Click(Sender: TObject);
var
testStream:TMemoryStream;
begin
testStream:=TMemoryStream.Create;
try
Image1.Picture.Graphic.SaveToStream(testStream);
a1.Close;
a1.SQL.Clear;
a1.SQL.Text:='insert into students values
(:a,:b,:c,:d,:e,:f,:g,:h,:i)';
a1.Parameters[0].Value:=edit1.Text;
a1.Parameters[1].Value:=edit2.Text;
a1.Parameters[2].Value:=combobox1.Text;
a1.Parameters[3].Value:=edit3.Text;
a1.Parameters[4].Value:=combobox2.Text;
a1.Parameters[5].Value:=edit4.Text;
a1.Parameters[6].Value:=edit5.Text;
a1.Parameters[7].Value:=memo1.Text;
a1.Parameters[8].LoadFromStream(testStream,ftBlob);
finally
testStream.Free;
a1.ExecSQL;
showmessage('注册成功');
form2.Close;
form1.Show;
出错,提示没初始化,哪个高手帮看下 展开
var
testStream:TMemoryStream;
begin
testStream:=TMemoryStream.Create;
try
Image1.Picture.Graphic.SaveToStream(testStream);
a1.Close;
a1.SQL.Clear;
a1.SQL.Text:='insert into students values
(:a,:b,:c,:d,:e,:f,:g,:h,:i)';
a1.Parameters[0].Value:=edit1.Text;
a1.Parameters[1].Value:=edit2.Text;
a1.Parameters[2].Value:=combobox1.Text;
a1.Parameters[3].Value:=edit3.Text;
a1.Parameters[4].Value:=combobox2.Text;
a1.Parameters[5].Value:=edit4.Text;
a1.Parameters[6].Value:=edit5.Text;
a1.Parameters[7].Value:=memo1.Text;
a1.Parameters[8].LoadFromStream(testStream,ftBlob);
finally
testStream.Free;
a1.ExecSQL;
showmessage('注册成功');
form2.Close;
form1.Show;
出错,提示没初始化,哪个高手帮看下 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询