473,396 Members | 1,775 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Connecting to the DATA BASE(ORACLE)

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

Nov 15 '05 #1
12 1314
sabarish wrote:
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.
--
Flash Gordon
Living in interesting times.
Although my email address says spam, it is real and I read it.
Nov 15 '05 #2
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 */
}

Nov 15 '05 #3
kk wrote:
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.
--
Flash Gordon
Living in interesting times.
Although my email address says spam, it is real and I read it.
Nov 15 '05 #4
In article <h7************@brenda.flash-gordon.me.uk>,
Flash Gordon <sp**@flash-gordon.me.uk> wrote:

Since you have not said *which* database we can't even
direct you to the correct place.


I kindly direct your attention to the subject line.
--
7842++
Nov 15 '05 #5
Op Tue, 26 Jul 2005 17:20:12 GMT schreef Anonymous 7843:
In article <h7************@brenda.flash-gordon.me.uk>,
Flash Gordon <sp**@flash-gordon.me.uk> wrote:

Since you have not said *which* database we can't even
direct you to the correct place.


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.

--
Coos
Nov 15 '05 #6
kk wrote:

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.

--
Chuck F (cb********@yahoo.com) (cb********@worldnet.att.net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net> USE worldnet address!

Nov 15 '05 #7
In article <19*****************************@40tude.net>,
Coos Haak <ch*****@hccnet.nl> wrote:
Op Tue, 26 Jul 2005 17:20:12 GMT schreef Anonymous 7843:
In article <h7************@brenda.flash-gordon.me.uk>,
Flash Gordon <sp**@flash-gordon.me.uk> wrote:

Since you have not said *which* database we can't even
direct you to the correct place.
I kindly direct your attention to the subject line.


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.
--
7842++
Nov 15 '05 #8
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.
--
Coos
Nov 15 '05 #9
an******@example.com (Anonymous 7843) writes:
In article <19*****************************@40tude.net>,
Coos Haak <ch*****@hccnet.nl> wrote:
Op Tue, 26 Jul 2005 17:20:12 GMT schreef Anonymous 7843:
> In article <h7************@brenda.flash-gordon.me.uk>,
> Flash Gordon <sp**@flash-gordon.me.uk> wrote:
>>
>> Since you have not said *which* database we can't even
>> direct you to the correct place.
>
> I kindly direct your attention to the subject line.


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.


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.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Nov 15 '05 #10
On Tue, 26 Jul 2005 20:54:31 +0200, Coos Haak <ch*****@hccnet.nl>
wrote:
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.


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.

--
Al Balmer
Balmer Consulting
re************************@att.net
Nov 15 '05 #11
an******@example.com (Anonymous 7843) wrote:
In article <19*****************************@40tude.net>,
Coos Haak <ch*****@hccnet.nl> wrote:
Op Tue, 26 Jul 2005 17:20:12 GMT schreef Anonymous 7843:
In article <h7************@brenda.flash-gordon.me.uk>,
Flash Gordon <sp**@flash-gordon.me.uk> wrote:
>
> Since you have not said *which* database we can't even
> direct you to the correct place.

I kindly direct your attention to the subject line.


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.


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

Richard
Nov 15 '05 #12
Anonymous 7843 wrote:
Coos Haak wrote:
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.


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>
Nov 15 '05 #13

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Mahesh.V | last post by:
Hi All I get the following error while connecting to the oracle database using ODBC. in my VB.NET application. Can any one help me out solving this problem server message (if any):...
2
by: python_eager | last post by:
Hi i am connecting my database oracle 9i. While connecting i am getting the following error connection = cx_Oracle.connect("myusername", "mypassword", "python") RuntimeError: Unable to acquire...
1
by: karthik29 | last post by:
i want to connect oracle and sql. like,using a quey i should be able to data from both oracle and sql. does any know this command
1
by: rohitbasu77 | last post by:
Steps to connect Oracle in linux.... is required... thanks in advance
2
by: sudhanshu11482 | last post by:
how can I load and unload data from a text file into Oracle 10G tables? I do not want to use SQL Loader utility. What are the option by which we can achieve the conversion ?
0
by: moyoal | last post by:
Dear All, this is my first experience to connect forms and database using VPN from other location. we have client/server architectures, .FMX are available in 212.147.1.63 server. Database is...
0
by: brioska | last post by:
I have similar too... :( I tried to connect to db2 from sql*plus and report builder. Sql*plus succesfully made the connection with same error message (+same error when I used select or...
7
by: sanjay | last post by:
Hi to all the people. please will u tell how can i Connect to the Database through C program. i have No clarity in that.
17
by: kanishka1213 | last post by:
when i run perl script in the cmd prompt , it runs well and outputs results from db. but when i run the same script on apache server internet explorer. i get an error as -----...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.