Re: ODBC namespace identifier

new topic     » goto parent     » topic index » view thread      » older message » newer message

Rad wrote:

> I am using odbc.e with the name space identifier ODBC in the
> Begin area of WinMain() window.
> 
> }}}
<eucode>
> include odbc.e as ODBC
> </eucode>
{{{

> 
> 
> I have also included a library mss.ew of my own routines after odbc.
> 
> }}}
<eucode>
> include mss.ew
> </eucode>
{{{

> 
> 
> Now, I have written a procedure in mss.ew which accesses ODBC:getData()
> function, but ODBC name space identifier is not recognised.
> 
> I get following error:
> 
> D:\EUPHORIA\IDE\Projects\Syndicate ODBC\mss.ew:155
> ODBC has not been declared
>     		rec_data = ODBC:getData(sysmsgs_hndl)
>     		              ^
> 
> Only when I move the concerned procedure to the General area of the window
> where ODBC is accessed, the name space identifier is recognized and system
> works fine.
> 
> Is it a problem with ODBC or am I doing something wrong?
> How can I avoid having my own routine outside mss.ew?

See section "Scope" in the reference manual:
     http://www.rapideuphoria.com/refman_2.htm#42

| A namespace identifier has local scope. It is known only within the file
| that declares it, i.e. the file that contains the include statement.
| Different files might define different namespace identifiers to refer to
| the same included file. 

When your library 'mss.ew' also contains a line such as
     include odbc.e as ODBC

then your program should work as expected.
     
Regards,
   Juergen

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu