..
check this: http://www.sqlite.org/c3ref/exec.html
--
View this message in context:
http://old.nabble.com/problem-with-inserting-non-NULL-values-into-sqlite-table-tp26114852p26127196.html
Sent from the SQLite mailing list archive at Nabble.com
>
>
> int insert (int no_col, char *fmt2, ... )
> {
> int i;
> va_list ap;
> va_start (ap, fmt2);
>
> for (i=0; i<(no_col-1); i++)
> {
>strcat (fmt2, ",");
>strcat (fmt2, (va_arg(ap, char*)));
> }
> va_end (ap);
>
> char k[500]= &
T wrote:
> The problem I`m dealing here is that i cant insert other datas into
> the table i`ve created except NULL, because i get following error
> message:
>
> Error in select statement : INSERT INTO a (a,b,c,d) VALUES (NULL,
> NULL, something_else, NULL) [no such
int i;
> va_list ap;
> va_start (ap, fmt2);
>
> for (i=0; i<(no_col-1); i++)
> {
> strcat (fmt2, ",");
> strcat (fmt2, (va_arg(ap, char*)));
> }
> va_end (ap);
>
> char k[500]= "INSERT INTO ";
> strcat (k, table_name );
> strc
);
for (i=0; i<(no_col-1); i++)
{
strcat (fmt2, ",");
strcat (fmt2, (va_arg(ap, char*)));
}
va_end (ap);
char k[500]= "INSERT INTO ";
strcat (k, table_name );
strcat (k, " ( ");
strcat (k, fmt1);
strcat (k, ") ");
strcat (k, "VAL
5 matches
Mail list logo