Re: Explicitly declare the variable



Guess I'm a little on edge about taking over someone elses database.
The person is no longer with the company and did not document very well.

My concern is that the program runs fine without "QMS.addQMSPRD"

Let me explain: I re-linked all the tables to a new SQL Server Database
(for security reasons) I had to change the DSN name.
The old program runs fine with this code to the old SQL db. But when I
change the connections to the new SQL db I cannot include "QMS.addQMSPRD"..

I realise that does not give you much information to help, but it's all I
have.





"Tom Ellison" wrote:

Dear Dan:

In my previous post, I stated that you must declare it. That would be done
using the DECLARE keyword.

It remains essential that you also initialize it. If you don't you'll just
get a different error message.

The advice about reading the manual on this function, or consulting the
person who wrote it, still stands.

When you declare the QMS object, you must declare it as being an object of a
certain type. No one unfamiliar with the custom software you are addressing
could know what that is. You cannot declare it, or initialize it, without
instructions on the custom object it addresses.

Take my advice or leave it.

No one is going to know how to declare and initialize a custom object unless
they are familiar with the object. That's why manuals and documentation are
essential.

Tom Ellison


"Dan @BCBS" <DanBCBS@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:472F81A9-76E2-4042-8746-7CC7FA0E8A5A@xxxxxxxxxxxxxxxx
I was only asking how to declare a veriable "Explicitly"



"Tom Ellison" wrote:

Dear Dan:

In your apparent function call:

QMS.addQMSPRD

there are two things to resolve. The initial QMS would be an object, so
it
is a reference to an object variable. This should be both declared and
initialized.

addQMSPRD would be a method of that object class. Do you have that
declared
somewhere as well.

Are you the author of the software including the QMS object and its
methods?
If not, talk to the one who did, or read the manual he wrote.

Tom Ellison


"Dan @BCBS" <DanBCBS@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:2CC3E168-23D6-4C3D-BAD7-6BC1D418836A@xxxxxxxxxxxxxxxx
My database is ODBC linked to an SQL database the DSN is QMSPRD.
I use Option Explicit, then in my code I add "QMS.addQMSPRD"

The error message tells me I need to "Explicitly declare the variable"

How do I do that????

Thanks






.



Relevant Pages

  • Re: Explicitly declare the variable
    ... I re-linked all the tables to a new SQL Server Database ... "Tom Ellison" wrote: ... I stated that you must declare it. ... It remains essential that you also initialize it. ...
    (microsoft.public.access.queries)
  • Re: "no variable or argument declarations are necessary."
    ... the compilor will allert you ... If I forget to declare several variables in C, ... >> forget to initialize several variables in Python, ... > runtime error per "forgot to initialize". ...
    (comp.lang.python)
  • Re: Replicating results
    ... gradient calculation used in a large optimization routine. ... It will make sure that if you do something like declare a variable called "x1" and use a variable called "xl" the compiler will tell you that xl was undeclared. ... Make sure that you initialize all of your variables, ...
    (comp.lang.fortran)
  • Re: question on scope of a variable
    ... G'day "Chip Orange", ... If I have a std code module and declare at the top of it, ... >to be able to initialize it, or have access to it's value if it's ... >While this compiles for me, I'm getting a runtime error that indicates the ...
    (microsoft.public.word.vba.general)
  • Re: [Eclipse] How to fix indentations.
    ... Why do you declare the list static but initialize it in the ... the method that picks and displays the random fortune, ... The variable should be of the interface type, ...
    (comp.lang.java.help)