Using the SQL Script.It! Update DLL with Clarion
The SSIUpdate.dll is used to manage updates to your SQL databases through your Clarion program. Currently, the dll supports Clarion 10 only.
Installing The Template
1. Add the SQL Script.It! global template to the App that will be managing SQL updates. If this is not in your template list, the register the SSIUpdater.tpl template first.
2. The template will add the following to the Inside The Global Map section:
ssi_UpdateSQLScripts(*Cstring pFileName,*Cstring pFilePassword,*Cstring pServer,*CString pUserName,*CString Password,*Cstring pDatabase,*Long
Doing An Update
You need to make a call to the ssi_UpdateSQLScripts procedure. You will need to create several variables, fill them with the appropriate values, then make a call to the SSIUpdate.dll.
Here is an example of how to do this:
!Define the variables
!Fill the variables
lFilename = ‘YourDefinedTPSUpdateFile.tps’
lFilePassword = ‘YourDefinedUpdateFilePassword’
lServer = SQL.Server
lUserName = SQL.User
lPassWord = SQL.Password
lDataBase = SQL.Database
lTrustedConnection = SQL.TRUSTEDCONNECTION
lForce = 0 !Set to TRUE to force all scripts to execute
Make The Call To The DLL
C# = ssi_UpdateSQLScripts(lFilename,lFilePassword,lServer,lUserName,lPassWord,lDataBase,lTrustedConnection,lForce)
!Returns TRUE if the DLL was executed properly
Error Messages When Importing
37000 – MSDTX on server xxxxxxx is unavailable.
This indicates that you are trying to import a database from a server that is not SQL Script.It!’s default connection. To solve this issue, you need to make sure that the service “Distributed Transaction Coordinator” is running. To do this:
- Type services.msc in the run command box
- Select “Services” manager; Hit Enter
- Select the service “Distributed Transaction Coordinator”
- Right on the service and choose “Start”
The partner transaction manager has disabled its support for remote/network transactions on Serverxxxxxx
- First verify the “Distribute Transaction Coordinator” Service is running on both database server computer and client computers
- Go to “Administrative Tools > Services”
- Turn on the “Distribute Transaction Coordinator” Service if it is not running If it is running and client application is not on the same computer as the database server, on the computer running database server
- Go to “Administrative Tools > Component Services”
- On the left navigation tree, go to “Component Services > Computers> My Computer” (you may need to double click and wait as some nodes need time to expand)
- Right click on “My Computer”, select “Properties”
- Select “MSDTC” tab
- Click “Security Configuration”
- Make sure you check “Network DTC Access”, “Allow Remote Client”, “Allow Inbound/Outbound”, “Enable TIP” (Some option may not be necessary, have a try to get your configuration)
- The service will restart
- BUT YOU MAY NEED TO REBOOT YOUR SERVER IF IT STILL DOESN’T WORK
On your client computer use the same above procedure to open the “Security Configuration” setting, make sure you check “Network DTC Access”, “Allow Inbound/Outbound” option, restart service and computer if necessary.
On you SQL server service manager, click “Service” dropdown, select “Distribute Transaction Coordinator”, it should be also running on
your server computer.