The following code will delete all records from table in database on server. import win32com.client connectionString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=database;Data Source=server;" query = "delete from table;" con = win32com.client.Dispatch(‘ADODB.Connection’) con.Open(connectionString) con.Execute(query) con.Close( ) Note: This code works on Windows only. You will also need to install excellent Python for Windows extensions (pywin32) by …
Tag Archive: programming
Feb 03
How can I get application’s directory in a WPF application?
string appPath = AppDomain.CurrentDomain.BaseDirectory;
Dec 28
Look What I Found #5
PDFsharp: .NET library for creating and processing PDF documents on the fly. SSH.NET: .NET 4.0 library for SSH client protocol. MailSystem.NET: suite of .NET components with support for SMTP, POP3, IMAP4, NNTP, MIME, S/MIME, OpenPGP, DNS, vCard, vCalendar, Anti-Spam (Bayesian , RBL, DomainKeys), Queueing, Mail Merge and WhoIs. Json.NET: makes working with JSON formatted data …
Dec 28
Free books from Microsoft Press
Microsoft Press offers several e-books free of charge. For developers Programming Windows Phone 7, by Charles Petzold Moving to Microsoft Visual Studio 2010, by Patrice Pelland, Pascal ParĂ©, and Ken Haines Parallel Programming with Microsoft .NET, by Colin Campbell, Ralph Johnson, Ade Miller and Stephen ToubIntroducing Microsoft SQL Server 2008 R2, by Ross Mistry and …
Dec 06
How can I tell if Silverlight application is running out of browser?
Application.Current.IsRunningOutOfBrowser indicates whether application was launched as an out-of-browser application. Application.Current.HasElevatedPermissions indicates if application is running as an out-of-browser application with elevated permissions. Elevated permissions give you direct access to clipboard, user folder and COM enabled applications.