Database Limits

Today I try to update some tables in my database and I got the error message about Insufficient Resources and this is a problem.

MSDE Limits

An MSDE database is limited in total size to 2 GB. How quickly you reach 2 GB depends on the number of members you have, the frequency with which you send, how long you keep archives, incoming mail and outgoing mail, and other factors. If you are upgrading from 4.x or lower, and wish to use MSDE, you can determine how large your total database size is by adding together the size of all the files in your db directory.

ListManager will warn you via email if your database is growing too large. If you are running ListManager in the foreground and your database is too large, you'll see a message similar to this one:

severity: 17 - Insufficient Resources - The statement caused SQL Server to run out of resources (such as locks or disk space for the database) or to exceed some limit set by the system administrator.
msgtext: Could not allocate space for object 'members_' in database 'ListManager' because the 'PRIMARY' filegroup is full.

If you find that your database is growing too large under MSDE and are unable to trim its size by managing the length of time data is kept, you should consider upgrading to a stand-alone SQL server.


Start And Kill process

Process Class

Provides access to local and remote processes and enables you to start and stop local system processes.

Sample Code

1. Start notepad

2. Start winword

3. Start excel

4. Start ie and parameter
System.Diagnostics.Process.Start("IExplore.exe", "http://vbnetsample.blogspot.com/")

5. Kill It!!
' Kill all notepad process
Dim pProcess() As Process = System.Diagnostics.Process.GetProcessesByName("notepad")

For Each p As Process In pProcess



Gets Array of all DataRow

After you create or bind data into DataSet and you need select some data from them. You can use select method in datable.

DataTable.Select Method (String) Gets an array of all DataRow objects that match the filter criteria in order of primary key (or lacking one, order of addition.)

Sample 1. You can copy code from Step to Create Dataset topic and try to run this sample.

Dim drSelect As DataRow() = ds.Tables(0).Select("Column1=3")
Dim sTemp As String = ""

If drSelect.Length > 0 Then
For Each drItem As DataRow In drSelect
sTemp = sTemp & drItem("Column2").ToString() & ","

MessageBox.Show(sTemp.Substring(0, sTemp.Length - 1))
End If

Sample 2.

Private Sub GetRowsByFilter()
Dim t As DataTable
t = DataSet1.Tables("Orders")
' Presuming the DataTable has a column named Date.
Dim strExpr As String
strExpr = "Date > '1/1/00'"
Dim foundRows() As DataRow
' Use the Select method to find all rows matching the filter.
foundRows = t.Select(strExpr)
Dim i As Integer
' Print column 0 of each returned row.
For i = 0 to foundRows.GetUpperBound(0)
Next i
End Sub

Get IP Address By Net Class

This sample show How to get ip address by use net class.

Private Function IPAddresses(ByVal server As String) As String
Dim objArray As New ArrayList
Dim ip As String = String.Empty


' Get server related information.
Dim heserver As System.Net.IPHostEntry = System.Net.Dns.GetHostEntry(server)

' Loop on the AddressList
Dim curAdd As System.Net.IPAddress
For Each curAdd In heserver.AddressList

ip = curAdd.ToString
Exit For

Next curAdd

Catch e As Exception
Debug.WriteLine("Exception: " + e.ToString())
End Try

Return ip

End Function 'IPAddresses

For this sample you can call that funciton by pass name parameter or url such as


System.Net Namespace
The System.Net namespace provides a simple programming interface for many of the protocols used on networks today. The WebRequest and WebResponse classes form the basis of what are called pluggable protocols, an implementation of network services that enables you to develop applications that use Internet resources without worrying about the specific details of the individual protocols.

more detail


Development Tools

For programmers, a good tools lead to good performance. If it is free,it is very good. All tools are listed below. If any of you has any idea, please suggest.

1. SharpDevelop (Support VB.NET)
The Open Source Development Environment for .NET.

#develop (short for SharpDevelop) is a free IDE for C#, VB.NET and Boo projects on Microsoft's .NET platform. It is open-source, and you can download both sourcecode and executables from this site icsharpcode.net.

2. Microsoft SQL Server 2005 Express Edition
SQL Server Express is a powerful and reliable data management product that delivers rich features, data protection, and performance for embedded application clients, light Web applications, and local data stores. Click Here

3. Microsoft SQL Server 2000 Desktop Engine (MSDE 2000)
* MSDE 2000 is FREE to distribute with your applications if you own a MSDE Universal Subscription.
* Clients can access the MSDE for FREE without requiring a licence.
* Databases created with MSDE are 100 percent compatible with Microsoft SQL Server 2000.
* Microsoft are allowing companies to freely distribute the MSDE 2000 with the objective that you will purchase the Microsoft SQL 2000, because the latter version provides a Windows interface for administration (i.e. Microsoft Enterprise Manager). However why purchase the Microsoft Tools when other options are available?
Click Here

4. DbaMgr2k (graphical interface for MSDE 2000)
DbaMgr provides a graphical management interface for MS MSDE 2000 installations. It allows you to manage and administer your server, databases and database objects from a Windows interface similar to the one Enterprise Manager provides, rather than via the standard oSql.exe command line utility. In addition to traditional Sql Server objects management and permissions, DbaMgr adds a visual interface, a query interface, and a visual interface for BCP operation as well as SQL Agent management, providing Alerts, Operators and Jobs management features..
Click Here