Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Convert to Access 97

Discussion in 'Information Technology' started by bd_jlrfreitas@hotmail.com, Jul 28, 2006.

Tags:
  1. bd_jlrfreitas@hotmail.com

    bd_jlrfreitas@hotmail.com
    Expand Collapse
    Guest

    I need to run one application made on Access 2000 in a Access 97
    version and I did the conversion to Access 97. I have two errors, one
    at Enum and other at Ado connection because Access 97 don't have
    Application.Connection. How can I resolve theses situations without
    made big changes on the code?

    []'s
    BD
    []'s
    BD
     
  2. Loading...

    Similar Threads Forum Date
    Sikhconvert Joins Sikh Philosophy Network! New SPN'ers Aug 28, 2016
    Jehovah's Witnesses Are Out And Converting! Blogs Jul 31, 2016
    Islam Ishna Has Converted To Islam Interfaith Dialogues Apr 1, 2016
    A Christian Missionary tried to convert me. Blogs Oct 22, 2015
    "Convert's Corner" - Ideas for Retitle? Convert's Corner Oct 21, 2015

  3. Douglas J. Steele

    Douglas J. Steele
    Expand Collapse
    Guest

    Wherever your code refers to an enum as a data type, replace it with Long.

    Wherever your code uses Application.Connection, put an explicit connection
    string.

    --
    Doug Steele, Microsoft Access MVP
    http://I.Am/DougSteele
    (no private e-mails, please)


    <bd_jlrfreitas@hotmail.com> wrote in message
    news:2aao821hf1lmnjf166ggkamidm0htf8tb7@4ax.com...
    >I need to run one application made on Access 2000 in a Access 97
    > version and I did the conversion to Access 97. I have two errors, one
    > at Enum and other at Ado connection because Access 97 don't have
    > Application.Connection. How can I resolve theses situations without
    > made big changes on the code?
    >
    > []'s
    > BD
    > []'s
    > BD
     
  4. bd_jlrfreitas@hotmail.com

    bd_jlrfreitas@hotmail.com
    Expand Collapse
    Guest

    Thanks.
    You mean if I have something like this:

    Enum Width
    short
    big
    End Enum

    Replace with:
    Dim short As Long
    Dim big As Long

    And if I have in a call function this situation:

    Sub some(t as Width)
    if t =short then

    How I replace theses parameters?
    May be like this?

    Sub some(t as Long)
    if t =0 then

    Or is better using constant?

    Const short As Long = 0
    Const big As Long = 1


    []'s
    BD


    On Sun, 11 Jun 2006 10:51:27 -0400, "Douglas J. Steele"
    <NOSPAM_djsteele@NOSPAM_canada.com> wrote:

    >Wherever your code refers to an enum as a data type, replace it with Long.
    >
    >Wherever your code uses Application.Connection, put an explicit connection
    >string.
     
  5. Douglas J. Steele

    Douglas J. Steele
    Expand Collapse
    Guest

    Dim short As Long
    Dim big As Long

    isn't necessary (and, in fact, won't work).

    Const short As Long = 0
    Const big As Long = 1

    is necessary.

    Then, you can replace

    Sub some(t as Width)
    if t =short then

    with

    Sub some(t as Long)
    if t =short then


    --
    Doug Steele, Microsoft Access MVP
    http://I.Am/DougSteele
    (no private e-mails, please)


    <bd_jlrfreitas@hotmail.com> wrote in message
    news:t7fo82hkl16sj6enjmuf664vjk8mgvvf7g@4ax.com...
    > Thanks.
    > You mean if I have something like this:
    >
    > Enum Width
    > short
    > big
    > End Enum
    >
    > Replace with:
    > Dim short As Long
    > Dim big As Long
    >
    > And if I have in a call function this situation:
    >
    > Sub some(t as Width)
    > if t =short then
    >
    > How I replace theses parameters?
    > May be like this?
    >
    > Sub some(t as Long)
    > if t =0 then
    >
    > Or is better using constant?
    >
    > Const short As Long = 0
    > Const big As Long = 1
    >
    >
    > []'s
    > BD
    >
    >
    > On Sun, 11 Jun 2006 10:51:27 -0400, "Douglas J. Steele"
    > <NOSPAM_djsteele@NOSPAM_canada.com> wrote:
    >
    >>Wherever your code refers to an enum as a data type, replace it with Long.
    >>
    >>Wherever your code uses Application.Connection, put an explicit connection
    >>string.
     
  6. Pat Hartman\(MVP\)

    Pat Hartman\(MVP\)
    Expand Collapse
    Guest

    You can try adding the ADO library to the references collection
    (Tools/References) to fix your ADO problem. Make sure that the ADO library
    is placed ahead of the DAO library in the references collection.
    I haven't done this so I can't guarantee that it will work but it is worth a
    try. Otherwise, you'll need to replace all the ADO code with DAO. Keep in
    mind that if the database uses both ADO and DAO, you will need to
    disambiguate ALL references so that Access knows when you are referring to
    an ADO object and when you are referring to a DAO object.
    Dim rs1 As DAO.Recordset
    Dim rs2 As ADO.Recordset
    etc.

    <bd_jlrfreitas@hotmail.com> wrote in message
    news:2aao821hf1lmnjf166ggkamidm0htf8tb7@4ax.com...
    >I need to run one application made on Access 2000 in a Access 97
    > version and I did the conversion to Access 97. I have two errors, one
    > at Enum and other at Ado connection because Access 97 don't have
    > Application.Connection. How can I resolve theses situations without
    > made big changes on the code?
    >
    > []'s
    > BD
    > []'s
    > BD
     
  7. BD

    BD
    Expand Collapse
    Guest

    Adding a reference to ADO and write a explicit connection like
    "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\somepath\mydb.mdb;User
    Id=admin;Password=;"
    resolve my problem because I always declare the variables with
    Dim obj as ADo_Obj

    []'s
    BD


    On Sun, 11 Jun 2006 16:46:34 -0400, "Pat Hartman\(MVP\)"
    <patsky@NoSpam.optonline.net> wrote:

    >You can try adding the ADO library to the references collection
    >(Tools/References) to fix your ADO problem. Make sure that the ADO library
    >is placed ahead of the DAO library in the references collection.
    >I haven't done this so I can't guarantee that it will work but it is worth a
    >try. Otherwise, you'll need to replace all the ADO code with DAO. Keep in
    >mind that if the database uses both ADO and DAO, you will need to
    >disambiguate ALL references so that Access knows when you are referring to
    >an ADO object and when you are referring to a DAO object.
    >Dim rs1 As DAO.Recordset
    >Dim rs2 As ADO.Recordset
    >etc.
     

Share This Page