VB

Posting/Pertanyaan:

Contoh Auto Number vb.net


Imports System.Data.SqlClient
Imports System.Data
Dim sql As String = "select max(NOMOR) FROM " & m_sTableName
Dim sCount As String = ""
Dim oTblCount As New DataTable
oTblCount = getRecBySQL(sql, "TabelJual").Tables(0)
Dim sNewTranCode As String = getAutoTrancode(oTblCount)

----------------------------------

Function getRecBySQL(ByVal sSQL As String, ByVal sTblName As String) As DataSet

Dim oconn As New SqlConnection()
oconn.ConnectionString = "Data Source=.\SQLEXPRESS;Initial Catalog=DATAKU;Integrated Security=True"
MsgBox(oconn.ConnectionString)
Dim ocmd As SqlCommand = New SqlCommand(sSQL, oconn)
ocmd.CommandType = CommandType.Text
Dim da As SqlDataAdapter = New SqlDataAdapter(ocmd)
Dim ds As New DataSet()
da.Fill(ds, sTblName)
getRecBySQL = ds

End Function


Tanggapan/Jawaban:

1. hartoto_d@yahoo.com
auto number dengan vb.net
 




Kirim Jawaban/Komentar:  

Email  

Jawab  


© xbasicpro 2003 - 2010