开发者

Delphi : Error 'Access violation at address 00536983 in module '

My code :

if dataset.IsEmpty then 
  DoSomething(x);

When 'if dataset.IsEmpty' runs l get the following error: 'Access violation at address xxxxxxxxx in module abc'

Why am I getting this error? I don't 开发者_JAVA技巧know the explanation of 'access violation' - can someone please explain this to me and help me avoid this error.

Thank you.


See here for an explanation on AV exceptions and how to debug them. The solution could be as simple as checking if dataset is assigned, as RRUZ suggests, but we would never know with this little information. Showing us the exact error message will help to rule out some cases.


it can be because the dataset is inactive/closed when you try to access it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜