Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access violation II

Status
Not open for further replies.

joemaur

Programmer
Feb 24, 2002
17
0
0
BR
People, I've passed a wrong information. the problem occurs when I call the ExecProc method and there's no error if I put ParamByName('@texto').AsString := tslDocumento.GetText. But, sure, the data isn't registered in the right way.

The error message is:
Access violation at address 4D42A183 in module
'SQLMSS32.DLL'. Read of address 00C5C000.

Here's the code:
with spInsDoc do
begin
ParamByName('@cliente').AsString := info_doc.Cliente;
ParamByName('@usuario').AsString := info_doc.Usuario;
ParamByName('@senha').AsString := info_doc.Senha;
ParamByName('@Documento').AsString := info_doc.Documento;
ParamByName('@servico').AsString := info_doc.servico;
ParamByName('@titulo').AsString := info_doc.Titulo;
ParamByName('@formatacao').AsString := info_doc.formatacao;
ParamByName('@texto').AsMemo := tslDocumento.GetText;
ExecProc; //here is where the error occurs

Could anyone help me?
 
Hello Joe,

I am not a real expert in Delphi and i don't know if it applies to your problem, but, when I have this kind of error, it's because i try to access an non-instanciated object. That's when i try to read or write data.
Maybe th execproc tries to access an object not allocated in memory.

Hope that helps

David
 
..maybe some of the values you're trying to assign don't contain anything or are nil.

Before calling the execproc, maybe interrogate everything to see if their values look right.

lou
 
It may also just be a bug in the dll (SQLMSS32.DLL). Have a look on the microsoft site to see if there's any known bugs.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top