sujeeshlal
Wed Feb 28 01:03:29 CST 2007
Thanks Eric for ur help.
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..
pls help
On Feb 27, 7:25 pm, "Eric Hill" <e...@ijack.net> wrote:
> > Hi,
> > Somebody please help me how can i rum a .sqlfile from vc++. Iam using
> > MFC with MySQL as backend.
>
> Use CreateProcess orShellExecuteto launch the following:
>
> mysql my_db_name -umy_user_name -pmy_password my_script.sql
>
> If you need to get access to the database instead of just running a
> script, a good place to start would be the C++ wrapper around the mysql C
> API, called MySQL++.
>
> Find it here:
http://tangentsoft.net/mysql++/
>
> Eric