with datamodule2 do begin adoconnection1.Close; adoconnection1.Open; adoquery1.Close; adoquery1.SQL.Clear; adoquery1.SQL.Add('select hz from pdzd '); adoquery1.SQL.Add(' dm<>''999'' and dmlb=''条件'''); adoquery1.Prepared; adoquery1.Open; adoquery1.First; while not adoquery1.Eof do begin combobox1.Items.Add(adoquery1.FieldValues['hz']) end; 和上面的程序共享一个连接,出现一个错误: --------------------------- Debugger Exception Notification --------------------------- Project Project1.exe raised exception class EAccessViolation with message 'Access violation at address 0048D230 in module 'Project1.exe'. Read of address 00000058'. Process stopped. Use Step or Run to continue. --------------------------- OK Help ---------------------------
2.不需要任何要求就可以共享adoconnection
3.点击你发的贴子的右边‘管理’,在弹出窗口中填入你的password,以及每个人
的分,点击‘给分’。
加了冒号delphi就会认为是param
begin
adoconnection1.Close;
adoconnection1.Open;
adoquery1.Close;
adoquery1.SQL.Clear;
adoquery1.SQL.Add('select hz from pdzd ');
adoquery1.SQL.Add(' dm<>''999'' and dmlb=''条件''');
adoquery1.Prepared;
adoquery1.Open;
adoquery1.First;
while not adoquery1.Eof do
begin
combobox1.Items.Add(adoquery1.FieldValues['hz'])
end;
和上面的程序共享一个连接,出现一个错误:
---------------------------
Debugger Exception Notification
---------------------------
Project Project1.exe raised exception class EAccessViolation with message 'Access violation at address 0048D230 in module 'Project1.exe'. Read of address 00000058'. Process stopped. Use Step or Run to continue.
---------------------------
OK Help
---------------------------
是string类型,但是sql查询的参数