User Tag List

Results 1 to 8 of 8

Thread: MMF2 - ODBC problem.

  1. #1
    Clicker Fusion 2.5 DeveloperHTML5 Export Module

    Join Date
    Jun 2006
    Posts
    1,469
    Mentioned
    10 Post(s)
    Tagged
    0 Thread(s)

    MMF2 - ODBC problem.

    I'm running on Vista Ultima.

    I'm running Version 2.0 (Build R246) of MMF.

    I have the developer version.

    I create a new application.
    I add an odbc object.
    I add in code: On start of application, get a data source via a selector.
    I run the application.
    The selector appears.
    I select my Virtuoso data source.
    It asks for my password.
    I enter it and click ok.

    The Runtime aborts it says due to error.

    I know the Virtuoso DSN works because I can use it in
    OpenOffice without a problem and query records in tables using
    SQL views and querys. I was doing this to verify my SQL statement.

    I also noted another possible issue.
    When the data selector comes up it shows on "machine" and "file" DSN name tabs and not "File" "User" and "System" DNS name tabs as in Vista. I'm not sure if this is an issue.

    Any suggestions???

  2. #2
    Clicker Fusion 2.5 DeveloperHTML5 Export Module

    Join Date
    Jun 2006
    Posts
    1,469
    Mentioned
    10 Post(s)
    Tagged
    0 Thread(s)

    Re: MMF2 - ODBC problem.

    This could be a problem with Virtuoso ODBC driver so I am checking with them.

  3. #3
    Clicker Fusion 2.5 DeveloperHTML5 Export Module

    Join Date
    Jun 2006
    Posts
    1,469
    Mentioned
    10 Post(s)
    Tagged
    0 Thread(s)

    Re: MMF2 - ODBC problem.

    Here I tried to use the odbc object with the selector option. As soon as I select the Virtuoso ODBC driver and click ok then the MMF app aborts. Here is the ODBC trace:

    P"RunCom3546252 1b40-1e98 ENTER SQLAllocEnv
    HENV * 1170413C

    P"RunCom3546252 1b40-1e98 EXIT SQLAllocEnv with return code 0 (SQL_SUCCESS)
    HENV * 0x1170413C ( 0x009fb368)

    P"RunCom3546252 1b40-1e98 ENTER SQLAllocConnect
    HENV 009FB368
    HDBC * 014D0EF0

    P"RunCom3546252 1b40-1e98 EXIT SQLAllocConnect with return code 0 (SQL_SUCCESS)
    HENV 009FB368
    HDBC * 0x014D0EF0 ( 0x014d0f08)

    P"RunCom3546252 1b40-1e98 ENTER SQLDriverConnectW
    HDBC 014D0F08
    HWND 000D0B32
    WCHAR * 0x727DB264 [ -3] <Invalid string length!>
    SWORD -3
    WCHAR * 0x727DB264
    SWORD -3
    SWORD * 0x00000000
    UWORD 1 <SQL_DRIVER_COMPLETE>

    P"RunCom3546252 1b40-1e98 EXIT SQLDriverConnectW with return code 1 (SQL_SUCCESS_WITH_INFO)
    HDBC 014D0F08
    HWND 000D0B32
    WCHAR * 0x727DB264 [ -3] <Invalid string length!>
    SWORD -3
    WCHAR * 0x727DB264
    SWORD -3
    SWORD * 0x00000000
    UWORD 1 <SQL_DRIVER_COMPLETE>

    DIAG [01004] [OpenLink][Virtuoso ODBC Driver]CLW03: String data, right truncated (-1)

    P"RunCom3546252 1b40-1e98 ENTER SQLAllocStmt
    HDBC 014D0F08
    HSTMT * 014D0EF4

    P"RunCom3546252 1b40-1e98 EXIT SQLAllocStmt with return code 0 (SQL_SUCCESS)
    HDBC 014D0F08
    HSTMT * 0x014D0EF4 ( 0x014a1d08)

    P"RunCom3546252 1b40-1e98 ENTER SQLSetStmtOption
    HSTMT 014A1D08
    UWORD 3 <SQL_MAX_LENGTH>
    SQLPOINTER 0x00000400

    P"RunCom3546252 1b40-1e98 EXIT SQLSetStmtOption with return code 0 (SQL_SUCCESS)
    HSTMT 014A1D08
    UWORD 3 <SQL_MAX_LENGTH>
    SQLPOINTER 0x00000400 (BADMEM)

    P"RunCom3546252 1b40-1e98 ENTER SQLFreeStmt
    HSTMT 014A1D08
    UWORD 1 <SQL_DROP>

    P"RunCom3546252 1b40-1e98 EXIT SQLFreeStmt with return code 0 (SQL_SUCCESS)
    HSTMT 014A1D08
    UWORD 1 <SQL_DROP>

    P"RunCom3546252 1b40-1e98 ENTER SQLFreeConnect
    HDBC 014D0F08

    P"RunCom3546252 1b40-1e98 EXIT SQLFreeConnect with return code -1 (SQL_ERROR)
    HDBC 014D0F08

    DIAG [S1010] [Microsoft][ODBC Driver Manager] Function sequence error (0)

    P"RunCom3546252 1b40-1e98 ENTER SQLAllocConnect
    HENV 009FB368
    HDBC * 014D0EF0

    P"RunCom3546252 1b40-1e98 EXIT SQLAllocConnect with return code 0 (SQL_SUCCESS)
    HENV 009FB368
    HDBC * 0x014D0EF0 ( 0x014a2050)

  4. #4
    Clicker Fusion 2.5 DeveloperHTML5 Export Module

    Join Date
    Jun 2006
    Posts
    1,469
    Mentioned
    10 Post(s)
    Tagged
    0 Thread(s)

    Re: MMF2 - ODBC problem.

    Here is the answer I got back from Virtuoso support. It the OBBC object is passing longer or shorter string length than the Virtuoso is able to use??

    Here is what I got back from Virtuoso:

    7. What are you passing in your programming language's ODBC object?
    > Can you provide the code that passes the connection attributes? I am
    > seeing "invalid string length" where connection attributes should
    > appear.

    Does anyone have this information?????

  5. #5
    Clickteam Clickteam

    Join Date
    Jun 2006
    Location
    France
    Posts
    14,022
    Mentioned
    279 Post(s)
    Tagged
    3 Thread(s)

    Re: MMF2 - ODBC problem.

    The connection code is something like this :

    SQLAllocConnect(hEnv, &hConnect);
    SQLDriverConnect(hConnect, hWnd, (LPBYTE)szConnectString, 512, (LPBYTE)"", 0, NULL, SQL_DRIVER_COMPLETE);
    SQLAllocStmt(hConnect, &hStatement);
    SQLSetStmtOption(hStatement,SQL_MAX_LENGTH,1024);

    Don't ask me why. Let me know if you need any change.

    And btw please... use only one '?' at the end of your questions, thanks.

  6. #6
    Clicker Fusion 2.5 DeveloperHTML5 Export Module

    Join Date
    Jun 2006
    Posts
    1,469
    Mentioned
    10 Post(s)
    Tagged
    0 Thread(s)

    Re: MMF2 - ODBC problem.

    Thanks Yves I have forwarded to Virtuoso tech support.

  7. #7
    Clickteam Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Simon's Avatar
    Join Date
    Jun 2006
    Location
    UK
    Posts
    2,735
    Mentioned
    65 Post(s)
    Tagged
    3 Thread(s)

    Re: MMF2 - ODBC problem.

    I don't know if this is entirely relevant to your problem...

    I used the ODBC object extensively in MMF 1.5 for an theatre booking system which I developed.

    I had enormous problems with connections initially, often failing to access data sources which worked fine in other ODBC compliant applications in windows.

    What I found worked really well was to initially set up a 'dummy' connection in the dialogue box and then subsequently, use the actions and the expression editor to manually set the connection string. This instantly eliminated the problems for some reason. Maybe this is not relevant with the MMF2 version of the object, but it's worth having a go. Connection strings are a pain in the butt though - I seem to remember there was some useful freeware tool to help with building and checking connection strings... I can't for the life of me remember what it is called though.

    I hope this helps

  8. #8
    Clicker Fusion 2.5 DeveloperHTML5 Export Module

    Join Date
    Jun 2006
    Posts
    1,469
    Mentioned
    10 Post(s)
    Tagged
    0 Thread(s)

    Re: MMF2 - ODBC problem.

    I found the problem. There is a conflict between the ODBC object and the MMF "At start of frame" condition.

    Here is how to produce the problem.

    Open a new application. Add the odbc object. When it asks for a ODBC DSN leave it blank and click OK.

    In the Event List Editor add the event "At start of Frame Then Get ODBC using selector"

    Run the application. The ODBC selection dialog box will appear. Select whatever ODBC DNS you want.

    When you click OK the runtime will abort with error from Operating system. At least when using Vista it does.

    Now remove the event code. Now run again. The selection box will appear and you can select without the runtime aborting. Why does the box appear? Because the ODBC object must have some code built in to tell it to.

    Could someone confirm this MMF conflict error.

    When this abort happened I assumed it was the Virtuoso driver. I have successfully connected with the change above and accessed the Virtuoso database records with no problem.

Similar Threads

  1. ODBC Problem
    By Mephistus in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 5th September 2008, 05:27 PM
  2. ODBC tutorial
    By secoffnz in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 15th March 2008, 07:26 AM
  3. odbc
    By bensmid66 in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 26th October 2007, 08:37 PM
  4. ODBC problem
    By Ivosh in forum Extension Development
    Replies: 2
    Last Post: 5th September 2007, 07:26 AM
  5. ODBC Problem - Not returning records
    By droberson in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 23rd June 2007, 03:40 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •