Ok added the "\n":
proc->addArgument( username );
proc->addArgument( database );
output->append( (proc->arguments()).join(" "));
proc->start();
proc->writeToStdin("Saurabh\n");
connect( proc, SIGNAL(readyReadStdout()),
this, SLOT(readFromStdout()) );
if ( !proc->start() )
{
proc->addArgument( username );
proc->addArgument( database );
output->append( (proc->arguments()).join(" "));
proc->start();
proc->writeToStdin("Saurabh\n");
connect( proc, SIGNAL(readyReadStdout()),
this, SLOT(readFromStdout()) );
if ( !proc->start() )
{
To copy to clipboard, switch view to plain text mode
But still nothing. Here is the .c code:
int SetQuery()
{ char query[1024];
char serialnmr[20];
//char *serialnmr;
//serialnmr = "Saurabh";
printf("input");
scanf("%s",serialnmr);
printf("%s\n",serialnmr);
sprintf(query, "SELECT * FROM users WHERE name='%s'",serialnmr);
int SetQuery()
{ char query[1024];
char serialnmr[20];
//char *serialnmr;
//serialnmr = "Saurabh";
printf("input");
scanf("%s",serialnmr);
printf("%s\n",serialnmr);
sprintf(query, "SELECT * FROM users WHERE name='%s'",serialnmr);
To copy to clipboard, switch view to plain text mode
The .c works in the command line but using QT3 it doesn't want to work.
Bookmarks