473,800 Members | 2,406 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1347
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,"ta ble",ddf_descri ptor);
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",passw d[]="manager";

EXEC SQL connect :uid identified by :passwd;

printf("success fully 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",passw d[]="manager";

EXEC SQL connect :uid identified by :passwd;
This is not valid C thus proving that pro*c is not C.
printf("success fully 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",passw d[]="manager";
EXEC SQL connect :uid identified by :passwd;
printf("success fully 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********@yah oo.com) (cb********@wor ldnet.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******@exampl e.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_Keit h) 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

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

Similar topics

2
3678
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): "ORA-12154:TNS:could not resolve service name Thank in Advance Mahesh.V
2
3466
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 Oracle environment handle please send the solution
1
1704
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
1897
by: rohitbasu77 | last post by:
Steps to connect Oracle in linux.... is required... thanks in advance
2
2557
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
2163
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 installed in saperate 212.147.1.62 server. Each client has its own forms runtime and reports runtime, reading fmx from application server.
0
963
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 desc (but I got the results)) Report builder didn't conenct, just thrown error.
7
2702
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
5957
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 ----- install_driver(Oracle) failed: Can't load 'C:/perl/lib/auto/DBD/Oracle/Oracle.dll' for module DBD::Oracle: load_file:The specified module could not be found at C:/perl/lib/DynaLoader.pm line 202. at (eval 5) line 3 Compilation failed in require at (eval 5) line 3....
0
9551
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10275
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10253
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9085
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7576
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6811
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5471
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5606
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4149
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.