Connecting to the DATA BASE(ORACLE)

S

sabarish

Hai to all the people. please tell how can i Connect to the Database
through C program. I have No clarity in that.
 
F

Flash Gordon

sabarish said:
Hai to all the people. please tell how can i Connect to the Database
through C program. I have No clarity in that.

Well, the question is completely off topic here, since we deal with the
C language not all the databases that you can talk to from C using third
party libraries. Since you have not said *which* database we can't even
direct you to the correct place. No, don't post back telling us which
database, just go and find the groups or mailing lists that deal with it.

Just to get you started though, I have seen and used statements of the
following form to open a database table:
handle = ffisam(0,OF,"table",ddf_descriptor);
However, this probably won't work for you since you are almost certainly
using a completely different database.
 
K

kk

Hello,

By using pro*c you can connect database. what's ur os. first create a
file and save it with extension name is .pc and compile it with proc
<filename.pc> then compile it with cc and execute it with a.out if u r
using unix os.

the code looks like this:

#include <sqlca.h>
main()
{

varchar uid[]="system",passwd[]="manager";

EXEC SQL connect :uid identified by :passwd;

printf("successfully connected to database");

/* u r code goes here */
}
 
F

Flash Gordon

kk said:
Hello,

By using pro*c

pro*c is NOT C. It is therefore off topic on this group. If you know
where to redirect the OP then by all means redirect the OP. You can even
post an answer IF you tell the poster they were OT, redirect them to the
correct place, cross post to the correct place, and importantly set
follow ups to the correct place. However, don't just answer OT questions
here since they will not be properly vetted for errors.
> you can connect database. what's ur os. first create a
file and save it with extension name is .pc and compile it with proc
<filename.pc> then compile it with cc and execute it with a.out if u r

Please don't use stupid abbreviations like "u r". All they do is make it
hard to read your post, especially for non-native English speakers.
using unix os.

the code looks like this:

#include <sqlca.h>

Not a standard C header.
main()
{

varchar uid[]="system",passwd[]="manager";

EXEC SQL connect :uid identified by :passwd;

This is not valid C thus proving that pro*c is not C.
printf("successfully connected to database");

/* u r code goes here */
}

Finally, please include some context so that people know what you are
replying to. Advice is REGULARLY posted on how to do this through Google.
 
C

Coos Haak

Op Tue, 26 Jul 2005 17:20:12 GMT schreef Anonymous 7843:
I kindly direct your attention to the subject line.

Next time, repeat the subject in the message itself.
There are numerous newsreaders (software or in person) that don't read the
subject line.
 
C

CBFalconer

kk said:
By using pro*c you can connect database. what's ur os. first create a
file and save it with extension name is .pc and compile it with proc
<filename.pc> then compile it with cc and execute it with a.out if u r
using unix os.

the code looks like this:

#include <sqlca.h>
main()
{
varchar uid[]="system",passwd[]="manager";
EXEC SQL connect :uid identified by :passwd;
printf("successfully connected to database");
/* u r code goes here */
}

This is utter nonsense in c.l.c. It _might_ not be in a newsgroup
devoted to oracle, except even there it would be useless lacking
any context.

Don't answer off-topic questions in c.l.c. Do include proper
context when you do post something.
 
A

Anonymous 7843

Op Tue, 26 Jul 2005 17:20:12 GMT schreef Anonymous 7843:


Next time, repeat the subject in the message itself.

No. There is no posting guideline to that effect in comp.lang.c
or for usenet in general. You are not in a position to create
new guidelines.
There are numerous newsreaders (software or in person) that don't read the
subject line.

The subject lines are there for a reason and if you or your newsreader
chooses to ignore them it is not my concern.
 
C

Coos Haak

Op Tue, 26 Jul 2005 18:05:13 GMT schreef Anonymous 7843:
No. There is no posting guideline to that effect in comp.lang.c
or for usenet in general. You are not in a position to create
new guidelines.
I am only repeating remarks of others. So i'm only being polite.
 
K

Keith Thompson

No. There is no posting guideline to that effect in comp.lang.c
or for usenet in general. You are not in a position to create
new guidelines.


The subject lines are there for a reason and if you or your newsreader
chooses to ignore them it is not my concern.

It is a fact that information that appears only in the subject line,
and not in the body of the message, will often be missed by many
readers. You've just seen it happen here.
 
A

Alan Balmer

Op Tue, 26 Jul 2005 18:05:13 GMT schreef Anonymous 7843:

I am only repeating remarks of others. So i'm only being polite.

Heh. I didn't even see that post. I decided long ago that messages
written by this "anonymous" character weren't worth downloading. Nice
to have confirmation now and then, though.
 
R

Richard Bos

No. There is no posting guideline to that effect in comp.lang.c
or for usenet in general.

Yes, there is. It's common netiquette. If you consider yourself above
that, you're ripe for the killfile.

Richard
 
G

Grumble

Anonymous said:
No. There is no posting guideline to that effect in comp.lang.c
or for usenet in general. You are not in a position to create
new guidelines.


The subject lines are there for a reason and if you or your newsreader
chooses to ignore them it is not my concern.

e.g. http://jibbering.com/faq/faq_notes/pots1.html#ps1QSub

<quote>
Another Usenet convention holds that the Subject header should not be
expected to be available to a reader of any message. While it is
unlikely that there are any newsreaders currently in use in which the
user is not presented with the Subject header, it remains inappropriate
to ask a question in the subject header (or to assume that its contents
will provide supplementary information about a question) and doing so is
as likely to invoke a lesson in Usenet etiquette as an answer to the
question. But a question is not really a subject anyway. The subject
should describe what the question is in relation to, and is useful for
archive searching and categorisation rather than as a means of
communication.

Any question asked should always appear in the body of the post, and in
a form that does not assume the availability of the Subject header to
the reader.

The Subject header should also not be wasted. Placing "please help" and
the like in the subject header is unwelcome and counterproductive. Take
the opportunity to construct a Subject header that states the type of
the problem, what it relates to. Subject headers that state the real
subject will attract the attention of people with a special interest in
that subject, exactly those people best able to offer help.
</quote>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,167
Messages
2,570,911
Members
47,453
Latest member
MadelinePh

Latest Threads

Top