Demo SQL Provider Code

Steve Lee

Hi, Attached is the code we used today in the Web cast for the SQL demo provider. Please note this is not a SQL management provider. It simply allows you to query data from a SQL server directly from the cmd line. Install the Snapin: PS>$env:Windir\Microsoft.NET\Framework\v2.0\.50727\InstallUtil.exe SQLProvider.dll Add the snapin to your session: PS>Add-PsSnapin SqlPrototypeProvider You can use it as follows: PS>cd SQL: SQL:>cd MySQLServer SQL:>dir master tempdb model msdb pubs Northwind SQL:>cd Northwind SQL:>dir name —- Categories CustomerCustomerDemo CustomerDemographics Customers dtproperties Employees EmployeeTerritories Order Details Orders Products Region Shippers Suppliers Territories SQL:>cd Employees SQL:>Dir -filter {where EmployeeId=8} EmployeeID : 8 LastName : Callahan FirstName : Laura Title : Inside Sales Coordinator TitleOfCourtesy : Ms. BirthDate : 1/9/1958 12:00:00 AM HireDate : 3/5/1994 12:00:00 AM Address : 4726 – 11th Ave. N.E. City : Seattle Region : WA PostalCode : 98105 Country : USA HomePhone : (206) 555-1189 Extension : 2344 Photo : {21, 28, 47, 0…} Notes : Laura received a BA in psychology from the University of Washington. She has also completed a course in business French. She reads and writes French. ReportsTo : 2 PhotoPath : http://accweb/emmployees/davolio.bmp Wassim [MSFT]


Discussion is closed.

Feedback usabilla icon