There is no obigation to buy, It is offered Free of charge. However if you find it beneficial, please donate the small amount outlined, which will be given to cftagstore.com designated charity. Then you will have access to the full VB source code as well.
There is one essential requirement for this activeX dll to work. SQL Server is required to be installed on the same machine, the SQL server client only installation should have the required dll to run this.
To Install this Microsoft COM activeX DLL, perform the following.
1. Copy the generateScript.dll to the c:\%windows%\system folder, e.g. c:WINNT\SYSTEM.
2. Register the dll. At the doc command prompt type "regsvr32.exe c:WINNT\SYSTEM\generateScript.dll". Msgbox will appear to confirm the registration.
3. Sample CF code to run the dll. The first line instantiates the com object. The second line calls the generateScript function passing in four parameters.
- First parameter is the server name or IP address.
- Second parameter is the database name.
- Third parameter is the sql server username, using (local) NT account on the server , security wise is better, no need to store the password.
- Fourth parameter is the password, required if (local) is unspecified.
<cfobject type="COM" name="gScript" class="generateScript.gScript" action="CREATE" context="LOCAL"> <cfset scriptOutput = gScript.generateScript("SQLServer1","Northwind","(local)","blank")>
The above example returns a variable which contains the scripted objects of the Northwind database, all tables, views and stored procs included.
|