<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-1163660871030760727</atom:id><lastBuildDate>Tue, 10 Nov 2009 21:44:48 +0000</lastBuildDate><title>Developers Knowledgebase</title><description>KnowledgeBase about VB.Net, C, C++, c#, SQL, Oracle, Java, AJAX, FoxPro &amp; Manymore</description><link>http://developerskb.blogspot.com/</link><managingEditor>noreply@blogger.com (Balu)</managingEditor><generator>Blogger</generator><openSearch:totalResults>11</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/DevelopersKnowledgebase" type="application/rss+xml" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1163660871030760727.post-5855027159044301860</guid><pubDate>Sat, 23 May 2009 09:46:00 +0000</pubDate><atom:updated>2009-05-23T15:22:22.630+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">How to Downgrade SQL Server 2005</category><title>How to Downgrade Or Convert Database from SQL Server 2005 to SQL Server 2000</title><description>As you may all know, SQL Server 2005 request a minimum of 8GB RAM to work… let’s say satisfactorily. I first didn’t know that and after a while from the upgrade I did from SQL Server 2000 to 2005 my SQL Services were starting to crash three or four times per DAY!!!&lt;br /&gt;&lt;br /&gt;At first I thought I was being attacked, but soon I realized it was nothing like that. I then decided to downgrade to a SQL Server 2000 edition. Though I looked around the internet to find some information on how to do that, I got very disappointed when I realized that no actual documentation of any kind could be found for that. So I am posting this thread to inform you on the procedures I had to follow for this action. &lt;br /&gt;&lt;br /&gt;Before beginning I must assume, firstly that the user, who will attempt such thing, has a basic knowledge of SQL Environment, secondly that he has the two versions already installed (both 2000 and 2005), that a basic backup of the databases has been created and finally that all the 2005 SQL Server Users have been created at the SQL Server 2000 environment as well.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Step 1: Generating Scripts for the Database Elements and Structures&lt;/strong&gt;&lt;br /&gt;1. Right-click over the desired Database at 2005, Choose Tasks and the Generate Scripts (Option). &lt;br /&gt;2. At the pop-up Dialog Box click at the Script All Objects in the selected Databases check box, to activate it and then Click the Next Button. &lt;br /&gt;3. Set the following Elements to the following Values &lt;br /&gt;   1. Script Collation , set to TRUE &lt;br /&gt;   2. Script Database Create, set to TRUE &lt;br /&gt;   3. Script of SQL Version, set to SQL SERVER 2000 &lt;br /&gt;   4. Script foreign keys, set to FALSE &lt;br /&gt;   5. Script Triggers, set to FALSE Then Hit the Next button&lt;br /&gt;   4. Select the way the generated scripts should be saved (There are different selections. The most common one is Clipboard). Finally click the Next button till you reach the end. &lt;br /&gt;   5. Click Finish&lt;br /&gt;&lt;br /&gt;After completing this procedure, we have to move to the SQL SERVER 2000 environment. Here, by using the Query Analyzer, we will have to run the scripts that were generated using the master database. Copy and Paste the script at the Query Analyzer and run it. After that the Structure of the Database will be created.&lt;br /&gt;&lt;br /&gt;Be careful, the SQL Server 2005 Edition inserts the Views in a random place through the script. Therefore, all the scripts that are referred to the Views MUST be moved to the end of the script. If the Query Analyzer shows some errors do not be bothered. Delete all the elements created from the script and after you fix the code run it again.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Step 2: Moving the data from 2005 to 2000&lt;/strong&gt;&lt;br /&gt;1. After completing the previous step successfully, moving the data follows. Right-click at the 2005 database you used to run the previous step and select Tasks and then choose the Export Data (option). &lt;br /&gt;2. From the pop-up Dialog Box, select the Source Db and Click at the Next Button. &lt;br /&gt;3. At the next step you will have to choose the destination server and the destination Database for the Data to be exported. Then Click Next. &lt;br /&gt;4. A List of all the Source Database&amp;rsquo;s Elements will appear in the screen. Select one by one all the Elements you wish to move and for each one click at the button Edit Mappings (Located at the bottom right corner of the Dialog Box just under the Elements list). A new Dialog box will pop-up. Select the Delete rows in Destination Tables option and activate the Enable Identity Insert Option. (Remember to repeat this action for each of the selected Element from the list that will be moved.&lt;br /&gt;&lt;strong&gt;CAUTION!!!&lt;/strong&gt; A malfunction of the SQL Server 2005 has been found. Not sure why, after multiple tries I have observed that when I tried to move more than twelve Elements at once, the Export Data Wizard of SQL Server 2005 seemed to disable the Enable Identity Insert Option that was activated over the Edit Mappings Dialog Box. But if the number of the selected Elements is smaller than 12 no problem seemed to appear.&lt;br /&gt;&lt;strong&gt;Step 3: Generating Scripts for the Database Foreign Keys and Triggers&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Finally, to successfully finish the downgrade of the Database, the Triggers and the Foreign Keys of the DB must be produced. The procedure that should be followed is the one stated next:&lt;br /&gt;1. Right-Click at the SQL 2005 Database and Select from Tasks Menu the Generate Scripts Option. &lt;br /&gt;2. Using the pop-up Dialog Box make sure that the check box Script All Objects in the selected Databases is not enabled and hit the Next Button. &lt;br /&gt;3. Set all the Elements on the List to a False Value except the ones that follow: &lt;br /&gt;1. Include IF NOT EXISTS , set to TRUE &lt;br /&gt;2. Script Owner, set to TRUE &lt;br /&gt;3. Script of SQL Version, set to SQL SERVER 2000 &lt;br /&gt;4. Script foreign keys, set to TRUE &lt;br /&gt;5. Script Triggers, set to TRUE &lt;br /&gt;6. Then Hit the Next button &lt;br /&gt;4. After finishing reading the Elements of the Database, a new list will appear at the Dialog Box. Make sure that you select ONLY THE TABLES of the Database and hit the Next Button. &lt;br /&gt;5. At the screen that follows hit the Select All button and the Next. &lt;br /&gt;6. Select the way the generated scripts should be saved (There are different selections. The most common one is Clipboard). Finally click the Next button till you reach the end. &lt;br /&gt;7. Click Finish Button.&lt;br /&gt;&lt;br /&gt;After completing this procedure, we have to move to the SQL SERVER 2000 environment. Here, by using the Query Analyzer, we will have to run the scripts that were generated using the master database. Copy and Paste the script at the Query Analyzer and run it. After that the Foreign Keys and the Triggers of the Database will be created.&lt;br /&gt;&lt;br /&gt;After these steps the database should be fully functional under the SQL Server 2000 edition.&lt;br /&gt;&lt;br /&gt;Source : &lt;a href="http://social.msdn.microsoft.com/forums/en-US/sqldatabaseengine/thread/46e3ecf9-6eab-4aa0-9453-11e7269efb6e/"&gt;http://social.msdn.microsoft.com/forums/en-US/sqldatabaseengine/thread/46e3ecf9-6eab-4aa0-9453-11e7269efb6e&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1163660871030760727-5855027159044301860?l=developerskb.blogspot.com'/&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/LyqKsu1kDj7ZtVU8I69e7zujDjQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/LyqKsu1kDj7ZtVU8I69e7zujDjQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/LyqKsu1kDj7ZtVU8I69e7zujDjQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/LyqKsu1kDj7ZtVU8I69e7zujDjQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/DevelopersKnowledgebase/~4/khqEL-m6PTY" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/DevelopersKnowledgebase/~3/khqEL-m6PTY/how-to-downgrade-or-convert-database.html</link><author>noreply@blogger.com (Balu)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://developerskb.blogspot.com/2009/05/how-to-downgrade-or-convert-database.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1163660871030760727.post-3002018366106656746</guid><pubDate>Sat, 09 May 2009 14:09:00 +0000</pubDate><atom:updated>2009-05-09T19:42:35.014+05:30</atom:updated><title>Demonoid Invitation Codes For Free</title><description>Since there is no membership open for the public in Demonoid.com, I have received a huge number of requests to send the Invitation code. To fulfil all my visitors expect I have collected some Invitation code collection and posted the same below. Use it to sign-up in Demonoid.com and enjoy the power of Demonoid.com.&lt;br /&gt;&lt;br /&gt;If you need more invitations codes leave your request in the comment section.&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;&lt;strong&gt;sjvi2cfx7n47hrygkrsqogcfevd4lml36y&lt;br /&gt;iuqow7etincjc2fr7awh1z1hejtxgtjqb9x&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Do not forget leave your thanks in the comments and also send this page to your friends. Congratulations to those 3 visitors who registered with the code sent by me! check back here regularly to get more Invitation updates.&lt;br /&gt;&lt;br /&gt;Note: Visitors who suceeded, please do not forget to seed your torrent as long as possible to alive in Demonoid and the sponser.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1163660871030760727-3002018366106656746?l=developerskb.blogspot.com'/&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/X39fRD86EGUtXvVqGYGpv2yAsN0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/X39fRD86EGUtXvVqGYGpv2yAsN0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/X39fRD86EGUtXvVqGYGpv2yAsN0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/X39fRD86EGUtXvVqGYGpv2yAsN0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/DevelopersKnowledgebase/~4/lKEFEvv9vTc" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/DevelopersKnowledgebase/~3/lKEFEvv9vTc/demonoid-invitation-codes-for-free.html</link><author>noreply@blogger.com (Balu)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total><feedburner:origLink>http://developerskb.blogspot.com/2009/05/demonoid-invitation-codes-for-free.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1163660871030760727.post-185235039995723027</guid><pubDate>Thu, 08 Jan 2009 05:39:00 +0000</pubDate><atom:updated>2009-01-08T11:47:03.878+05:30</atom:updated><title>How to Increase IIS ASP Script Timeout (IIS 6.0)</title><description>&lt;span xmlns=''&gt;&lt;p&gt;&lt;span style='font-family:Verdana; font-size:8pt'&gt;When you set the ASP script timeout, you specify, in seconds, the default length of time that ASP pages allow a script to run before terminating the script and writing an event to the Microsoft Windows® Event Log. The minimum value for this property is one second and the default value is 90 seconds. The corresponding metabase property is AspScriptTimeout Metabase Property.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Verdana; font-size:8pt'&gt;&lt;strong&gt;Important&lt;/strong&gt;   You must be a member of the Administrators group on the local computer to perform the following procedure or procedures. As a security best practice, log on to your computer by using an account that is not in the Administrators group, and then use the &lt;strong&gt;runas&lt;/strong&gt; command to run IIS Manager as an administrator. At a command prompt, type &lt;strong&gt;runas /user:&lt;/strong&gt;&lt;em&gt;Administrative_AccountName&lt;/em&gt;&lt;strong&gt; "mmc %systemroot%\system32\inetsrv\iis.msc"&lt;/strong&gt;.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Verdana; font-size:8pt'&gt;&lt;strong&gt;&lt;a name='ERB'/&gt;To change ASP script timeout&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;div&gt;&lt;table border='0' style='border-collapse:collapse'&gt;&lt;colgroup&gt;&lt;col style='width:40px'/&gt;&lt;col style='width:601px'/&gt;&lt;/colgroup&gt;&lt;tbody valign='top'&gt;&lt;tr&gt;&lt;td style='padding-left: 17px; padding-right: 12px'&gt;&lt;p style='text-align: right'&gt;&lt;span style='font-family:Verdana; font-size:8pt'&gt;1.&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;span style='font-family:Verdana; font-size:8pt'&gt;In IIS Manager, double-click the local computer, right-click the starting-point directory of the application you want to configure, and then click &lt;strong&gt;Properties&lt;/strong&gt;.&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style='padding-left: 17px; padding-right: 12px'&gt;&lt;p style='text-align: right'&gt;&lt;span style='font-family:Verdana; font-size:8pt'&gt;2.&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;span style='font-family:Verdana; font-size:8pt'&gt;Click the &lt;strong&gt;Directory&lt;/strong&gt; tab, and then click &lt;strong&gt;Configuration&lt;/strong&gt;.&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style='padding-left: 17px; padding-right: 12px'&gt;&lt;p style='text-align: right'&gt;&lt;span style='font-family:Verdana; font-size:8pt'&gt;3.&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;span style='font-family:Verdana; font-size:8pt'&gt;Click the &lt;strong&gt;Options&lt;/strong&gt; tab.&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style='height: 29px'&gt;&lt;td style='padding-left: 17px; padding-right: 12px'&gt;&lt;p style='text-align: right'&gt;&lt;span style='font-family:Verdana; font-size:8pt'&gt;4.&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;span style='font-family:Verdana; font-size:8pt'&gt;In the &lt;strong&gt;Application configuration&lt;/strong&gt; section, in the &lt;strong&gt;ASP script timeout&lt;/strong&gt; box, click the up or down arrow to set the number of seconds before an error message is returned.&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style='padding-left: 17px; padding-right: 12px'&gt;&lt;p style='text-align: right'&gt;&lt;span style='font-family:Verdana; font-size:8pt'&gt;5.&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;span style='font-family:Verdana; font-size:8pt'&gt;Click &lt;strong&gt;OK&lt;/strong&gt;.&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;Source http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/2275a2ba-5b12-4e18-8266-8a3b0678e419.mspx?mfr=true&lt;/p&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1163660871030760727-185235039995723027?l=developerskb.blogspot.com'/&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/CiB9yey6YLLWh6D8b0hW8AQo_QM/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/CiB9yey6YLLWh6D8b0hW8AQo_QM/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/CiB9yey6YLLWh6D8b0hW8AQo_QM/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/CiB9yey6YLLWh6D8b0hW8AQo_QM/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/DevelopersKnowledgebase/~4/qGNcr9nyT4c" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/DevelopersKnowledgebase/~3/qGNcr9nyT4c/how-to-increase-iis-asp-script-timeout.html</link><author>noreply@blogger.com (Balu)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://developerskb.blogspot.com/2009/01/how-to-increase-iis-asp-script-timeout.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1163660871030760727.post-9121173630204712296</guid><pubDate>Wed, 03 Dec 2008 07:10:00 +0000</pubDate><atom:updated>2008-12-03T12:40:12.321+05:30</atom:updated><title>How to send an e-mail message with attachments by using Visual Basic .NET</title><description>&lt;span xmlns=''&gt;&lt;p&gt;&lt;span style='color:black; font-family:Verdana; font-size:8pt'&gt;This article describes how to use the Microsoft Outlook Object Library to send attachments in an e-mail message by using Microsoft Visual Basic .NET.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt; &lt;/p&gt;&lt;p&gt;&lt;span style='color:black; font-family:Verdana; font-size:8pt'&gt;To send attachments in an e-mail message by using Visual Basic .NET, follow these steps: &lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;span style='color:black; font-family:Verdana; font-size:8pt'&gt;Start Microsoft Visual Studio .NET. &lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style='color:black; font-family:Verdana; font-size:8pt'&gt;On the &lt;strong&gt;File&lt;/strong&gt; menu, point to &lt;strong&gt;New&lt;/strong&gt;, and then click &lt;strong&gt;Project&lt;/strong&gt;. &lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style='color:black; font-family:Verdana; font-size:8pt'&gt;In the &lt;strong&gt;Visual Basic Projects types&lt;/strong&gt; list, click &lt;strong&gt;Console Application&lt;/strong&gt;. &lt;br/&gt;By default, the Module1.vb file is created. &lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;&lt;span style='color:black; font-family:Verdana; font-size:8pt'&gt;If Office Outlook 2003 is installed on your development computer, add a reference to the Microsoft Outlook 11.0 Object Library. If Outlook 2002 is installed on your development computer, add a reference to the Microsoft Outlook 10.0 Object Library. To do so, follow these steps: &lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;ol style='margin-left: 54pt'&gt;&lt;li&gt;&lt;span style='color:black; font-family:Verdana; font-size:8pt'&gt;On the &lt;strong&gt;Project&lt;/strong&gt; menu, click &lt;strong&gt;Add Reference&lt;/strong&gt;. &lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style='color:black; font-family:Verdana; font-size:8pt'&gt;Click the &lt;strong&gt;COM&lt;/strong&gt; tab, locate &lt;strong&gt;Microsoft Outlook 10.0 Library &lt;/strong&gt;(for Office 2002) or &lt;strong&gt;Microsoft Outlook 11.0 Object Library &lt;/strong&gt;(for Office 2003) or&lt;strong&gt; Microsoft Outlook 12.0 Object Library &lt;/strong&gt;(for Office 2007), and then click &lt;strong&gt;Select&lt;/strong&gt;. &lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style='color:black; font-family:Verdana; font-size:8pt'&gt;In the &lt;strong&gt;Add References&lt;/strong&gt; dialog box, click &lt;strong&gt;OK&lt;/strong&gt;. &lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style='color:black; font-family:Verdana; font-size:8pt'&gt;If you are prompted to generate wrappers for the libraries that you selected, click &lt;strong&gt;Yes&lt;/strong&gt;.&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/li&gt;&lt;li&gt;&lt;span style='color:black; font-family:Verdana; font-size:8pt'&gt;In the code window, replace the code with the following:&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;br /&gt; &lt;/p&gt;&lt;ol style='margin-left: 52pt'&gt;&lt;li&gt;&lt;div style='background: white'&gt;&lt;span style='color:blue; font-family:Consolas; font-size:10pt'&gt;Module Module1&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style='background: white'&gt;&lt;br /&gt; &lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style='background: white'&gt;&lt;span style='color:blue; font-family:Consolas; font-size:10pt'&gt;    Sub Main()&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style='background: white'&gt;&lt;span style='color:blue; font-family:Consolas; font-size:10pt'&gt;        ' Create an Outlook application.&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style='background: white'&gt;&lt;span style='color:blue; font-family:Consolas; font-size:10pt'&gt;        Dim oApp As Outlook._Application&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style='background: white'&gt;&lt;span style='color:blue; font-family:Consolas; font-size:10pt'&gt;        oApp = New Outlook.Application()&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style='background: white'&gt;&lt;br /&gt; &lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style='background: white'&gt;&lt;span style='color:blue; font-family:Consolas; font-size:10pt'&gt;        ' Create a new MailItem.&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style='background: white'&gt;&lt;span style='color:blue; font-family:Consolas; font-size:10pt'&gt;        Dim oMsg As Outlook._MailItem&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style='background: white'&gt;&lt;span style='color:blue; font-family:Consolas; font-size:10pt'&gt;        oMsg = oApp.CreateItem(Outlook.OlItemType.olMailItem)&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style='background: white'&gt;&lt;span style='color:blue; font-family:Consolas; font-size:10pt'&gt;        oMsg.Subject = "Send Attachment Using OOM in Visual Basic .NET"&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style='background: white'&gt;&lt;span style='color:blue; font-family:Consolas; font-size:10pt'&gt;        oMsg.Body = "Hello World" &amp;amp; vbCr &amp;amp; vbCr&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style='background: white'&gt;&lt;br /&gt; &lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style='background: white'&gt;&lt;span style='color:blue; font-family:Consolas; font-size:10pt'&gt;        ' TODO: Replace with a valid e-mail address.&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style='background: white'&gt;&lt;span style='color:blue; font-family:Consolas; font-size:10pt'&gt;        oMsg.To = "user@example.com"&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style='background: white'&gt;&lt;br /&gt; &lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style='background: white'&gt;&lt;span style='color:blue; font-family:Consolas; font-size:10pt'&gt;        ' Add an attachment&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style='background: white'&gt;&lt;span style='color:blue; font-family:Consolas; font-size:10pt'&gt;        ' TODO: Replace with a valid attachment path.&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style='background: white'&gt;&lt;span style='color:blue; font-family:Consolas; font-size:10pt'&gt;        Dim sSource As String = "C:\Temp\Hello.txt"&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style='background: white'&gt;&lt;span style='color:blue; font-family:Consolas; font-size:10pt'&gt;        ' TODO: Replace with attachment name&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style='background: white'&gt;&lt;span style='color:blue; font-family:Consolas; font-size:10pt'&gt;        Dim sDisplayName As String = "Hello.txt"&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style='background: white'&gt;&lt;br /&gt; &lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style='background: white'&gt;&lt;span style='color:blue; font-family:Consolas; font-size:10pt'&gt;        Dim sBodyLen As String = oMsg.Body.Length&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style='background: white'&gt;&lt;span style='color:blue; font-family:Consolas; font-size:10pt'&gt;        Dim oAttachs As Outlook.Attachments = oMsg.Attachments&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style='background: white'&gt;&lt;span style='color:blue; font-family:Consolas; font-size:10pt'&gt;        Dim oAttach As Outlook.Attachment&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style='background: white'&gt;&lt;span style='color:blue; font-family:Consolas; font-size:10pt'&gt;        oAttach = oAttachs.Add(sSource, , sBodyLen + 1, sDisplayName)&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style='background: white'&gt;&lt;br /&gt; &lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style='background: white'&gt;&lt;span style='color:blue; font-family:Consolas; font-size:10pt'&gt;        ' Send&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style='background: white'&gt;&lt;span style='color:blue; font-family:Consolas; font-size:10pt'&gt;        oMsg.Send()&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style='background: white'&gt;&lt;br /&gt; &lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style='background: white'&gt;&lt;span style='color:blue; font-family:Consolas; font-size:10pt'&gt;        ' Clean up&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style='background: white'&gt;&lt;span style='color:blue; font-family:Consolas; font-size:10pt'&gt;        oApp = Nothing&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style='background: white'&gt;&lt;span style='color:blue; font-family:Consolas; font-size:10pt'&gt;        oMsg = Nothing&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style='background: white'&gt;&lt;span style='color:blue; font-family:Consolas; font-size:10pt'&gt;        oAttach = Nothing&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style='background: white'&gt;&lt;span style='color:blue; font-family:Consolas; font-size:10pt'&gt;        oAttachs = Nothing&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style='background: white'&gt;&lt;span style='color:blue; font-family:Consolas; font-size:10pt'&gt;    End Sub&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style='background: white'&gt;&lt;br /&gt; &lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style='background: white'&gt;&lt;span style='color:blue; font-family:Consolas; font-size:10pt'&gt;End Module&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;ol&gt;&lt;li&gt;&lt;span style='color:black; font-family:Verdana; font-size:8pt'&gt;Search for the TODO text string in the code, and then modify the code for your environment.&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style='color:black; font-family:Verdana; font-size:8pt'&gt;Press the F5 key to build and to run the program.&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style='color:black; font-family:Verdana; font-size:8pt'&gt;Make sure that the e-mail message and the attachment have been sent.&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style='color:black; font-family:Verdana; font-size:8pt'&gt;The above example will sent a mail in silent mode that is without previewing the message to the users and also without asking the users confirmation.&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style='color:black; font-family:Verdana; font-size:8pt'&gt;To preview the message and to ask the user to click the "Send" button, just replace &lt;/span&gt;&lt;span style='color:blue; font-family:Consolas; font-size:10pt'&gt;oMsg.Send() &lt;/span&gt;&lt;span style='color:black; font-family:Verdana; font-size:8pt'&gt;code with&lt;/span&gt;&lt;span style='color:blue; font-family:Consolas; font-size:10pt'&gt; oMsg.Display()&lt;/span&gt;&lt;span style='color:black; font-family:Verdana; font-size:8pt'&gt;&lt;br /&gt;					&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;span style='font-family:Verdana; font-size:8pt'&gt;Original source : &lt;a href='http://support.microsoft.com/?kbid=313803'&gt;http://support.microsoft.com/?kbid=313803&lt;/a&gt; (Thanks to MicroSoft)&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1163660871030760727-9121173630204712296?l=developerskb.blogspot.com'/&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/_gKb3TiKLwa-YmW0xaw7OjrGM-g/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/_gKb3TiKLwa-YmW0xaw7OjrGM-g/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/_gKb3TiKLwa-YmW0xaw7OjrGM-g/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/_gKb3TiKLwa-YmW0xaw7OjrGM-g/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/DevelopersKnowledgebase/~4/sA8J_awaUHQ" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/DevelopersKnowledgebase/~3/sA8J_awaUHQ/how-to-send-e-mail-message-with.html</link><author>noreply@blogger.com (Balu)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://developerskb.blogspot.com/2008/12/how-to-send-e-mail-message-with.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1163660871030760727.post-2372655160179486860</guid><pubDate>Thu, 18 Sep 2008 12:11:00 +0000</pubDate><atom:updated>2008-12-13T13:09:16.476+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Numeric text box</category><category domain="http://www.blogger.com/atom/ns#">Decimal numeric text box</category><title>Numeric Decimal TextBox – Made easy with VB.Net (2005&amp;2008)</title><description>&lt;span xmlns=''&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;&lt;strong&gt;You just need to put this code in TextBox1 Leave event. Try this&lt;/strong&gt;&lt;br /&gt;				&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;&lt;span style='color:#3333ff'&gt;Private Sub&lt;/span&gt; TextBox1_Leave(&lt;span style='color:#3333ff'&gt;ByVal&lt;/span&gt; sender &lt;span style='color:#3333ff'&gt;As Object&lt;/span&gt;, &lt;span style='color:#3333ff'&gt;ByVal&lt;/span&gt; e &lt;span style='color:#3333ff'&gt;As&lt;/span&gt; System.EventArgs) &lt;span style='color:#3333ff'&gt;Handles&lt;/span&gt; TextBox1.Leave &lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;&lt;span style='color:#3333ff'&gt;Dim&lt;/span&gt; d &lt;span style='color:#3333ff'&gt;As Decimal&lt;/span&gt; = &lt;span style='color:#3333ff'&gt;Me&lt;/span&gt;.TextBox1.Text &lt;span style='color:#3333ff'&gt;Me&lt;/span&gt;.TextBox1.Text = &lt;span style='color:#3333ff'&gt;Decimal&lt;/span&gt;.Round(d, 2).ToString("f2") &lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;&lt;span style='color:#3333ff'&gt;End Sub&lt;/span&gt;&lt;br /&gt;				&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;The "f2" formats a floating point number with 2 decimal points&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1163660871030760727-2372655160179486860?l=developerskb.blogspot.com'/&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/25zvx4C9Od8RscxU33fSE2Urrqs/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/25zvx4C9Od8RscxU33fSE2Urrqs/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/25zvx4C9Od8RscxU33fSE2Urrqs/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/25zvx4C9Od8RscxU33fSE2Urrqs/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/DevelopersKnowledgebase/~4/s-jqeU5azhw" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/DevelopersKnowledgebase/~3/s-jqeU5azhw/numeric-decimal-textbox-made-easy-with.html</link><author>noreply@blogger.com (Balu)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://developerskb.blogspot.com/2008/09/numeric-decimal-textbox-made-easy-with.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1163660871030760727.post-8672450034936749236</guid><pubDate>Thu, 18 Sep 2008 10:49:00 +0000</pubDate><atom:updated>2008-12-13T13:12:56.287+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Numeric text box</category><title>How to create a Numeric TextBox in VB.Net (2005 &amp; 2008)</title><description>&lt;span xmlns=''&gt;&lt;p&gt;&lt;span style='color:#999900; font-family:Arial; font-size:10pt'&gt;If you are using VB2005 or VB2008 simply use this validation code into your textbox change event. &lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt; text-decoration:underline'&gt;&lt;strong&gt;Method-I &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;&lt;span style='color:#3333ff'&gt;Private Sub&lt;/span&gt; TextBox1_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged &lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;&lt;span style='color:#3333ff'&gt;If Not&lt;/span&gt; IsNumeric(Me.TextBox1.Text) Then &lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;MsgBox("Please enter numeric value only", MsgBoxStyle.Information) &lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;Me.TextBox1.Text = 0 &lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='color:#3333ff; font-family:Arial; font-size:10pt'&gt;End If &lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;End Sub &lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt; text-decoration:underline'&gt;&lt;strong&gt;Method-II &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;&lt;span style='color:#3333ff'&gt;Private Sub&lt;/span&gt; TextBox1_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged &lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;&lt;span style='color:#3333ff'&gt;Dim&lt;/span&gt; d As Double &lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;&lt;span style='color:#3333ff'&gt;Dim&lt;/span&gt; result As Boolean result = Double.TryParse(Me.TextBox1.Text, d) &lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;&lt;span style='color:#3333ff'&gt;If result&lt;/span&gt; = False Then &lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;MsgBox("Please enter only numeric value", MsgBoxStyle.Information) Me.TextBox1.Text = 0 &lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='color:#3333ff; font-family:Arial; font-size:10pt'&gt;End If &lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;&lt;span style='color:#3333ff'&gt;End Sub&lt;/span&gt;&lt;br /&gt;				&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;&lt;span style='color:black; text-decoration:underline'&gt;&lt;strong&gt;For Non .net users:&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;				&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;&lt;span style='color:#3333ff'&gt;Private Sub&lt;/span&gt; txtage_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtage.KeyPress &lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;&lt;span style='color:#3333ff'&gt;If&lt;/span&gt; KeyAscii(e) &amp;lt;&amp;gt; 57 Then &lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;&lt;span style='color:#3333ff'&gt;If&lt;/span&gt; KeyAscii(e) &amp;lt;&amp;gt; 8 Then e.Handled = True &lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='color:#3333ff; font-family:Arial; font-size:10pt'&gt;End If &lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='color:#3333ff; font-family:Arial; font-size:10pt'&gt;End If &lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;&lt;span style='color:#3333ff'&gt;End Sub&lt;/span&gt;&lt;br /&gt;				&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;&lt;span style='color:#3333ff'&gt;Public Function&lt;/span&gt; KeyAscii(ByVal UserKeyArgument As KeyPressEventArgs) As Short &lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;KeyAscii = Asc(UserKeyArgument.KeyChar) &lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='color:#3333ff; font-family:Arial; font-size:10pt'&gt;End Function&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt; text-decoration:underline'&gt;&lt;strong&gt;Method-III&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;Public Class NumericTextBox&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;    Inherits TextBox&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;    Private SpaceOK As Boolean = False&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt; &lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;    ' Restricts the entry of characters to digits (including hex),&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;    ' the negative sign, the e decimal point, and editing keystrokes (backspace).&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;    Protected Overrides Sub OnKeyPress(ByVal e As KeyPressEventArgs)&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;        MyBase.OnKeyPress(e)&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt; &lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;        Dim numberFormatInfo As NumberFormatInfo = System.Globalization.CultureInfo.CurrentCulture.NumberFormat&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;        Dim decimalSeparator As String = numberFormatInfo.NumberDecimalSeparator&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;        Dim groupSeparator As String = numberFormatInfo.NumberGroupSeparator&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;        Dim negativeSign As String = numberFormatInfo.NegativeSign&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt; &lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;        Dim keyInput As String = e.KeyChar.ToString()&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt; &lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;        If [Char].IsDigit(e.KeyChar) Then&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;            ' Digits are OK&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;        ElseIf keyInput.Equals(decimalSeparator) OrElse keyInput.Equals(groupSeparator) OrElse keyInput.Equals(negativeSign) Then&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;            ' Decimal separator is OK&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;        ElseIf e.KeyChar = vbBack Then&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;            ' Backspace key is OK&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;            '    else if ((ModifierKeys &amp;amp; (Keys.Control | Keys.Alt)) != 0)&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;            '    {&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;            '     // Let the edit control handle control and alt key combinations&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;            '    }&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;        ElseIf Me.SpaceOK AndAlso e.KeyChar = " "c Then&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt; &lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;        Else&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;            ' Consume this invalid key and beep.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;            e.Handled = True&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;        End If&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt; &lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;    End Sub&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt; &lt;/p&gt;&lt;p&gt;&lt;br /&gt; &lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;    Public ReadOnly Property IntValue() As Integer&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;        Get&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;            Return Int32.Parse(Me.Text)&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;        End Get&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;    End Property&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt; &lt;/p&gt;&lt;p&gt;&lt;br /&gt; &lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;    Public ReadOnly Property DecimalValue() As Decimal&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;        Get&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;            Return [Decimal].Parse(Me.Text)&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;        End Get&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;    End Property&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt; &lt;/p&gt;&lt;p&gt;&lt;br /&gt; &lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;    Public Property AllowSpace() As Boolean&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt; &lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;        Get&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;            Return Me.SpaceOK&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;        End Get&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;        Set(ByVal value As Boolean)&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;            Me.SpaceOK = value&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;        End Set&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;    End Property&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;End Class&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1163660871030760727-8672450034936749236?l=developerskb.blogspot.com'/&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/w1gaHfT10I0tXXQm8N18b3KQ-5Y/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/w1gaHfT10I0tXXQm8N18b3KQ-5Y/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/w1gaHfT10I0tXXQm8N18b3KQ-5Y/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/w1gaHfT10I0tXXQm8N18b3KQ-5Y/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/DevelopersKnowledgebase/~4/MiBFbAYHO0A" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/DevelopersKnowledgebase/~3/MiBFbAYHO0A/how-to-create-numeric-textbox-in-vbnet.html</link><author>noreply@blogger.com (Balu)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://developerskb.blogspot.com/2008/09/how-to-create-numeric-textbox-in-vbnet.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1163660871030760727.post-362537513047928482</guid><pubDate>Mon, 11 Aug 2008 10:19:00 +0000</pubDate><atom:updated>2008-08-12T12:45:36.746+05:30</atom:updated><title>How to store images in SQL server (2000 &amp; 2005) for files types *.bmp, *.jpg, *.gif etc.,</title><description>&lt;span xmlns=''&gt;&lt;p&gt;Oops.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;I am tuning this page to fulfil your requirement.  Thanks for your patience&lt;br /&gt;&lt;/p&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1163660871030760727-362537513047928482?l=developerskb.blogspot.com'/&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/l8_KCbQye-xy2bRgLj-uGyPZ1u8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/l8_KCbQye-xy2bRgLj-uGyPZ1u8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/l8_KCbQye-xy2bRgLj-uGyPZ1u8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/l8_KCbQye-xy2bRgLj-uGyPZ1u8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/DevelopersKnowledgebase/~4/wdja3MzDEQ8" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/DevelopersKnowledgebase/~3/wdja3MzDEQ8/how-to-store-images-in-sql-server-2000.html</link><author>noreply@blogger.com (Balu)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://developerskb.blogspot.com/2008/08/how-to-store-images-in-sql-server-2000.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1163660871030760727.post-2638219387539455308</guid><pubDate>Sat, 26 Jul 2008 05:34:00 +0000</pubDate><atom:updated>2009-06-10T09:34:45.749+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Openfile Dialog VBnet</category><title>How to use the OpenFileDialog for Uploading picture (browse for picture) in vb.net, vs.Net:</title><description>&lt;span xmlns=''&gt;&lt;p style='background: white'&gt;&lt;span style='color:#444444; font-family:Verdana; font-size:10pt'&gt;If you are using VS.Net you can drag an OpenFileDialog, 3 buttons, textbox and a picturebox to your form. &lt;br/&gt;With your first button (Browse). Double click the button "Browse" and add the following into the click event.&lt;/span&gt;&lt;br /&gt;   &lt;/p&gt;&lt;p style='background: white'&gt; &lt;span style='color:black; font-family:Verdana; font-size:10pt'&gt;&lt;strong&gt;vb.net Syntax&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;   &lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;div style='background: white'&gt;&lt;span style='font-family:Courier New; font-size:10pt'&gt;&lt;span style='color:black'&gt;OpenFileDialog.Title = &lt;/span&gt;&lt;span style='color:blue'&gt;"Get Image"&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;     &lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style='background: white'&gt;&lt;span style='font-family:Courier New; font-size:10pt'&gt;&lt;span style='color:black'&gt;OpenFileDialog.ShowDialog&lt;/span&gt;&lt;span style='color:gray'&gt;&lt;strong&gt;()&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;     &lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p style='background: white'&gt;&lt;span style='color:#444444; font-family:Verdana; font-size:10pt'&gt;Go back to your form and double click the OpenFileDialog. Add this code&lt;/span&gt;&lt;br /&gt;   &lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;div style='background: white'&gt;&lt;span style='color:black; font-family:Courier New; font-size:10pt'&gt;textbox.text = OpenFileDialog.FileName&lt;/span&gt;&lt;br /&gt;     &lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p style='background: white'&gt;&lt;span style='font-family:Verdana; font-size:10pt'&gt;&lt;span style='color:#444444'&gt;Go to your second button (&lt;/span&gt;&lt;span style='color:black'&gt;&lt;strong&gt;Upload&lt;/strong&gt;&lt;/span&gt;&lt;span style='color:#444444'&gt;) click event and add&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;   &lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;div style='background: white'&gt;&lt;span style='font-family:Courier New; font-size:10pt'&gt;&lt;span style='color:black'&gt;if &lt;/span&gt;&lt;span style='color:gray'&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;span style='color:black'&gt;textbox.text.Trim&lt;/span&gt;&lt;span style='color:gray'&gt;&lt;strong&gt;()&lt;/strong&gt;&lt;/span&gt;&lt;span style='color:black'&gt; &amp;lt;&amp;gt; &lt;/span&gt;&lt;span style='color:blue'&gt;""&lt;/span&gt;&lt;span style='color:gray'&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt;&lt;span style='color:black'&gt;&lt;br/&gt;&lt;/span&gt;&lt;span style='color:purple'&gt;&lt;strong&gt;Then&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;     &lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style='background: white'&gt;&lt;span style='font-family:Courier New; font-size:10pt'&gt;&lt;span style='color:black'&gt;PictureBox.&lt;strong&gt;Image&lt;/strong&gt; = &lt;strong&gt;Image&lt;/strong&gt;.FromFile&lt;/span&gt;&lt;span style='color:gray'&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;span style='color:black'&gt;textbox.text&lt;/span&gt;&lt;span style='color:gray'&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;     &lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p style='background: white'&gt;&lt;span style='color:#444444; font-family:Verdana; font-size:10pt'&gt;Finally in the third button (Remove). Open the click event for this button and add.&lt;/span&gt;&lt;br /&gt;   &lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;div style='background: white'&gt;&lt;span style='font-family:Courier New; font-size:10pt'&gt;&lt;span style='color:black'&gt;Picturebox.&lt;strong&gt;image&lt;/strong&gt; = &lt;/span&gt;&lt;span style='color:purple'&gt;&lt;strong&gt;Nothing&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;     &lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p style='background: white'&gt;&lt;span style='font-family:Verdana; font-size:10pt'&gt;&lt;span style='color:#444444'&gt;This should take care of browsing, displaying path, uploading and removing the &lt;/span&gt;&lt;span style='color:black'&gt;&lt;strong&gt;image&lt;/strong&gt;&lt;/span&gt;&lt;span style='color:#444444'&gt;&lt;br/&gt;&lt;/span&gt;&lt;span style='color:black'&gt;&lt;strong&gt;from&lt;/strong&gt;&lt;/span&gt;&lt;span style='color:#444444'&gt; your form.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;   &lt;/p&gt;&lt;p style='background: white'&gt;If you wish to apply a filter for browse a specified type of files only, for example if you wish to display only image files like JPEG, Bitmap, PNG files or GIF files only into the dialog box then add the following code additionally to the above event.&lt;br /&gt;&lt;/p&gt;&lt;p style='background: white'&gt;&lt;span style='color:#444444; font-family:Courier New; font-size:10pt'&gt;With OpenFileDialog&lt;/span&gt;&lt;br /&gt;   &lt;/p&gt;&lt;p style='background: white; margin-left: 36pt'&gt;&lt;span style='color:#444444; font-family:Courier New; font-size:10pt'&gt;'.InitialDirectory = "C:\"&lt;/span&gt;&lt;br /&gt;   &lt;/p&gt;&lt;p style='background: white; margin-left: 36pt'&gt;&lt;span style='color:#444444; font-family:Courier New; font-size:10pt'&gt;.Filter = "All Files|*.*|Bitmaps|*.bmp|GIFs|*.gif|JPEGs|*.jpg"&lt;/span&gt;&lt;br /&gt;   &lt;/p&gt;&lt;p style='background: white; margin-left: 36pt'&gt;&lt;span style='color:#444444; font-family:Courier New; font-size:10pt'&gt;.FilterIndex = 4&lt;/span&gt;&lt;br /&gt;   &lt;/p&gt;&lt;p style='background: white; margin-left: 36pt'&gt;&lt;span style='color:#444444; font-family:Courier New; font-size:10pt'&gt;End With&lt;/span&gt;&lt;br /&gt;   &lt;/p&gt;&lt;p style='background: white'&gt;&lt;span style='font-family:Verdana; font-size:10pt'&gt;You can change the filter index to set image extension at first open. In this code filter index = 4 will set to jpeg (since *.jpg is in fourth place), so the dialog box will show only JPG files and the file type drop down menu will set for "JPEG" files while opening the dialog box. Change filter index as u need.&lt;/span&gt;&lt;br /&gt;   &lt;/p&gt;&lt;p style='background: white'&gt;By default the picture will not show in stretch mode. You can stretch by setting the in through the properties window or by add the following code:&lt;br /&gt;&lt;/p&gt;&lt;p style='background: white'&gt;&lt;span style='color:#444444; font-family:Courier New; font-size:10pt'&gt;If OpenFileDialog.ShowDialog() = DialogResult.OK Then&lt;/span&gt;&lt;br /&gt;   &lt;/p&gt;&lt;p style='background: white; margin-left: 36pt'&gt;&lt;span style='color:#444444; font-family:Courier New; font-size:10pt'&gt;PictureBox.Image = Image.FromFile(OpenFileDialog.FileName)&lt;/span&gt;&lt;br /&gt;   &lt;/p&gt;&lt;p style='background: white; margin-left: 36pt'&gt;&lt;span style='color:#444444; font-family:Courier New; font-size:10pt'&gt;PictureBox.SizeMode = PictureBoxSizeMode.StretchImage&lt;/span&gt;&lt;br /&gt;   &lt;/p&gt;&lt;p style='background: white; margin-left: 36pt'&gt;&lt;span style='color:#444444; font-family:Courier New; font-size:10pt'&gt;PictureBox.BorderStyle = BorderStyle.Fixed3D&lt;/span&gt;&lt;br /&gt;   &lt;/p&gt;&lt;p style='background: white; margin-left: 36pt'&gt;&lt;span style='color:#444444; font-family:Courier New; font-size:10pt'&gt;lblFilePath.Text = OpenFileDialog.FileName()&lt;/span&gt;&lt;br /&gt;   &lt;/p&gt;&lt;p&gt;&lt;span style='color:#444444; font-family:Courier New; font-size:10pt'&gt;End If&lt;/span&gt;&lt;br /&gt;   &lt;/p&gt;&lt;p&gt;&lt;span style='color:red'&gt;&lt;span style='font-family:Verdana; font-size:10pt'&gt;&lt;strong&gt;Please ask your questions and doubts about this thread by Leaving Your Comments (No SignUp Required) to enable me to clear all.  Please click the below "Comments" link to do so.&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;    &lt;/span&gt;&lt;/p&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1163660871030760727-2638219387539455308?l=developerskb.blogspot.com'/&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/sUNYE28tcwcgBn9bnThhWENYSdY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/sUNYE28tcwcgBn9bnThhWENYSdY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/sUNYE28tcwcgBn9bnThhWENYSdY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/sUNYE28tcwcgBn9bnThhWENYSdY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/DevelopersKnowledgebase/~4/-dX1A3VCxV4" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/DevelopersKnowledgebase/~3/-dX1A3VCxV4/how-to-use-openfiledialog-for-uploading.html</link><author>noreply@blogger.com (Balu)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">4</thr:total><feedburner:origLink>http://developerskb.blogspot.com/2008/07/how-to-use-openfiledialog-for-uploading.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1163660871030760727.post-5172153296349815369</guid><pubDate>Thu, 05 Jun 2008 07:03:00 +0000</pubDate><atom:updated>2008-08-06T12:59:10.919+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">SQL 2005 Connection Strings</category><title>How to connect SQL Server 2005 and its Connection Strings (C, C++, C#, Visual Studio 2008 &amp; VB.NET)</title><description>&lt;span xmlns=''&gt;&lt;p&gt;&lt;span style='color:#333333; font-family:Verdana'&gt;&lt;strong&gt;SqlConnection (.NET)&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='color:#333333; font-family:Verdana; font-size:10pt'&gt;&lt;strong&gt;Standard security&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Courier New; font-size:8pt'&gt;&lt;span style='color:blue'&gt;Data Source&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;ServerAddress&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;Initial Catalog&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;DataBase&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;User Id&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;Username&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;Password&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;YourPassword&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='color:#333333; font-family:Verdana; font-size:10pt'&gt;&lt;strong&gt;Standard Security alternative syntax&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Courier New; font-size:8pt'&gt;&lt;span style='color:blue'&gt;Server&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;ServerAddress&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;Database&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;DataBase&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;User ID&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;Username&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;Password&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;YourPassword&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;Trusted_Connection&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;False&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='color:#333333; font-family:Verdana; font-size:10pt'&gt;&lt;strong&gt;Trusted Connection&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Courier New; font-size:8pt'&gt;&lt;span style='color:blue'&gt;Data Source&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;ServerAddress&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;Initial Catalog&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;DataBase&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;Integrated Security&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;SSPI&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='color:#333333; font-family:Verdana; font-size:10pt'&gt;&lt;strong&gt;Trusted Connection alternative syntax&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Courier New; font-size:8pt'&gt;&lt;span style='color:blue'&gt;Server&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;ServerAddress&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;Database&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;DataBase&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;Trusted_Connection&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;True&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='color:#333333; font-family:Verdana; font-size:10pt'&gt;&lt;strong&gt;Connecting to an SQL Server instance&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Courier New; font-size:8pt'&gt;&lt;span style='color:blue'&gt;Server&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;ServerName\theInstanceName&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;Database&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;DataBase&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;Trusted_Connection&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;True&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='color:#333333; font-family:Verdana; font-size:10pt'&gt;&lt;strong&gt;Trusted Connection from a CE device&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Courier New; font-size:8pt'&gt;&lt;span style='color:blue'&gt;Data Source&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;ServerAddress&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;Initial Catalog&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;DataBase&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;Integrated Security&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;SSPI&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;User ID&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;domainname\Username&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;Password&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;YourPassword&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='color:#333333; font-family:Verdana; font-size:10pt'&gt;&lt;strong&gt;Connect via an IP address&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Courier New; font-size:8pt'&gt;&lt;span style='color:blue'&gt;Data Source&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;190.190.200.100,1433&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;Network Library&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;DBMSSOCN&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;Initial Catalog&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;DataBase&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;User ID&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;Username&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;Password&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;YourPassword&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='color:#333333; font-family:Verdana; font-size:10pt'&gt;&lt;strong&gt;Enabling MARS (multiple active result sets)&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Courier New; font-size:8pt'&gt;&lt;span style='color:blue'&gt;Server&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;ServerAddress&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;Database&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;DataBase&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;Trusted_Connection&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;True&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;MultipleActiveResultSets&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;true&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='color:#333333; font-family:Verdana; font-size:10pt'&gt;&lt;strong&gt;Attach a database file on connect to a local SQL Server Express instance&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Courier New; font-size:8pt'&gt;&lt;span style='color:blue'&gt;Server&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;.\SQLExpress&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;AttachDbFilename&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;c:\asd\qwe\dbfile.mdf&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;Database&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;dbname&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;Trusted_Connection&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;Yes&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='color:#333333; font-family:Verdana; font-size:10pt'&gt;&lt;strong&gt;Attach a database file, located in the data directory, on connect to a local SQL Server Express instance&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Courier New; font-size:8pt'&gt;&lt;span style='color:blue'&gt;Server&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;.\SQLExpress&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;AttachDbFilename&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;|DataDirectory|dbfile.mdf&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt; Database&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;dbname&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;Trusted_Connection&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;Yes&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='color:#333333; font-family:Verdana; font-size:10pt'&gt;&lt;strong&gt;Using an User Instance on a local SQL Server Express instance&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Courier New; font-size:8pt'&gt;&lt;span style='color:blue'&gt;Data Source&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;.\SQLExpress&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;Integrated Security&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;true&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;AttachDbFilename&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;|DataDirectory|\mydb.mdf&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;User Instance&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;true&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;  &lt;br /&gt; &lt;/p&gt;&lt;p&gt;&lt;span style='color:#333333; font-family:Verdana'&gt;&lt;strong&gt;SQL Native Client ODBC Driver&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='color:#333333; font-family:Verdana; font-size:10pt'&gt;&lt;strong&gt;Standard security&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Courier New; font-size:8pt'&gt;&lt;span style='color:blue'&gt;Driver&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;{SQL Native Client}&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;Server&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;ServerAddress&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;Database&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;DataBase&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;Uid&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;Username&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;Pwd&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;YourPassword&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='color:#333333; font-family:Verdana; font-size:10pt'&gt;&lt;strong&gt;Trusted Connection&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Courier New; font-size:8pt'&gt;&lt;span style='color:blue'&gt;Driver&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;{SQL Native Client}&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;Server&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;ServerAddress&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;Database&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;DataBase&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;Trusted_Connection&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;yes&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='color:#333333; font-family:Verdana; font-size:10pt'&gt;&lt;strong&gt;Connecting to an SQL Server instance&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Courier New; font-size:8pt'&gt;&lt;span style='color:blue'&gt;Driver&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;{SQL Native Client}&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;Server&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;ServerName\theInstanceName&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;Database&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;DataBase&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;Trusted_Connection&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;yes&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='color:#333333; font-family:Verdana; font-size:10pt'&gt;&lt;strong&gt;Prompt for username and password&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Courier New; font-size:8pt'&gt;&lt;span style='color:blue'&gt;oConn.Properties("Prompt") = adPromptAlways&lt;br/&gt;&lt;br/&gt;Driver&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;{SQL Native Client}&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;Server&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;ServerAddress&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;Database&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;DataBase&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='color:#333333; font-family:Verdana; font-size:10pt'&gt;&lt;strong&gt;Enabling MARS (multiple active result sets)&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Courier New; font-size:8pt'&gt;&lt;span style='color:blue'&gt;Driver&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;{SQL Native Client}&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;Server&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;ServerAddress&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;Database&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;DataBase&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;Trusted_Connection&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;yes&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;MARS_Connection&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;yes&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='color:#333333; font-family:Verdana; font-size:10pt'&gt;&lt;strong&gt;Encrypt data sent over network&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Courier New; font-size:8pt'&gt;&lt;span style='color:blue'&gt;Driver&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;{SQL Native Client}&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;Server&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;ServerAddress&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;Database&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;DataBase&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;Trusted_Connection&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;yes&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;Encrypt&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;yes&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='color:#333333; font-family:Verdana; font-size:10pt'&gt;&lt;strong&gt;Attach a database file on connect to a local SQL Server Express instance&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Courier New; font-size:8pt'&gt;&lt;span style='color:blue'&gt;Driver&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;{SQL Native Client}&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;Server&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;.\SQLExpress&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;AttachDbFilename&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;c:\asd\qwe\dbfile.mdf&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt; Database&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;dbname&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;Trusted_Connection&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;Yes&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='color:#333333; font-family:Verdana; font-size:10pt'&gt;&lt;strong&gt;Attach a database file, located in the data directory, on connect to a local SQL Server Express instance&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Courier New; font-size:8pt'&gt;&lt;span style='color:blue'&gt;Driver&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;{SQL Native Client}&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;Server&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;.\SQLExpress&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;AttachDbFilename&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;|DataDirectory|dbfile.mdf&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt; Database&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;dbname&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;Trusted_Connection&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;Yes&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='color:#333333; font-family:Verdana; font-size:10pt'&gt;&lt;strong&gt;Database mirroring&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Courier New; font-size:8pt'&gt;&lt;span style='color:blue'&gt;Data Source&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;ServerAddress&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;Failover Partner&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;mirrorserver&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;Initial Catalog&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;DataBase&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;Integrated Security&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;True&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;  &lt;br /&gt; &lt;/p&gt;&lt;p&gt;&lt;span style='color:#333333; font-family:Verdana'&gt;&lt;strong&gt;SQL Native Client OLE DB Provider&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='color:#333333; font-family:Verdana; font-size:10pt'&gt;&lt;strong&gt;Standard security&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Courier New; font-size:8pt'&gt;&lt;span style='color:blue'&gt;Provider&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;SQLNCLI&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;Server&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;ServerAddress&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;Database&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;DataBase&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;Uid&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;Username&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;Pwd&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;YourPassword&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='color:#333333; font-family:Verdana; font-size:10pt'&gt;&lt;strong&gt;Trusted connection&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Courier New; font-size:8pt'&gt;&lt;span style='color:blue'&gt;Provider&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;SQLNCLI&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;Server&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;ServerAddress&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;Database&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;DataBase&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;Trusted_Connection&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;yes&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='color:#333333; font-family:Verdana; font-size:10pt'&gt;&lt;strong&gt;Connecting to an SQL Server instance&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Courier New; font-size:8pt'&gt;&lt;span style='color:blue'&gt;Provider&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;SQLNCLI&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;Server&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;ServerName\theInstanceName&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;Database&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;DataBase&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;Trusted_Connection&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;yes&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='color:#333333; font-family:Verdana; font-size:10pt'&gt;&lt;strong&gt;Prompt for username and password&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Courier New; font-size:8pt'&gt;&lt;span style='color:blue'&gt;oConn.Properties("Prompt") = adPromptAlways&lt;br/&gt;&lt;br/&gt;oConn.Open "Provider&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;SQLNCLI&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;Server&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;ServerAddress&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;DataBase&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;DataBase&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='color:#333333; font-family:Verdana; font-size:10pt'&gt;&lt;strong&gt;Enabling MARS (multiple active result sets)&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Courier New; font-size:8pt'&gt;&lt;span style='color:blue'&gt;Provider&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;SQLNCLI&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;Server&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;ServerAddress&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;Database&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;DataBase&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;Trusted_Connection&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;yes&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;MarsConn&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;yes&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='color:#333333; font-family:Verdana; font-size:10pt'&gt;&lt;strong&gt;Encrypt data sent over network&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Courier New; font-size:8pt'&gt;&lt;span style='color:blue'&gt;Provider&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;SQLNCLI&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;Server&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;ServerAddress&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;Database&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;DataBase&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;Trusted_Connection&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;yes&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;Encrypt&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;yes&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='color:#333333; font-family:Verdana; font-size:10pt'&gt;&lt;strong&gt;Attach a database file on connect to a local SQL Server Express instance&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Courier New; font-size:8pt'&gt;&lt;span style='color:blue'&gt;Provider&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;SQLNCLI&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;Server&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;.\SQLExpress&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;AttachDbFilename&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;c:\asd\qwe\dbfile.mdf&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt; Database&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;dbname&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;Trusted_Connection&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;Yes&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='color:#333333; font-family:Verdana; font-size:10pt'&gt;&lt;strong&gt;Attach a database file, located in the data directory, on connect to a local SQL Server Express instance&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Courier New; font-size:8pt'&gt;&lt;span style='color:blue'&gt;Provider&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;SQLNCLI&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;Server&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;.\SQLExpress&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;AttachDbFilename&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;|DataDirectory|dbfile.mdf&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt; Database&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;dbname&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;Trusted_Connection&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;Yes&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='color:#333333; font-family:Verdana; font-size:10pt'&gt;&lt;strong&gt;Database mirroring&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Courier New; font-size:8pt'&gt;&lt;span style='color:blue'&gt;Data Source&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;ServerAddress&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;Failover Partner&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;MirrorServer&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;Initial Catalog&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;DataBase&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;/span&gt;&lt;span style='color:blue'&gt;Integrated Security&lt;/span&gt;&lt;span style='color:black'&gt;=&lt;/span&gt;&lt;span style='color:navy'&gt;True&lt;/span&gt;&lt;span style='color:black'&gt;;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='color:red'&gt;&lt;span style='font-family:Verdana; font-size:10pt'&gt;&lt;strong&gt;Please ask your questions and doubts about this thread by Leaving Your Comments (No SignUp Required) to enable me to clear all.  Please click the below "Comments" link to do so.&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;				&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1163660871030760727-5172153296349815369?l=developerskb.blogspot.com'/&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Vr_vagXyiqRasHAOuzRV3iumBlw/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Vr_vagXyiqRasHAOuzRV3iumBlw/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Vr_vagXyiqRasHAOuzRV3iumBlw/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Vr_vagXyiqRasHAOuzRV3iumBlw/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/DevelopersKnowledgebase/~4/eFfxUxzhYOE" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/DevelopersKnowledgebase/~3/eFfxUxzhYOE/sql-server-2005-connection-strings-c-c.html</link><author>noreply@blogger.com (Balu)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://developerskb.blogspot.com/2008/06/sql-server-2005-connection-strings-c-c.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1163660871030760727.post-5563970878218410937</guid><pubDate>Thu, 05 Jun 2008 06:37:00 +0000</pubDate><atom:updated>2008-08-06T12:59:31.375+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">MS Access Connection Strings</category><title>How to connect MS Access 2007 (And a collection of MS Access connection strings)</title><description>&lt;span xmlns=''&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:18pt'&gt;&lt;strong&gt;MS Access 2007 OLE DB &amp;amp; OleDbConnection (.NET framework) connection strings&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;&lt;strong&gt;Open connection to Access database 2007:&lt;/strong&gt;&lt;br/&gt;"Provider=Microsoft.ACE.OLEDB.12.0; Data Source=c:\ yourdbpath \ DBName.accdb; User Id=admin; Password=" &lt;br/&gt;&lt;br/&gt;&lt;strong&gt;Open connection to password protected Access database 2007:&lt;/strong&gt;&lt;br/&gt;"Provider=Microsoft.ACE.OLEDB.12.0; Data Source=c:\ yourdbpath \ DBName.accdb; Jet OLEDB:Database Password=YourPassword" &lt;br/&gt;&lt;br/&gt;&lt;strong&gt;Open connection to Access database 2007 located on a network share:&lt;/strong&gt;&lt;br/&gt;"Provider=Microsoft.ACE.OLEDB.12.0; Data Source=\\ServerName\ShareName\SharePath\ DBName.accdb" &lt;br/&gt;&lt;br/&gt;&lt;strong&gt;Open connection to Access database 2007 located on a remote server:&lt;/strong&gt;&lt;br/&gt;"Provider=MS Remote; Remote Server=http://Server-IP; Remote Provider=Microsoft.ACE.OLEDB.12.0; Data Source=c:\ yourdbpath \ DBName.accdb"&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:18pt'&gt;&lt;strong&gt;MS Access ODBC connection strings&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;&lt;strong&gt;Standard Security:&lt;/strong&gt;&lt;br/&gt;"Driver= {MicrosoftAccessDriver(*.mdb)};DBQ=C:\yourdbpath\DBName.mdb;Uid=Your_Username;Pwd=YourPassword;" &lt;br/&gt;&lt;br/&gt;&lt;strong&gt;Workgroup:&lt;/strong&gt;&lt;br/&gt;"Driver={Microsoft Access Driver (*.mdb)}; Dbq=C:\ yourdbpath \ DBName.mdb; SystemDB=C:\ yourdbpath \ DBName.mdw;" &lt;br/&gt;&lt;br/&gt;&lt;strong&gt;Exclusive&lt;/strong&gt; "Driver={Microsoft Access Driver (*.mdb)}; DBQ=C:\ yourdbpath \ DBName.mdb; Exclusive=1; Uid=YourUsername; Pwd=YourPassword;" &lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:18pt'&gt;&lt;strong&gt;MS Access OLE DB &amp;amp; OleDbConnection (.NET framework) connection strings&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;&lt;strong&gt;Open connection to Access database:&lt;/strong&gt;&lt;br/&gt;"Provider=Microsoft.Jet.OLEDB.4.0; Data Source=c:\ yourdbpath \ DBName.mdb; User Id=admin; Password=" &lt;br/&gt;&lt;br/&gt;&lt;strong&gt;Open connection to Access database using Workgroup (System database):&lt;/strong&gt;&lt;br/&gt;"Provider=Microsoft.Jet.OLEDB.4.0; Data Source=c:\ yourdbpath \ DBName.mdb; Jet OLEDB:System Database=c:\App1\ DBName.mdw" &lt;br/&gt;&lt;br/&gt;&lt;strong&gt;Open connection to password protected Access database:&lt;/strong&gt;&lt;br/&gt;"Provider=Microsoft.Jet.OLEDB.4.0; Data Source=c:\ yourdbpath \ DBName.mdb; Jet OLEDB:Database Password=YourPassword" &lt;br/&gt;&lt;br/&gt;&lt;strong&gt;Open connection to Access database located on a network share:&lt;/strong&gt;&lt;br/&gt;"Provider=Microsoft.Jet.OLEDB.4.0; Data Source=\\ServerName\ShareName\SharePath\ DBName.mdb" &lt;br/&gt;&lt;br/&gt;&lt;strong&gt;Open connection to Access database located on a remote server:&lt;/strong&gt;&lt;br/&gt;"Provider=MS Remote; Remote Server=http://Server-IP; Remote Provider=Microsoft.Jet.OLEDB.4.0; Data Source=c:\ yourdbpath \ DBName.mdb"&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='color:red'&gt;&lt;span style='font-family:Verdana; font-size:10pt'&gt;&lt;strong&gt;Please ask your questions and doubts about this thread by Leaving Your Comments (No SignUp Required) to enable me to clear all.  Please click the below "Comments" link to do so.&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;				&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1163660871030760727-5563970878218410937?l=developerskb.blogspot.com'/&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/MmZEj-qeVxMdh2urJtGOufioHbc/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/MmZEj-qeVxMdh2urJtGOufioHbc/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/MmZEj-qeVxMdh2urJtGOufioHbc/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/MmZEj-qeVxMdh2urJtGOufioHbc/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/DevelopersKnowledgebase/~4/ZN5Dh7Jjmq4" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/DevelopersKnowledgebase/~3/ZN5Dh7Jjmq4/collection-of-ms-access-connection.html</link><author>noreply@blogger.com (Balu)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://developerskb.blogspot.com/2008/06/collection-of-ms-access-connection.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1163660871030760727.post-594499591948747181</guid><pubDate>Thu, 05 Jun 2008 06:24:00 +0000</pubDate><atom:updated>2008-08-06T12:59:55.628+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">String Collection</category><title>How to connect SQL Server (A Collection of SQL connection strings)</title><description>&lt;span xmlns=''&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:18pt'&gt;&lt;strong&gt;SQL ODBC connection strings&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;&lt;strong&gt;Standard Security:&lt;/strong&gt;&amp;lt; br&amp;gt; "Driver={SQLServer};Server=Your_Server_Name;Database=Your_Database_Name;Uid=Your_Username;Pwd=Your_Password;" &lt;br/&gt;&lt;br/&gt;&lt;strong&gt;Trusted connection:&lt;/strong&gt;&amp;lt; br&amp;gt; "Driver={SQLServer};Server=Your_Server_Name;Database=Your_Database_Name;Trusted_Connection=yes;" &lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:18pt'&gt;&lt;strong&gt;SQL OLE DB connection strings&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;&lt;strong&gt;Standard Security:&lt;/strong&gt;&lt;br/&gt;"Provider=SQLOLEDB;Data Source=Your_Server_Name;Initial Catalog= Your_Database_Name;UserId=Your_Username;Password=Your_Password;" &lt;br/&gt;&lt;br/&gt;&lt;strong&gt;Trusted connection:&lt;/strong&gt;&lt;br/&gt;"Provider=SQLOLEDB;Data Source=Your_Server_Name;Initial Catalog=Your_Database_Name;Integrated Security=SSPI;" &lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:18pt'&gt;&lt;strong&gt;SQL OleDbConnection .NET strings&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;&lt;strong&gt;Standard Security:&lt;/strong&gt;&lt;br/&gt;"Provider=SQLOLEDB;Data Source=Your_Server_Name;Initial Catalog= Your_Database_Name;UserId=Your_Username;Password=Your_Password;" &lt;br/&gt;&lt;br/&gt;&lt;strong&gt;Trusted connection:&lt;/strong&gt;&lt;br/&gt;"Provider=SQLOLEDB;Data Source=Your_Server_Name;Initial Catalog=Your_Database_Name;Integrated Security=SSPI;" &lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:18pt'&gt;&lt;strong&gt;SQL SqlConnection .NET strings&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Arial; font-size:10pt'&gt;&lt;strong&gt;Standard Security:&lt;/strong&gt;&lt;br/&gt;1. "Data Source=Your_Server_Name;Initial Catalog= Your_Database_Name;UserId=Your_Username;Password=Your_Password;" &amp;lt; br&amp;gt;2. "Server=Your_Server_Name;Database=Your_Database_Name;UserID=Your_Username;Password=Your_Password;Trusted_Connection=False" &lt;br/&gt;&lt;br/&gt;&lt;strong&gt;Trusted connection:&lt;/strong&gt;&lt;br/&gt;1. "Data Source=Your_Server_Name;Initial Catalog=Your_Database_Name;Integrated Security=SSPI;" &lt;br/&gt;2."Server=Your_Server_Name;Database=Your_Database_Name;Trusted_Connection=True;"&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='color:red'&gt;&lt;span style='font-family:Verdana; font-size:10pt'&gt;&lt;strong&gt;Please ask your questions and doubts about this thread by Leaving Your Comments (No SignUp Required) to enable me to clear all.  Please click the below "Comments" link to do so.&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;				&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1163660871030760727-594499591948747181?l=developerskb.blogspot.com'/&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Z3ozEuLSLv3eY52HzVPjLOXpnPg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Z3ozEuLSLv3eY52HzVPjLOXpnPg/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Z3ozEuLSLv3eY52HzVPjLOXpnPg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Z3ozEuLSLv3eY52HzVPjLOXpnPg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/DevelopersKnowledgebase/~4/_ihfBuPQ1GY" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/DevelopersKnowledgebase/~3/_ihfBuPQ1GY/collection-of-sql-connection-strings.html</link><author>noreply@blogger.com (Balu)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://developerskb.blogspot.com/2008/06/collection-of-sql-connection-strings.html</feedburner:origLink></item></channel></rss>
