View Issue Details

IDProjectCategoryView StatusLast Update
0012954mantisbtdb mssqlpublic2014-05-16 15:00
Reporterflame Assigned Torombert  
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionduplicate 
PlatformX64OSWindows Server 2008 R2 
Product Version1.2.5 
Summary0012954: Cannont view issue details
Description

When I try view an issue details by clicking on the ID from the Viewing Issue table, i get the following error:
(the url is: http://mymantis/view.php?id=3496)

APPLICATION ERROR 0000401
Database query failed. Error received from database was 0037000: [Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near ')'. for the query: SELECT id, name, description FROM mantis_tag_table WHERE id IN ( ) ORDER BY name ASC .

Please use the "Back" button in your web browser to return to the previous page. There you can correct whatever problems were identified in this error or select another action. You can also click an option from the menu bar to go directly to a new section.

Steps To Reproduce

New install of Mantis on Microsoft Windows Server 2008 R2 with MSSQL 2008 R2. PHP 5.3.6 (php_sqlsrv_53_nts_vc9.dll)

Additional Information

New install of Mantis on Microsoft Windows Server 2008 R2 with MSSQL 2008 R2. PHP 5.3.6 (php_sqlsrv_53_nts_vc9.dll). The database was migrated from MySQL.

TagsNo tags attached.

Relationships

duplicate of 0011744 closedrombert Failure getting tag candidates on MSSQL 

Activities

Vandevenne Ben

Vandevenne Ben

2011-04-27 08:08

reporter   ~0028709

I am running the exact same configuration and get the same error.
Everything worked fine with MySQL but my customer wants SQL.
I have this same error when I want to consult the details from the only issue I have created in an empty database

flame

flame

2011-04-28 02:58

reporter   ~0028711

Last edited: 2011-04-28 03:00

another error:

  • when a simple user try to logon, but can't beacause:
    Error received from database was #0: [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid parameter number near for the query:
    SELECT p.id, p.name, ph.parent_id
    FROM mantis_project_table p
    LEFT JOIN mantis_project_user_list_table u
    ON p.id=u.project_id AND u.user_id=?
    LEFT JOIN mantis_project_hierarchy_table ph
    ON ph.child_id = p.id
    WHERE p.enabled = ? AND
    ( p.view_state=?
    OR (p.view_state=?
    AND
    u.user_id=? )
    )
    ORDER BY p.name
LuckyVb

LuckyVb

2011-05-26 12:23

reporter   ~0028851

в файл tag_api.php строка 424 добавьте
if($t_subquery_results.length == 0)
$t_subquery_results[] = -1;
итого получаем:

        while( $row = db_fetch_array( $result ) ) {
            $t_subquery_results[] = (int)$row;
        }
        if($t_subquery_results.length == 0)
            $t_subquery_results[] = -1;
        $query = "SELECT id, name, description FROM $t_tag_table WHERE id IN ( " . implode( ', ', $t_subquery_results ) . ')';
dregad

dregad

2012-01-02 11:38

developer   ~0030761

Could this be caused by your using the PHP sqlsrv driver instead of the mssql one ? Please see 0011776

rombert

rombert

2012-01-05 16:56

reporter   ~0030814

This is already fixed, but not released. You can try the latest git version from master-1.2.x .

grangeway

grangeway

2014-05-16 15:00

reporter   ~0040382

MantisBT currently supports Mysql and has support for other database engines.

The support for other databases is known to be problematic.

Having implemented the current database layer into Mantis 10 years ago, I'm currently working on replacing the current layer.

If you are interested in using Mantis with non-mysql databases - for example, Oracle, PGSQL or MSSQL, and would be willing to help out testing the new database layer, please drop me an email at paul@mantisforge.org

In the meantime, I'd advise running Mantis with Mysql Only to avoid issues.

Thanks
Paul