virtual path provider and mysql

Last post 10-20-2008 12:50 AM by dtagnostos. 0 replies.

Sort Posts:

  • virtual path provider and mysql

    10-20-2008, 12:50 AM
    • Member
      5 point Member
    • dtagnostos
    • Member since 09-19-2008, 7:28 AM
    • Posts 44

    hello i try to create a virtual path provider. all examples use sql server and i want to use mysql.

    i declare in project references the mysql and i can use it in my pages. but when i try to included in App_Code folder. (eg in VirtualFile.cs file) i get this error

    Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

    Compiler Error Message: CS0246: The type or namespace name 'MySql' could not be found (are you missing a using directive or an assembly reference?)

    Source Error:


    Line 16: using System.Data.SqlClient;
    Line 17: using System.Text;
    Line 18: using MySql.Data.MySqlClient;
    Line 19: namespace VP

    Source File: c:\Documents and Settings\dep18495\My Documents\Visual Studio 2008\Projects\VPP\VPP\App_Code\DBVirtualFile.cs    Line: 18
     

     why? how can i use mysql to create a vpp?

     

    i found solution. except in the reference folder i must declared in the web.config  the mysql driver:
    <add assembly="Mysql.Data, Version=5.2.3.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />

Page 1 of 1 (1 items)