can u please provide me with a c/c++ program to add a user to MySQL and allow him to only insert into the database

Create a routine in MySQL to handle all that at DB level and call the same from c/c++ program.

can u give me some more details about this....can i run the program using turbo c or boroland c++?

Yes, in either.

but when i type the program in boroland c++ window, while compiling, i get an error saying 'declaration syntax error'. what is the header file i need to include?

Please post your code here and get it rectified with our experts.

when i try compiling this in boroland c++, i get 'declaration syntax error' and 'unable to open included file 'MYSQL.H'' error....plz help...

#include <mysql.h>

#include <stdio.h>

CREATE TABLE cust_details(
cust_ID number(5)CONSTRAINT Nnull1 NOT NULL,
Cust_last_name VarChar2(20)CONSTRAINT Nnull2 NOT NULL,
Cust_mid_name VarChar2(4),
Cust_first_name VarChar2(20),
Account_No number(5)CONSTRAINT pkey1 PRIMARY KEY,
Account_Type Varchar2(10) CONSTRAINT Nnull3 NOT NULL,
Bank_branch VarChar2(25)CONSTRAINT Nnull4 NOT NULL,
cust_email VarChar2(30)
);

a c/c++ program to add a user to MySQL and allow him to only insert into the database

if you want to add an user and allow only insert why you need to create a table from c++ code. Please post your c++ code in the c++ forum only.

what is to be used in combination with turbo c++ (like any seperate compiler code builder)to rectify the problem of showing "'unable to open included file 'MYSQL.H''. plz help if somebody knws...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.