Re: How can I run '.sql' script from vc++

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



I have an 'Insert.sql' script in my source directory. On that Sql
file ,Iam trying to insert a value to a table.
I tried like this

ShellExecute(NULL, "open", "mysql", "mydb -u root -p root
Insert.sql", NULL, SW_SHOW);

But its not working..Where am I worng..

What makes you think that it's not working, besides the row never getting inserted? Can you run it manually and get it to work? Do you get an error message?

Eric
.