Jump to content

Access Violation on TADOQuery Create


SMARAM

Recommended Posts

Hi, I'm having problem with access violation that starts with on a session then all others sessions give acces violation too.

I configure logMadExcept on my project because I could not configure EurekaLog on C++ Builder.

 

Could someone help me with any advice.

 

This is the error and log:

 

Access violation at address 02778904 in module 'SMARamWeb.dll'. Read of address 000104F4

 

PS: To make things worst, it does not happen all the time.

02778904 SMARamWeb.dll System.Classes       12744 TComponent.Notification
02875d3e SMARamWeb.dll Uniguiserver               TUniGUIServerModule.HandleException
028bca81 SMARamWeb.dll Uniguiapplication          TUniGUISession.HandleException
02894546 SMARamWeb.dll Uniguiform                 TUniBaseForm.DoCreate
770b068a ntdll.dll                                KiUserExceptionDispatcher
0277878d SMARamWeb.dll System.Classes       12668 TComponent.RemoveComponent
02778551 SMARamWeb.dll System.Classes       12559 TComponent.Destroy
02a33c7b SMARamWeb.dll Data.DB              11076 TDataSet.Destroy
02aaee91 SMARamWeb.dll Data.Win.ADODB        3517 TCustomADODataSet.Destroy
02ab7add SMARamWeb.dll Data.Win.ADODB        6353 TADOQuery.Destroy
770b068a ntdll.dll                                KiUserExceptionDispatcher
02778768 SMARamWeb.dll System.Classes       12662 TComponent.InsertComponent
02778503 SMARamWeb.dll System.Classes       12551 TComponent.Create
02a33aab SMARamWeb.dll Data.DB              11043 TDataSet.Create
02aaed13 SMARamWeb.dll Data.Win.ADODB        3488 TCustomADODataSet.Create
02ab7a63 SMARamWeb.dll Data.Win.ADODB        6345 TADOQuery.Create
015ed027 SMARamWeb.dll FuncoesUN.cpp         3582 RegistrarLogAccesso
01e7a0cf SMARamWeb.dll ME130500.cpp          1084 TFormItemRME.UniFormCreate
028944f5 SMARamWeb.dll Uniguiform                 TUniBaseForm.DoCreate
02894135 SMARamWeb.dll Uniguiform                 TUniBaseForm.Create
02897002 SMARamWeb.dll Uniguiform                 TUniForm.Create
01e6a863 SMARamWeb.dll ME130500.cpp            38 TFormItemRME.Create
01f43273 SMARamWeb.dll MEP30500.cpp           799 TFormRME.DBGridMaterialDblClick
01f43c30 SMARamWeb.dll MEP30500.cpp           851 TFormRME.BtnIncluiRMEClick
028a18b7 SMARamWeb.dll Uniguiclasses              TUniControl.DoClick
02850694 SMARamWeb.dll Unibutton                  TUniCustomButton.DoClick
0284ff10 SMARamWeb.dll Unibutton                  TUniCustomButton.ClickHandler
02886f9b SMARamWeb.dll Uniguijsinterface          TUniJSHelper.HandleEvent
028a2f59 SMARamWeb.dll Uniguiclasses              TUniControl.HandleEventIntercept
0287159d SMARamWeb.dll Uniguisessionmanager       TUniSessionWorkerThread.ProcessEvent
028b536b SMARamWeb.dll Uniguiapplication          TUniGUISession.ProcessEventQueue
028b54ac SMARamWeb.dll Uniguiapplication          TUniGUISession.ProcessEvents
0288a21f SMARamWeb.dll Uniguijsform               TUniBaseJSForm.ShowModal
028955fb SMARamWeb.dll Uniguiform                 TUniBaseForm.ShowModal
01ead093 SMARamWeb.dll MenuInicial.cpp       3175 TMenuInicialForm.htmlMenuAjaxEvent
763e5448 OLEAUT32.dll                             SysAllocStringLen
770b80e1 ntdll.dll                                bsearch
763e6756 OLEAUT32.dll                             VariantChangeType
763e5448 OLEAUT32.dll                             SysAllocStringLen
0268a456 SMARamWeb.dll Vcl.Controls         11737 TWinControl.SetBounds
027d733a SMARamWeb.dll System               14206 @ClassDestroy
02ab7afb SMARamWeb.dll Data.Win.ADODB        6355 TADOQuery.Destroy
015ee0e2 SMARamWeb.dll FuncoesUN.cpp         3642 RegistrarLogAccesso
026918c3 SMARamWeb.dll Vcl.Controls         16303 TMargins.SetControlBounds
02685501 SMARamWeb.dll Vcl.Controls          8495 TWinControl.ArrangeControl
026857fe SMARamWeb.dll Vcl.Controls          8541 DoPosition
027d733a SMARamWeb.dll System               14206 @ClassDestroy
027d6cb0 SMARamWeb.dll System               13025 TObject.Free
026918dc SMARamWeb.dll Vcl.Controls         16305 TMargins.SetControlBounds
02685501 SMARamWeb.dll Vcl.Controls          8495 TWinControl.ArrangeControl
02685522 SMARamWeb.dll Vcl.Controls          8497 TWinControl.ArrangeControl
026857fe SMARamWeb.dll Vcl.Controls          8541 DoPosition
0276b07d SMARamWeb.dll System.Classes        5588 TStrings.IndexOf
0276c585 SMARamWeb.dll System.Classes        6272 TStringList.IndexOf
02886df6 SMARamWeb.dll Uniguijsinterface          TUniJSHelper.FindHandlers
028a2d6d SMARamWeb.dll Uniguiclasses              TUniControl.DOHandleEvent
028a2f78 SMARamWeb.dll Uniguiclasses              TUniControl.HandleEventIntercept
0287159d SMARamWeb.dll Uniguisessionmanager       TUniSessionWorkerThread.ProcessEvent
0287178b SMARamWeb.dll Uniguisessionmanager       TUniSessionWorkerThread.Execute
027774a6 SMARamWeb.dll System.Classes       11769 ThreadProc
027d8838 SMARamWeb.dll System               18806 ThreadWrapper
76007c02 KERNEL32.DLL                             BaseThreadInitThunk

The line where it gives the error.

post-6268-0-70382000-1535146613_thumb.png

Link to comment
Share on other sites

You're creating a global instance of adoquery.

 

All objects in unigui must belong to a session and its forms.

 

Please do not try creating objects out of a session's context.

 

Sent from my SM-N950F using Tapatalk

 

Hi Farshad. Thanks for your reply.

How do you suggest to create dinamically query?

 

Maybe this way?

TADOQuery *query = new TADOQuery(UniMainModule());

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...