Announcement

Collapse
No announcement yet.

Is PBForms.inc not compatible with ADO?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Is PBForms.inc not compatible with ADO?

    Well, here I have a problem with PBFormsInitComCtls (PBForms.inc)!
    Code:
    PBFormsInitComCtls (%ICC_WIN95_CLASSES OR %ICC_DATE_CLASSES OR %ICC_INTERNET_CLASSES)
    
    ..syntax error
    Compile failed at...
    PBForms.inc is not compatible with MSADO27.INC !??

    MSADO27.INC to be created with PowerBasic COM-Browser from ActiveX Data Objects 2.7 Type Library (msado27.tlb).
    But I need this library.

    How now solve a problem?

    Thanks
    Yours sincerely

    #2
    Try making the bitmask a variable, assigning the OR'd values to it and calling PbFormsInitComCtls with that variable as the argument.

    FWIW, if you had bothered to look up "syntax error" in the help file you would know that a "syntax error" has precisely nothing (that would be zero, nada, zip, squat) to do with "compatibility."

    Besides, the code you bothered to show does not include "#INCLUDE MSAD027.INC" so how could that file be the problem?
    Michael Mattias
    Tal Systems (retired)
    Port Washington WI USA
    [email protected]
    http://www.talsystems.com

    Comment


      #3
      It's too difficult to understand...
      (I use the online-translator, i'm not very good in English)

      You can try yourself:
      - make simple code with PBForms;
      - MSADO27.INC provide (WinXP, COM-Browser);
      - and try to connect this through #INCLUDE.

      There is definitely a problem with PBForm.inc

      P.S. It's a pity that I vasted $99
      Last edited by Alexander Holzer; 5 Mar 2008, 02:48 PM.
      Yours sincerely

      Comment


        #4
        Try this: TEST
        (msado27.inc, pbforms.inc + simple BAS file)
        Yours sincerely

        Comment


          #5
          Wow.. can't see the problem.

          Code:
          PowerBASIC for Windows
          PB/Win  Version 8.04 
          Copyright (c) 1996-2007 PowerBasic Inc.
          Venice, Florida USA
          All Rights Reserved
          
          Error 477 in C:\DOCUME~1\EDWINK~1\BUREAU~1\TEST_M~1\ado_test.bas(63:005):  Syntax error
          Line 63:     PBFormsInitComCtls (%ICC_WIN95_CLASSES OR %ICC_DATE_CLASSES OR %ICC_INTERNET_CLASSES)
          Macro Expansion(1):  HLIB0079 = LOADLIBRARY("COMCTL32.DLL")
          hellobasic

          Comment


            #6
            I will contact the support tomorrow.
            Yours sincerely

            Comment


              #7
              The error has nothing to do with PBForms.inc. Don't know which version of the COM Browser you have got, but your MSADO27.INC needs a couple of macros to work.

              Add the following macros to the beginning of MSADO27.INC:

              Code:
              MACRO ADODBPositionEnum_Param = LONG
              MACRO ADODBADO_LONGPTR = LONG
              Forum: http://www.jose.it-berater.org/smfforum/index.php

              Comment


                #8
                Originally posted by José Roca View Post
                The error has nothing to do with PBForms.inc. Don't know which version of the COM Browser you have got, but your MSADO27.INC needs a couple of macros to work.

                Add the following macros to the beginning of MSADO27.INC:

                Code:
                MACRO ADODBPositionEnum_Param = LONG
                MACRO ADODBADO_LONGPTR = LONG

                Unfortunately it does't work!

                Without PBForms works ADO library "msado27.inc" properly.
                Last edited by Alexander Holzer; 5 Mar 2008, 04:10 PM.
                Yours sincerely

                Comment


                  #9
                  He is right.
                  hellobasic

                  Comment


                    #10
                    I don't know about this error but if you need to bypass it?


                    Remark:
                    ' PBFormsInitComCtls (%ICC_WIN95_CLASSES OR %ICC_DATE_CLASSES OR %ICC_INTERNET_CLASSES)

                    And add line:

                    InitCommonControls()

                    In PBMain()
                    hellobasic

                    Comment


                      #11
                      If i remove the macrotemp's it works.

                      Though it's not 'allowed' to modify this pbforms.inc
                      hellobasic

                      Comment


                        #12
                        No, no...
                        How with it: PBFormsMakeFont, PBFormsRichEdit ???

                        And next time PBForms will all change back again...
                        Yours sincerely

                        Comment


                          #13
                          You can not modify PBMain() ?
                          hellobasic

                          Comment


                            #14
                            Read the thread now I'm cofused

                            MSADO27.INC to be created with PowerBasic COM-Browser from ActiveX Data Objects 2.7 Type Library (msado27.tlb).
                            But I need this library.
                            According to my documentation PB doesn't support ActiveX controls yet the discussion here seems to assume that it does. Did I miss something?

                            Last edited by StanHelton; 5 Mar 2008, 04:41 PM. Reason: To include quote
                            Do not go quiet into that good night,
                            ... Rage, rage against the dark.

                            Comment


                              #15
                              The problem is in this line in MSADO27.INC:

                              Code:
                                  Member Call WriteText<&H00000014>(in Data As String<&H00000000>, optional in Options As enumADODBStreamWriteEnum<&H00000001>)

                              Apparently the use of the Data keyword as the name of the parameter is causing havoc. Change it to:

                              Code:
                                  Member Call WriteText<&H00000014>(in [B]xData[/B] As String<&H00000000>, optional in Options As enumADODBStreamWriteEnum<&H00000001>)
                              According to my documentation PB doesn't support ActiveX controls yet the discussion here seems to assume that it does. Did I miss something?
                              PB doesn't natively support visual ActiveX controls because these need an OLE container. But ADO is not a visual ActiveX.
                              Forum: http://www.jose.it-berater.org/smfforum/index.php

                              Comment


                                #16
                                Originally posted by Edwin Knoppert View Post
                                You can not modify PBMain() ?
                                1. read that

                                2. For what did I buy then this program (PBForms)???
                                ...if I must correct thereafter everything
                                Yours sincerely

                                Comment


                                  #17
                                  Thank you Jose

                                  PB doesn't natively support visual ActiveX controls because these need an OLE container. But ADO is not a visual ActiveX.
                                  thanks for that clarification. now I will reread the thread hopefully with understanding.
                                  Do not go quiet into that good night,
                                  ... Rage, rage against the dark.

                                  Comment


                                    #18
                                    Thanks José Roca,
                                    but unfortunately this library is necessary to me.

                                    While I don't use PBForms more.., but it is a pity
                                    Yours sincerely

                                    Comment


                                      #19
                                      Hi Alexander,

                                      Do you have understood what I have said in my previous post?

                                      Just change Data to xData in the following line of MSADO27.INC:

                                      Code:
                                          Member Call WriteText<&H00000014>(in [B]Data[/B] As String<&H00000000>, optional in Options As enumADODBStreamWriteEnum<&H00000001>)
                                      Forum: http://www.jose.it-berater.org/smfforum/index.php

                                      Comment


                                        #20
                                        Originally posted by José Roca View Post
                                        Hi Alexander,

                                        Do you have understood what I have said in my previous post?

                                        Just change Data to xData in the following line of MSADO27.INC:

                                        Code:
                                            Member Call WriteText<&H00000014>(in [B]Data[/B] As String<&H00000000>, optional in Options As enumADODBStreamWriteEnum<&H00000001>)
                                        OK, I make...

                                        Is this MEMBER CALL WriteText continues to function?
                                        Last edited by Alexander Holzer; 5 Mar 2008, 05:40 PM.
                                        Yours sincerely

                                        Comment

                                        Working...
                                        X
                                        😀
                                        🥰
                                        🤢
                                        😎
                                        😡
                                        👍
                                        👎