1. Include Database.e

Hi everyone
I'm new to Euphoria. I'm simply trying to open an eu.edb by running the 
following code in the Ed:

Include	database.e
i1 = db_open(s, i2) MYDATA.EDB

I get the following error message...Include has not been declared...

Why? Whats wrong
Can any one help before i start chewing my desk?
TIA
Serge Lavigne

new topic     » topic index » view message » categorize

2. Re: Include Database.e

Try include instead of Include.  Euphoria is case sensitive.

jondolar wrote:
> 
> 
> Hi everyone
> I'm new to Euphoria. I'm simply trying to open an eu.edb by running the 
> following code in the Ed:
> 
> Include	database.e
> i1 = db_open(s, i2) MYDATA.EDB
> 
> I get the following error message...Include has not been declared...
> 
> Why? Whats wrong
> Can any one help before i start chewing my desk?
> TIA
> Serge Lavigne
> 
> 
> 
> TOPICA - Start your own email discussion group. FREE!
> 
>

new topic     » goto parent     » topic index » view message » categorize

3. Re: Include Database.e

Hello, Serge and welcome.  You seem to be the kind of person that like
to jump right in.  While that's good in some situations, learning a new
programming language takes a little more time.  Take some time to read
the documentation and looking at the example programs before trying to
venture out on your own.  Trust me, it will save a lot of headaches in
the long run.

That said, Euphoria is a case-sensitive language.  That means that
Include (capital I) is not the same as include (lowercase i).  All
built-in statements and routines in Euphoria are lowercase, so that
should be some help.  To open a database file, your program should look
like this:

include database.e -- all lowercase

atom err  -- db_open() returns an error code.  All variables must be
declared before use.
err = db_open("MYDATA.EDB",DB_LOCK_NO)
  -- DB_LOCK_NO is allcaps, and is a constant declared in database.e
if err != DB_OK then -- check that it opened
  puts(2, "Error opening database.")
end if

---------- End of program

I hope this gets you on your way.

Mike Sabal

>>> lavigne.s at videotron.ca 07/02/03 04:00PM >>>


Hi everyone
I'm new to Euphoria. I'm simply trying to open an eu.edb by running the

following code in the Ed:

Include	database.e
i1 = db_open(s, i2) MYDATA.EDB

I get the following error message...Include has not been declared...

Why? Whats wrong
Can any one help before i start chewing my desk?
TIA
Serge Lavigne



TOPICA - Start your own email discussion group. FREE!

new topic     » goto parent     » topic index » view message » categorize

4. Re: Include Database.e

On 2 Jul 2003, at 17:20, 1evan at sbcglobal.net wrote:

> 
> 
> Try include instead of Include.  Euphoria is case sensitive.

It has crossed my mind many times that maybe non-programmer-type 
people do not understand "case sensitive", after all, there is no hint about 
upper case vs lower case in the dictionary i just looked it up in. Maybe this 
should be spelled out in street language, maybe set to rap music?

Kat

new topic     » goto parent     » topic index » view message » categorize

5. Re: Include Database.e

> Include database.e
> i1 = db_open(s, i2) MYDATA.EDB

Don't capitalize "include!!!!"

> I get the following error message...Include has not been declared...
> 
> Why? Whats wrong
> Can any one help before i start chewing my desk?
> TIA
> Serge Lavigne

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu