Quantcast
Channel: MySQL Forums - MySQL Workbench
Viewing all articles
Browse latest Browse all 3739

how can I call WorkBench dll in VB.net (1 reply)

$
0
0
how to call WorkBench dll in VB.net? such as db.mysql.sqlparser.grt.dll in WorkBench root directory
I try to use following code:
    <DllImport(
        "x:\WorkBench\db.mysql.sqlparser.grt.dll",
        SetLastError:=False
        )>
    Public Shared Function checkSqlSyntax(ByVal sql As String) As Integer
    End Function
got error: "Unable to find an entry point named 'checkSqlSyntax' in DLL 'db.mysql.sqlparser.grt.dll'."

In WorkBench source code(download from http://dev.mysql.com/downloads/workbench/), can found function checkSqlSyntax

-- Modules --> db.mysql.sqlparser.grt --> Header Files --> mysql_sql_facade.h
DECLARE_MODULE_FUNCTION(MysqlSqlFacadeImpl::checkSqlSyntax),

-- Modules --> db.mysql.sqlparser.grt --> Source Files --> mysql_sql_facade.cpp
int MysqlSqlFacadeImpl::checkSqlSyntax(const std::string &sql)
{
return Mysql_sql_syntax_check::create(get_grt())->check_sql(sql.c_str());
}

Viewing all articles
Browse latest Browse all 3739

Trending Articles