Add a reference to the class that you created:
Imports SEMICO_Dialog.ClsQuickCodeImports SEMICO_DialogImports SEMICO_Dialog.ClsMessage
very simple to build connection string :
'untuk SQL serverDim connstrSQLserver = ProviderSQLserver("sa", "123456", "local", "luisdata")'untuk Access 2003Dim connstrAccess2003 = ProviderAccess(AppPath("tes.mdb"))'untuk Access 2007Dim connstrAccess2007 = ProviderAccess2007(AppPath("tes.accdb"))'untuk mysqlDim connstrMySQL = ProviderMySQL_NET("sa", "", "localhost", "DB")
Set connection String to object :
Dim Conn As New ClsSQL(connstrSQLserver)
Simple Query Execution :
Conn.StringQuery = "Select * from kas"Conn.Execute()'orConn.Execute("select * from kas")
Simple Showing Data :
'using name CollumnInfoMessage(Conn("keperluan"))'Or using indexInfoMessage(Conn(0))
Simple Navigation Rows Data :
If Conn.HasRows ThenFor i = 0 To Conn.RowCount - 1InfoMessage("keperluan")Conn.NextRow()NextEnd If
Binding Data to Datagridview :
Conn.StringQuery = "Select * from kas"DataGridView1.DataSource = Conn.Execute()'or using datatableDataGridView1.DataSource = Conn.Table'Or using dataviewDataGridView1.DataSource = Conn.Dataview
Very simple Transaction :
'TransactionConn.BeginsTrans()TryConn.Execute("delete from kas")Conn.Execute("delete from kas2")Conn.Execute("delete from kas3")Conn.CommitTrans()Catch ex As ExceptionConn.RollBackTrans()End Try
simple Get Date Server :
Conn.GetDateServer()
Simple Set TimeOut Connection :
Conn.TimeOut = 9000
simple Get Next Number of AutoNumber Data :
Dim strnum = Conn.AutoNumber("id", "kas")InfoMessage(strnum)
Simple Auto fill Data To Form :
Create Comtrol like below :
change the properties according to the data tag that will be included for each control
Dim Conn As New ClsSQL(connstrSQLserver)Conn.StringQuery = "Select * from kas"Conn.Execute()Conn.BindingGroupControl(Me)
then the data will be automatically entered into every control that property already in the set of tags first: