Results 1 to 6 of 6
  1. #1
    Join Date
    Mar 2004
    Location
    FRANCE, Rennes
    Posts
    3

    Question Unanswered: ADO and Interbase

    Hello !

    Sorry for my English. I'm French.

    I have a little problem...

    I use Delphi 5 Entreprise. I want to connect
    Interbase 6.0 with ADO.

    I found free ADO providers but none of then
    correctly run with this code :

    ls_str := ADOQuery.FieldByName('TOTO').AsString;

    With the function FieldByName, I have an except.
    Adress violation.

    Free ADO providers are Ok ?
    My ADO provider is not correctly parameters ?

    Uses Components :
    TADOConnection,
    TADOTable,
    TADOQuery,
    TDataSource.

    Thank you for yours help.

    _Marsu_.

  2. #2
    Join Date
    Feb 2003
    Location
    San Antonio, TX
    Posts
    31

    Address Exception

    Is it possible that your connection has not been established and the query made Active when you are trying to access the field?

    If the ADOQuery is not "Active" then you should expect an address exception when you try to get specific field information because you are referencing relative to an invalid pointer value.

    Try walking through the code with a Watch on the ADOQuery status and make sure that it is "Active" when you get to the point in your code where you are accessing "ADOQuery.FieldByName('TOT').AsString.
    Ralph D. Wilson II
    email: rwilson@thewizardsguild.com
    URL: http://thewizardsguild.com

    "Any sufficiently advanced technology is indistinguishable from magic." A.C. Clark

  3. #3
    Join Date
    Mar 2004
    Location
    FRANCE, Rennes
    Posts
    3
    Thanks RDWilson2 for your answer.

    My connection is Ok.

    I can access fields with the code :
    ADOQuery.Fields[0].Value;

    I have the good value.
    But i doesn't use the function FIELDBYNAME.
    I have an except. Adress violation.

    HELPS !!!!

    _Marsu_

  4. #4
    Join Date
    Feb 2003
    Location
    San Antonio, TX
    Posts
    31

    Address violation exception

    I know this may to sound a like I am being a bit patronizing but, please trust me, I am not. I am just taking you through the steps _I_ would follow when faced with this.

    Have you checked to make sure that the field name is correctly spelled?

    Can you access any _other_ fields with FieldByName?"
    Ralph D. Wilson II
    email: rwilson@thewizardsguild.com
    URL: http://thewizardsguild.com

    "Any sufficiently advanced technology is indistinguishable from magic." A.C. Clark

  5. #5
    Join Date
    Mar 2004
    Location
    FRANCE, Rennes
    Posts
    3

    Question

    Excuse me...

    I'm sure of the field name.

    And no, i have the same Address violation with others
    fields name.

    But, I'm writing a little program and it works perfectly !??!!

    I don't understand !!!

    Thank you for your help RDWilson2.

    _Marsu_ : go to sleep and stop drunk !!!!! ;-)

  6. #6
    Join Date
    Feb 2003
    Location
    San Antonio, TX
    Posts
    31
    ADOQuery's aer, in my experience, a bit quirky. ;-)
    Ralph D. Wilson II
    email: rwilson@thewizardsguild.com
    URL: http://thewizardsguild.com

    "Any sufficiently advanced technology is indistinguishable from magic." A.C. Clark

Posting Permissions

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