Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $connStr = "sqlServer.Agent"
- ;;
- #VAR comsrv %comcreate( $connStr)
- ;;
- $dbName = "<put your machine name here>\<put the name of the SQL Server instance here>\<put the name of the database here>"
- ;;
- #VAR comssa @comsrv.start() ;; get a reference to an instance of sqlServer.
- ;;
- #CALL @comssa.open($dbName) ;;
- ;;
- #CALL %comset( comssa, UseMap, True)
- ;;
- #CALL %comset( comssa, JSONFormat, True)
- ;;
- winwrite (@oc + "sqlServer:" + @cw + " connection to " + @cy + @comssa.currConn + @cw "has" + %if( @comssa.isOpen = True, " ", @cr2 + " not " + @cw) + "been established." + @cr)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement