Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2004
    Location
    Gwadloup (FWI)
    Posts
    2

    Unanswered: delphi / ADO / MySQL / parameters

    Hi,

    I'm using Delphi 7, MS ACCESS and MySQL 4.0.20 via ADO.

    I'm trying to make simples Querys with parameters

    code :

    Code:
    Query.SQL.Text:='Select sum(debit),sum(credit) '+
                    'from MaTable '+
                    'where (Month(jour)=:PMois) and (Year(jour)=:PAn)'; 
    Query.Parameters[0].Value:=5; 
    Query.Parameters[1].Value:=2000; 
    Query.Open;

    The problem is :
    -> When I'm connected to ACCESS, Works Fine !
    -> When I'm connected to MySQL, I got a ERROR message : 'Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another'

    Any help would be greatly apreciated.
    thanks
    Last edited by bidochon; 06-03-04 at 16:44.

  2. #2
    Join Date
    Jun 2004
    Location
    Gwadloup (FWI)
    Posts
    2

    Unhappy More informations

    More informations :

    1. The ERROR Message appears just after loading the property Query.SQL.Text (before the affectation of Query.Parameters[0].Value)
    2. When the program is compiled : that works fine
      but under DELPHI debugger the error message appears
    3. If the database is a local database (MySQL 5.0.0-alpha-nt for Windows) : it works fine but if the database is on my Linux server (MySQL 4.0.20) the problem appears



    Thanks

Posting Permissions

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