if i create a C struct
typedef struct test
{
int age;
int number;
}
test s1;
s1.age=10;
s1.number=12;
i created a table in ms msq server with column age and number i want to put s1.age and s1.number in the table using executeSQL command.. like this
CDatabase* theDb = new CDatabase;
theDb->OpenEx("DSN=local"
;
i created a database object and connected to the local server
theDb->ExecuteSQL("insert into tablename(age,number) values(10,12) "
;
using executeSQL i enter the sql command line,
instead of hard coding 10 and 12 how do i use variables in sql command line so i can refernce my struct to my database?
typedef struct test
{
int age;
int number;
}
test s1;
s1.age=10;
s1.number=12;
i created a table in ms msq server with column age and number i want to put s1.age and s1.number in the table using executeSQL command.. like this
CDatabase* theDb = new CDatabase;
theDb->OpenEx("DSN=local"

i created a database object and connected to the local server
theDb->ExecuteSQL("insert into tablename(age,number) values(10,12) "

using executeSQL i enter the sql command line,
instead of hard coding 10 and 12 how do i use variables in sql command line so i can refernce my struct to my database?