Leaked source code of windows server 2003
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
use Win32::OLE;
$conn = new Win32::OLE('Adodb.Connection');
$conn->Open(<<EOF); Provider=SQLOLEDB; Persist Security Info=False; User ID=sa; Initial Catalog=Northwind; EOF
checkerror();
$conn->Execute("DROP Proc Test"); $conn->Execute("DROP Proc get_customer");
$conn->Execute(<<EOF); CREATE PROC Test AS RETURN(64) EOF
checkerror();
$conn->Execute(<<EOF); CREATE PROC get_customer \@cust_id nchar(5) AS SELECT * FROM Customers WHERE CustomerID=\@cust_id EOF
checkerror();
sub checkerror { if( $conn->Errors->{Count} ) { foreach $error (Win32::OLE::in($conn->Errors)) { print $error->{Description}; } } }
#CREATE PROCEDURE Test AS #RETURN 64 #GO
|