aRo`

automating your e-commerce

The Round function in vb.net is not always like u want it. Not in my case.
I wanted to round every up. For example 1.5 to 2 and 2.5 to 3.
When i used the Round function in vb.net it uses bankers rounding. This means that is rounds to the nearest integer.
So, if there are two nearest [...]

Instead of writing your own code for checking if a user has access to a page just use the formauthentication that is available to u
web.config (mind the ‘ )

Connection to Access Database

Imports System.Data.OleDb
Private Const strConnection As String = “Provider=Microsoft.Jet.OLEDB.4.0; Data Source=db.mdb;
Private objConnection As OleDbConnection = New OleDbConnection(strConnection)
Try
objConnection.Open()
….
objConnection.Close()
Catch myException As System.Exception
MessageBox.Show(myException.Message)
End Try
Command – ExecuteNonQuery UPDATE / DELETE / INSERT
Dim strSQL As String = “Insert into tblX (X ,Y) values (valueX,valueY)”
Dim objCommand As OleDbCommand = New OleDbCommand(strSQL, objConnection)
objCommand.ExecuteNonQuery()
Command – ExecuteScalar SELECT

Dim strSQL [...]

« Previous Page  Next Entries »