Hi,

I am building the insert string for inserting into particular table t1
using C program. The below string is stored in a variable.

say sqlstmt = 'INSERT INTo T1 values(:id,:ename);'

The values for the field's id, name will come from the front end. The
sql string will be executed using Pro *C in Oracle. Pro *C can get the
values of Id and ename fields which are initialized in the C program and
can execute the sql statement in Oracle database. The record got
inserted successfully.

Can we get the MySQL Equivalent so that we can use the same in our C
program? Do we have bind variable or host variable concepts in MySQL?

            In MySQL prompt we tried with @, i.e. set the values of id,
ename as set @id = 10, @ename = 'Sample'; Next we used the below command
and it worked fine.
                   Insert into t1 values(@id,@ename).


Can we use the same "@" for the binding values in "C' Program for mysql
so that it substitutes the value of fields?

Thanks for help in advance. Please help.

Regards,

Narasimha





Confidentiality Notice

The information contained in this electronic message and any attachments to 
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or 
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to