Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4079936
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T17:51:54+00:00 2026-05-20T17:51:54+00:00

I am new to IntraWeb. I want to make a simple application which connects

  • 0

I am new to IntraWeb. I want to make a simple application which connects and displays an access database using ADO controls. When I execute the server it gives me

“CoInitialize has not been called”

error. I searched the internet and found many text telling that

Change ComInitialization property of
IWServerController to ciMultiThreaded.

I tried to do this in IWAppFormCreate event. Then I got compilation error:

“Undeclared Identifier ciMultiThreaded”

I put the line IWServerController.ComInitialization:=ciMultiThreaded; then the runtime error comes up:

“Access violation at address . . .”

Since I don’t know what I am doing I cant find the problem. Please help me.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T17:51:55+00:00Added an answer on May 20, 2026 at 5:51 pm

    The CoInitialize error on IntraWeb using ADO gives you the correct answer.

    As I catch from comments on @David answer to this question, there are two things left:

    1. Where is declared the TComInitialization type, which in turns defines the ciMultiThreaded identifier.
      Answer to this is: IWServerControllerBase unit, part of Intraweb.
    2. Where to change the ComInitialization property of the IWServerController object to get this working.
      • The first thing you have to know is the actual class used to construct the IWServerController object is part of your IntraWeb project.
      • Next, trying to set this property on a page OnCreate event looks too late (it must be created in the thread you want to initialize COM), my guess is that altering this property at this time is forbidden and will raise an exception, or will be ignored completely.
      • Using the Delphi XE VCL for the Web Application wizard I got a unit named ServerController, with the class TIWServerController. After failing to override the constructor, I override the AfterConstruction method to initialize such property, like this

    Example:

      TIWServerController = class(TIWServerControllerBase)
        procedure IWServerControllerBaseNewSession(ASession: TIWApplication;
          var VMainForm: TIWBaseForm);
    
      private
    
      protected
        //constructor Create; override;  //failed!!
      public
        procedure AfterConstruction; override;
      end;
    
      //..
    
    procedure TIWServerController.AfterConstruction;
    begin
      inherited;
      ComInitialization := ciMultiThreaded;  //succeded
    end;
    

    I then added a button, a label and properly configured ADOConnection (against SQL Server if that matters) and:

    procedure TIWForm2.IWButton1Click(Sender: TObject);
    begin
      try
        ADOConnection1.Connected := True;
        IWLabel1.Caption := 'Connected';
      except
        on E:Exception do
          IWLabel1.Caption := E.ClassName + ' ' + E.Message;
      end;
    end;
    

    Hitting the button, produces this:

    TADOConnection Succesfully connected

    Hope this is enough to you.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Steps: I created a new IntraWeb application using the IntraWeb Application Wizard . I
new on ruby and using windows xp and rails 3, i want to send
new to c#. I'm trying to make a simple system where I can search
New to Regex. I want to validate to this format: Any character allowed, except
New developer here,Im using the Custom Image Picker by ray wenderlich. But what I
New to jquery question... Using jQuery, depending on the radio button clicked I would
New to NodeJS. Yes I know I could use a framework, but I want
New to SharePoint. I'm trying to upload a document to SharePoint using it's CopyIntoItems
New to ASP.NET MVC 3. This seems like it should be a really simple
New Android programmer here. I have a Service which performs socket management and async

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.