Advertisement
Anaristos

Untitled

Dec 11th, 2011
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. $connStr = "sqlServer.Agent"
  2. ;;
  3. #VAR comsrv %comcreate( $connStr)
  4. ;;
  5. $dbName = "<put your machine name here>\<put the name of the SQL Server instance here>\<put the name of the database here>"
  6. ;;
  7. #VAR comssa @comsrv.start() ;; get a reference to an instance of sqlServer.
  8. ;;
  9. #CALL @comssa.open($dbName) ;;
  10. ;;
  11. #CALL %comset( comssa, UseMap, True)
  12. ;;
  13. #CALL %comset( comssa, JSONFormat, True)
  14. ;;
  15. winwrite (@oc + "sqlServer:" + @cw + " connection to " + @cy + @comssa.currConn + @cw "has" + %if( @comssa.isOpen = True, " ", @cr2 + " not " + @cw) + "been established." + @cr)
  16.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement