09-05-2005
Its very true that u have to connect to the database first and then check for the values.
In case if u are going for a direct connect without any client-server applications, that becomes very simple,
in your program simply go for
EXEC SQL connect to :dbName;
Else if your connection needs to be established through client-server
Prepare the above statement
EXEC SQL prepare connString from 'connect to :dbName';
then pass the above prepared statement to the client or where ur dB resides.
Once a prepared statement is received, instruct your client to execute the received prepared statement and send back the SQLCODE to the server which had sent the prepared statement.
I believe this is your requirement, if I am wrong in understanding ur question or requirement please let me know about that with more details.
Thanks
10 More Discussions You Might Find Interesting
1. Programming
hi, please, help me
i need connect my program in C whit a SybaseIQ 12 database
i´m programming in solaris 5 (unix)
please, help me, because i don`t know what to do...
thanks..
jonathan (0 Replies)
Discussion started by: DebianJ
0 Replies
2. Shell Programming and Scripting
please, help me-....
i need connect to a database Sybase IQ 12 and I don't know if i can do it using a shell program.
if it's posibble, please tell me how...
please, help me, because I don't know what to do....
thanks...
jonathan (1 Reply)
Discussion started by: DebianJ
1 Replies
3. Programming
Anybody please help me how connect a database file in TC for windows.
regards
Senthil. K (5 Replies)
Discussion started by: Senthil
5 Replies
4. Shell Programming and Scripting
Hi,
could you please help me out what are the command line commands to connect to as400.
Thanks, (0 Replies)
Discussion started by: mgirinath
0 Replies
5. Windows & DOS: Issues & Discussions
hi,
I'd like to connect to a Sybase ASE 12 through a a graphic user interface (GUI) that run on windows and solaris10, because i need to do some querys.
The database is running on solaris 10.
I'm not an expert using databases, but i know how to use some SQL commands through command line... (3 Replies)
Discussion started by: danin
3 Replies
6. Shell Programming and Scripting
Hi all
I am working in datawarehouse project and use DB2 database . shell scripting is written to connect with DB2 database in my application but i dont know how to connect with oracle databse or other databases.Is there any command in unix to connect any of these datbases? (6 Replies)
Discussion started by: vijays3
6 Replies
7. UNIX for Dummies Questions & Answers
How to connect a MySQL database from unix using unix shell scripting ( people are using perl scrpt to connect the same database).
I want to access a MySQL database through a shell script (4 Replies)
Discussion started by: apsprabhu
4 Replies
8. Shell Programming and Scripting
Hi Friends,
I have a one unix box "x.y.z" on SunOS , where oracle is not installed. And another machine "a.b.c" on AIX , where oracle is installed. Now i want to make a script on x.y.z , that can connect to database on a.b.c, using sqlplus command. and then generate a report based on the... (5 Replies)
Discussion started by: gauravgarg
5 Replies
9. Shell Programming and Scripting
could someone please help me in shell scripting. i want to connect to oracle database which is on remote sever.
requirement:
1 want to check files in source directory if file exist then a execute a corresponding batch jobs on unix sever and fetch data from oracle database which is on remote... (2 Replies)
Discussion started by: refi123
2 Replies
10. Shell Programming and Scripting
Dear All,
I am trying to write a script which will generate output to a file based on input files on basis of a pattern which I am able to do so. But, I am stuck as I am trying to connect this to database server. Below is my command and output details.
Input Code
filedate=$(date... (6 Replies)
Discussion started by: grvk101
6 Replies
LEARN ABOUT LINUX
execute
EXECUTE(7) SQL Commands EXECUTE(7)
NAME
EXECUTE - execute a prepared statement
SYNOPSIS
EXECUTE name [ ( parameter [, ...] ) ]
DESCRIPTION
EXECUTE is used to execute a previously prepared statement. Since prepared statements only exist for the duration of a session, the pre-
pared statement must have been created by a PREPARE statement executed earlier in the current session.
If the PREPARE statement that created the statement specified some parameters, a compatible set of parameters must be passed to the EXECUTE
statement, or else an error is raised. Note that (unlike functions) prepared statements are not overloaded based on the type or number of
their parameters; the name of a prepared statement must be unique within a database session.
For more information on the creation and usage of prepared statements, see PREPARE [prepare(7)].
PARAMETERS
name The name of the prepared statement to execute.
parameter
The actual value of a parameter to the prepared statement. This must be an expression yielding a value that is compatible with the
data type of this parameter, as was determined when the prepared statement was created.
OUTPUTS
The command tag returned by EXECUTE is that of the prepared statement, and not EXECUTE.
EXAMPLES
Examples are given in the Examples [prepare(7)] section of the PREPARE [prepare(7)] documentation.
COMPATIBILITY
The SQL standard includes an EXECUTE statement, but it is only for use in embedded SQL. This version of the EXECUTE statement also uses a
somewhat different syntax.
SEE ALSO
DEALLOCATE [deallocate(7)], PREPARE [prepare(7)]
SQL - Language Statements 2010-05-14 EXECUTE(7)