Hi sandeep!
I have a Visual Basic 6.0 Code to do this with OSQL. You can use OSQL in C, C++ and VC++. The hint to do in
VB is -
Visual Basic 6.0 Code :
-------------------------------------------------------
Private Sub Command1_Click()
' Take user inputs in form
shell "osql -U" & user & " -P" & passwd & "-S" & server & " -i" & sqlfile_path & " -o" & file_path_out & "-d" & Database , vbHide
End Sub
-------------------------------------------------------
In the above Code -
sqlfile_path : SQL File which u want to execute.
file_path_out : Path where results are stored.
Use COMDLG32 to Browse SQL File and use TEXTBOX control to input Server, Database, Login and Password. Create EXE and deliver to your client.
If you are not able to do the Visual Basic Code, mail me at -
[email protected] to get the Full Source Code for this. But, I think my Hint is enough for a developer.
Reply soon ...