Menu

Directsql & delphi 2009

Help
2009-01-14
2013-04-02
  • Nobody/Anonymous

    Hi,

    I get fowlloing errors when I try to compile directsql in delphi 2009:

    [DCC Error] uMysqlVio.pas(964): E2089 Invalid typecast

    [DCC Error] uMysqlVio.pas(980): E2089 Invalid typecast

    I cannot find any reason for these errors, anyone an idea?

    thanks.

     
    • Nobody/Anonymous

      I can`t compile and have the same errors, have you got a solution?

      thanks
      exchange

       
      • Nobody/Anonymous

        I found error. Just search the line "sock_addr.sin_addr:=in_addr(ip_addr)"

         
    • Nobody/Anonymous

      got the same problem, cant compile the source 'cause of the invalid typecast. has someone got any idea how to fix it? in the realted lines are either a comment or compiler directive.

       
      • Nobody/Anonymous

        hi there!

        i think the problem is related to crlf - some of the units may have been saved on linux machines. could you open the file in edit (command line editor) and just save it. then the lines should be correct in delphi.

        good luck!

         
    • Nobody/Anonymous

      thanks for this idea but it didn't work for me. Now I've got the invalid typecasts at line 970 and 986. any other idea?

       
  • Nobody/Anonymous

    Cool but how do you fix it? :)

     
  • Nobody/Anonymous

    OK I managed to get it to compile now but it is unable to connect to the MySQL server. The version I compiled on another computer using the unmodified code is able to, even under Windows 7.

     
  • Nobody/Anonymous

    I've narrowed it down, it's pausing on the winsock32.dll call:

    err := select(n+1,@rfd,@wfd,@efd,tbuff);

    from uMySQLvio.pas (select is an external call to winsock32.dll).

     
  • Nobody/Anonymous

    Sorry I meant wsock32.dll

     
  • Nobody/Anonymous

    I already try on MYSQL 5.1 with D7, runtime error : 'Access violation at address 00455A24 in module project1.exe'
    and the process stop at uMysqlNet.pas line : 322.
    Could anyone tell me why is this happen?
    Thanks

     
  • Zeljko Marjanovic

    Hi,

    Which version of DirectSQL are you using? For D2010? Did you try the demo app? Does that work?
    Please, give more info, or show your code which leads to this error.

    Anyway, line 322 in uMysqlNet.pas is in function TMysqlNet.GetNetConnected where VIO is checked for being closed (maybe FVIO isn't initialized properly, dunno).

     
  • Nobody/Anonymous

    You're right, I don't initialized properly..
    Already solved! thank you..

    I use Direct SQL 1.2.2 with Delphi 7 and MySQL 5.1.42
    I already try also, your directmysql_D2010, but function unrecognized on Delphi 7
    I think it should be working on D2009 or D2010

     

Log in to post a comment.