If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Delphi, C etc > delphi / ADO / MySQL / parameters

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-03-04, 13:32
bidochon bidochon is offline
Registered User
 
Join Date: Jun 2004
Location: Gwadloup (FWI)
Posts: 2
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 15:44.
Reply With Quote
  #2 (permalink)  
Old 06-04-04, 15:35
bidochon bidochon is offline
Registered User
 
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On