In article <g17fr6$pq5$1@a ioe.org>, sanjay <nospam@nospam. comwrote:
>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.
It is not possible using only routines that are part of standard C.
You will need to use routines that are not part of C itself
(though, of course, calling those routines from within your C program).
For some operating systems and some databases, you can use
operating-system supplied routines to make the connection, with
the operating system providing a standard connection interface
that is database independant.
For other operating systems, or for databases that do not have
that kind of interface available, or for doing operations that are
not within the scope of those operating-system supplied interfaces,
you will have to use routines supplied by the database manufacturer.
Some databases provide an interface that is based upon TCP/IP
network protocols, with it being expected that you will do all
the hand-coding to open a network connection and communicate back
and forth with the database.
Clearly the details of how you should proceed vary, based upon
product and operating system differences. There is no standard way
to communicate with -all- kinds of databases (though some have
evolved well-defined interfaces intended for use amongst multiple
competing products.)
For further details, you will need to consult a newsgroup
that deals with your particular database, and possibly also a
newsgroup that deals with your operating system.
--
"He wove a great web of knowledge, linking everything together,
and sat modestly at a switchboard at the center, eager to help."
-- Walter Kerr
>
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.
Better make up your mind. Do you want u to help you, or do you
want 'all the people' to help you? U hasn't posted here for quite
some time. In addition, a Database is probably off-topic in this
newsgroup. At any rate, I would consider using text.
--
[mail]: Chuck F (cbfalconer at maineline dot net)
[page]: <http://cbfalconer.home .att.net>
Try the download section.
Hi walter thx for ur reply. it is interesting to read but when i go back
to coding it still hasnt helped me know what to type :(
Walter Roberson wrote:
In article <g17fr6$pq5$1@a ioe.org>, sanjay <nospam@nospam. comwrote:
>
>>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.
>
>
It is not possible using only routines that are part of standard C.
You will need to use routines that are not part of C itself
(though, of course, calling those routines from within your C program).
>
For some operating systems and some databases, you can use
operating-system supplied routines to make the connection, with
the operating system providing a standard connection interface
that is database independant.
>
For other operating systems, or for databases that do not have
that kind of interface available, or for doing operations that are
not within the scope of those operating-system supplied interfaces,
you will have to use routines supplied by the database manufacturer.
>
Some databases provide an interface that is based upon TCP/IP
network protocols, with it being expected that you will do all
the hand-coding to open a network connection and communicate back
and forth with the database.
>
Clearly the details of how you should proceed vary, based upon
product and operating system differences. There is no standard way
to communicate with -all- kinds of databases (though some have
evolved well-defined interfaces intended for use amongst multiple
competing products.)
>
For further details, you will need to consult a newsgroup
that deals with your particular database, and possibly also a
newsgroup that deals with your operating system.
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.pcthe n 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 */
}
sanjay wrote:
Hi walter thx for ur reply. it is interesting to read but when i go back
to coding it still hasnt helped me know what to type :(
>
Walter Roberson wrote:
>
>>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.
>>
>>
>>
>It is not possible using only routines that are part of standard C.
>You will need to use routines that are not part of C itself
>(though, of course, calling those routines from within your C program).
>>
>For some operating systems and some databases, you can use
>operating-system supplied routines to make the connection, with
>the operating system providing a standard connection interface
>that is database independant.
>>
>For other operating systems, or for databases that do not have
>that kind of interface available, or for doing operations that are
>not within the scope of those operating-system supplied interfaces,
>you will have to use routines supplied by the database manufacturer.
>>
>Some databases provide an interface that is based upon TCP/IP
>network protocols, with it being expected that you will do all
>the hand-coding to open a network connection and communicate back
>and forth with the database.
>>
>Clearly the details of how you should proceed vary, based upon
>product and operating system differences. There is no standard way
>to communicate with -all- kinds of databases (though some have
>evolved well-defined interfaces intended for use amongst multiple
>competing products.)
>>
>For further details, you will need to consult a newsgroup
>that deals with your particular database, and possibly also a
>newsgroup that deals with your operating system.
Hi walter thx for ur reply. it is interesting to read but when i go
back to coding it still hasnt helped me know what to type :(
You still aren't getting the message. You are in the wrong group.
Either find a group or mailing list for your software package, or try
comp.databases.
Drop the text-speak.
Please don't top-post. Your replies belong following or interspersed
with properly trimmed quotes. See the majority of other posts in the
newsgroup, or:
<http://www.caliburn.nl/topposting.html >
Please don't top-post. Your replies belong following or interspersed
with properly trimmed quotes. See the majority of other posts in the
newsgroup, or:
<http://www.caliburn.nl/topposting.html >
Comment