Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 29th, 2006, 02:23 AM
Registered User
 
Join Date: Apr 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default making sqlscript to executables

Hi every one. I have created on sql script from sql server 2000. Now my problem is to make one exe file for executing the same script (could be in anylanguage). I know how to run sql script through query
analyzer but i want to create one exe(executable file) for the script.
as this is done in many languages (and i dont know how its done) brief explanation with coding examples will be very helpful. As i need to give this exe to the client in 2 days.

Thanks and regards
S.G.Sandeep

 
Old April 29th, 2006, 04:42 AM
Authorized User
 
Join Date: Mar 2006
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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 ...

 
Old May 27th, 2006, 12:33 AM
Registered User
 
Join Date: Apr 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Can I Get the full code??? Please??






Similar Threads
Thread Thread Starter Forum Replies Last Post
Making a Forum Smacky_Wolf HTML Code Clinic 8 August 2nd, 2009 11:41 PM
Executables Tuxedoorigin Visual Basic 2008 Essentials 1 June 2nd, 2008 12:42 PM
Java executables on Mac 132591 Java Basics 1 December 5th, 2006 09:07 AM
C++ executables 132591 Xcode 0 October 26th, 2006 11:11 PM
passing arguments to executables DaveG BOOK: Professional SQL Server 2005 Integration Services ISBN: 0-7645-8435-9 0 May 30th, 2006 03:26 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.